cocos2d-x icon indicating copy to clipboard operation
cocos2d-x copied to clipboard

linking error when integrating with libchipmunk on linux

Open JakkuSakura opened this issue 4 years ago • 12 comments

  • cocos2d-x version: v4.0
  • devices test on: manjaro linux
  • developing environments gcc 9.2.1 This reproduces every time I try to compile a hello world cpp project. When I turned off physics both in ccConfig.h and external/CMakeLists.txt. It's finally avoided but not solved yet. It seems like that I missed some dependencies, since I cannot install these libraries listed on install-deps-linux.sh directly. I tried recompiling the libchipmunk and replace it, but it remains other linking errors with cocos2dx itself.
/usr/bin/ld: ../frameworks/cocos2d-x/external/chipmunk/prebuilt/linux/64-bit/libchipmunk.a(cpDampedRotarySprin
g.c.o): in function `preStep':
cpDampedRotarySpring.c:(.text+0xf2): undefined reference to `__expf_finite'
/usr/bin/ld: ../frameworks/cocos2d-x/external/chipmunk/prebuilt/linux/64-bit/libchipmunk.a(cpGrooveJoint.c.o):
 in function `preStep':
cpGrooveJoint.c:(.text+0x327): undefined reference to `__powf_finite'
/usr/bin/ld: ../frameworks/cocos2d-x/external/chipmunk/prebuilt/linux/64-bit/libchipmunk.a(cpSlideJoint.c.o): 
in function `preStep':
cpSlideJoint.c:(.text+0x42b): undefined reference to `__powf_finite'
/usr/bin/ld: ../frameworks/cocos2d-x/external/chipmunk/prebuilt/linux/64-bit/libchipmunk.a(cpPivotJoint.c.o): 
in function `preStep':
cpPivotJoint.c:(.text+0x1e8): undefined reference to `__powf_finite'
/usr/bin/ld: ../frameworks/cocos2d-x/external/chipmunk/prebuilt/linux/64-bit/libchipmunk.a(cpRatchetJoint.c.o)
(much more the same error)

JakkuSakura avatar Mar 01 '20 17:03 JakkuSakura

It seems that libchipmunk 7 uses a fast version of power function, which is cancelled on new glibc See https://github.com/google/filament/issues/2146

JakkuSakura avatar Mar 01 '20 17:03 JakkuSakura

Recompling libchipmunk 7.0.1 without fast-math by removing --ffast-math in libchipmunk/CMakeLists.txt(you have to download it manually) and replace the one within the cocos2d-x would solve it.

Here's a precompiled file with the method mentioned above. x86_64, gcc 9.2.1 libchipmunk7.0.1.zip

JakkuSakura avatar Mar 01 '20 18:03 JakkuSakura

I am having the same issue with Fedora 32, thanks for your workaround.

/usr/bin/ld: ../../../../../external/linux-specific/fmod/prebuilt/64-bit/libfmod.so: .dynsym local symbol at index 3 (>= sh_info of 2)
/usr/bin/ld: ../../../../../external/linux-specific/fmod/prebuilt/64-bit/libfmod.so: .dynsym local symbol at index 4 (>= sh_info of 2)
/usr/bin/ld: ../../../../../external/chipmunk/prebuilt/linux/64-bit/libchipmunk.a(cpGearJoint.c.o): in function `preStep':
cpGearJoint.c:(.text+0x144): undefined reference to `__powf_finite'
/usr/bin/ld: ../../../../../external/chipmunk/prebuilt/linux/64-bit/libchipmunk.a(cpDampedSpring.c.o): in function `preStep':
cpDampedSpring.c:(.text+0x1fd): undefined reference to `__expf_finite'
/usr/bin/ld: ../../../../../external/chipmunk/prebuilt/linux/64-bit/libchipmunk.a(cpRotaryLimitJoint.c.o): in function `preStep':
cpRotaryLimitJoint.c:(.text+0x17d): undefined reference to `__powf_finite'
/usr/bin/ld: ../../../../../external/chipmunk/prebuilt/linux/64-bit/libchipmunk.a(cpDampedRotarySpring.c.o): in function `preStep':
cpDampedRotarySpring.c:(.text+0xf2): undefined reference to `__expf_finite'
/usr/bin/ld: ../../../../../external/chipmunk/prebuilt/linux/64-bit/libchipmunk.a(cpGrooveJoint.c.o): in function `preStep':
cpGrooveJoint.c:(.text+0x327): undefined reference to `__powf_finite'
/usr/bin/ld: ../../../../../external/chipmunk/prebuilt/linux/64-bit/libchipmunk.a(cpSlideJoint.c.o): in function `preStep':
cpSlideJoint.c:(.text+0x42b): undefined reference to `__powf_finite'
/usr/bin/ld: ../../../../../external/chipmunk/prebuilt/linux/64-bit/libchipmunk.a(cpPivotJoint.c.o): in function `preStep':
cpPivotJoint.c:(.text+0x1e8): undefined reference to `__powf_finite'
/usr/bin/ld: ../../../../../external/chipmunk/prebuilt/linux/64-bit/libchipmunk.a(cpRatchetJoint.c.o): in function `preStep':
cpRatchetJoint.c:(.text+0x16a): undefined reference to `__powf_finite'
/usr/bin/ld: ../../../../../external/chipmunk/prebuilt/linux/64-bit/libchipmunk.a(cpPinJoint.c.o): in function `preStep':
cpPinJoint.c:(.text+0x324): undefined reference to `__powf_finite'
/usr/bin/ld: ../../../../../external/chipmunk/prebuilt/linux/64-bit/libchipmunk.a(cpHastySpace.c.o):cpHastySpace.c:(.text+0x560): more undefined references to `__powf_finite' follow
collect2: error: ld returned 1 exit status
make[2]: *** [engine/tests/cpp-empty-test/CMakeFiles/cpp-empty-test.dir/build.make:172: bin/cpp-empty-test/cpp-empty-test] Error 1
make[1]: *** [CMakeFiles/Makefile2:1253: engine/tests/cpp-empty-test/CMakeFiles/cpp-empty-test.dir/all] Error 2
make: *** [Makefile:104: all] Error 2

edv4rd0 avatar Jun 05 '20 13:06 edv4rd0

@qiujiangkun compiling chipmunk myself (with or without -ffast-math) or using your supplied lib all result in the same thing, and that is, while it does compile, none of the chipmunk examples work in PhysicsTest in the cpp-tests, they are all just static or bugging out.

CustomLenny avatar Jul 16 '20 07:07 CustomLenny

Recompling libchipmunk 7.0.1 without fast-math by removing --ffast-math in libchipmunk/CMakeLists.txt(you have to download it manually) and replace the one within the cocos2d-x would solve it.

Here's a precompiled file with the method mentioned above. x86_64, gcc 9.2.1 libchipmunk7.0.1.zip

Thank you very much!!! Copied over the version you shared and TA-DA!!!! ... Cocoa-2d-x launches with hello world!

OLD:

$ md5sum ../cocos2d/external/chipmunk/prebuilt/linux/64-bit/libchipmunk.a
311b028fed83ff96109548399961de55  ../cocos2d/external/chipmunk/prebuilt/linux/64-bit/libchipmunk.a

NEW:

$ md5sum ../cocos2d/external/chipmunk/prebuilt/linux/64-bit/libchipmunk.a
f0fe70ff96f5690fd3f8d8fca594e9c1  ../cocos2d/external/chipmunk/prebuilt/linux/64-bit/libchipmunk.a

poorie avatar Aug 31 '20 00:08 poorie

@CustomLenny , I was able to fix the issue by compiling chipmunk with -fno-builtin flag, then substituting libchipmunk.a in cocos project. (as per link referenced by @qiujiangkun (google/filament#2146))

raulcesar avatar Sep 02 '20 17:09 raulcesar

Can you consider allowing users to compile other dependencies they need in the documentation and cocos2dx deployment (including the dependency libraries involved in the bug to obtain the highest ABI compatibility, which can be done using automated scripts)

jack9603301 avatar Sep 08 '20 06:09 jack9603301

Can you consider allowing users to compile other dependencies they need in the documentation and cocos2dx deployment (including the dependency libraries involved in the bug to obtain the highest ABI compatibility, which can be done using automated scripts)

There's a very good practice by https://github.com/KomodoPlatform/antara-gaming-sdk, which provides multiple ways to compile dependencies: vcpkg, source code from zip and from git repositories

JakkuSakura avatar Sep 09 '20 04:09 JakkuSakura

Can you consider allowing users to compile other dependencies they need in the documentation and cocos2dx deployment (including the dependency libraries involved in the bug to obtain the highest ABI compatibility, which can be done using automated scripts)

There's a very good practice by https://github.com/KomodoPlatform/antara-gaming-sdk, which provides multiple ways to compile dependencies

what do you mean? I do not understand

jack9603301 avatar Sep 09 '20 07:09 jack9603301

@qiujiangkun compiling chipmunk myself (with or without -ffast-math) or using your supplied lib all result in the same thing, and that is, while it does compile, none of the chipmunk examples work in PhysicsTest in the cpp-tests, they are all just static or bugging out.

i had the same issue then i tried erasing -ffast-math and i left it's place as blank,then i recompiled libchipmunk which i downloaded at the internet with my chipmunk's headers that are exist in my recent project then i replaced chipmunk.a that i've compiled with my project has. Sorry for my english,i hope you'll understand...(btw i found the solution in almost 5 days :D )

tekeoglan avatar Jan 19 '21 19:01 tekeoglan

@qiujiangkun compiling chipmunk myself (with or without -ffast-math) or using your supplied lib all result in the same thing, and that is, while it does compile, none of the chipmunk examples work in PhysicsTest in the cpp-tests, they are all just static or bugging out.

i had the same issue then i tried erasing -ffast-math and i left it's place as blank,then i recompiled libchipmunk which i downloaded at the internet with my chipmunk's headers that are exist in my recent project then i replaced chipmunk.a that i've compiled with my project has. Sorry for my english,i hope you'll understand...(btw i found the solution in almost 5 days :D )

Did this and run cpp-test chipmunk and got

munmap_chunk(): invalid pointer Aborted (core dumped)

rapoma avatar Mar 13 '21 10:03 rapoma

I got a bunch undefined symbol with chipmunk 7.0.1, cocos2d-x version is 3.7

/usr/bin/ld: ../../lib/libcocos2d.a(CCPhysicsBody.cpp.o): in function `cpBodySetVel':
/mnt/c/Users/huangziyi/source/cocos2d-x/external/chipmunk/include/chipmunk/cpBody.h:186: undefined reference to `cpBodySanityCheck'
/usr/bin/ld: ../../lib/libcocos2d.a(CCPhysicsBody.cpp.o): in function `cpBodySetAngVel':
/mnt/c/Users/huangziyi/source/cocos2d-x/external/chipmunk/include/chipmunk/cpBody.h:191: undefined reference to `cpBodySanityCheck'
/usr/bin/ld: ../../lib/libcocos2d.a(CCPhysicsBody.cpp.o): in function `cpBodySetTorque':
/mnt/c/Users/huangziyi/source/cocos2d-x/external/chipmunk/include/chipmunk/cpBody.h:192: undefined reference to `cpBodySanityCheck'
/usr/bin/ld: ../../lib/libcocos2d.a(CCPhysicsBody.cpp.o): in function `cpBodySetVelLimit':
/mnt/c/Users/huangziyi/source/cocos2d-x/external/chipmunk/include/chipmunk/cpBody.h:194: undefined reference to `cpBodySanityCheck'
/usr/bin/ld: ../../lib/libcocos2d.a(CCPhysicsBody.cpp.o): in function `cpBodySetAngVelLimit':
/mnt/c/Users/huangziyi/source/cocos2d-x/external/chipmunk/include/chipmunk/cpBody.h:195: undefined reference to `cpBodySanityCheck'
/usr/bin/ld: ../../lib/libcocos2d.a(CCPhysicsBody.cpp.o): in function `cocos2d::PhysicsBody::setDynamic(bool)':
/mnt/c/Users/huangziyi/source/cocos2d-x/cocos/physics/CCPhysicsBody.cpp:285: undefined reference to `cpSpaceConvertBodyToDynamic'
/usr/bin/ld: /mnt/c/Users/huangziyi/source/cocos2d-x/cocos/physics/CCPhysicsBody.cpp:299: undefined reference to `cpSpaceConvertBodyToStatic'
/usr/bin/ld: ../../lib/libcocos2d.a(CCPhysicsBody.cpp.o): in function `cocos2d::PhysicsBody::setPosition(cocos2d::Vec2 const&)':
/mnt/c/Users/huangziyi/source/cocos2d-x/cocos/physics/CCPhysicsBody.cpp:339: undefined reference to `cpBodySetPos'
/usr/bin/ld: ../../lib/libcocos2d.a(CCPhysicsBody.cpp.o): in function `cocos2d::PhysicsBody::applyForce(cocos2d::Vec2 const&, cocos2d::Vec2 const&)':
/mnt/c/Users/huangziyi/source/cocos2d-x/cocos/physics/CCPhysicsBody.cpp:421: undefined reference to `cpBodyApplyForce'
/usr/bin/ld: ../../lib/libcocos2d.a(CCPhysicsBody.cpp.o): in function `cocos2d::PhysicsBody::resetForces()':
/mnt/c/Users/huangziyi/source/cocos2d-x/cocos/physics/CCPhysicsBody.cpp:427: undefined reference to `cpBodyResetForces'
/usr/bin/ld: ../../lib/libcocos2d.a(CCPhysicsBody.cpp.o): in function `cocos2d::PhysicsBody::applyImpulse(cocos2d::Vec2 const&, cocos2d::Vec2 const&)':
/mnt/c/Users/huangziyi/source/cocos2d-x/cocos/physics/CCPhysicsBody.cpp:437: undefined reference to `cpBodyApplyImpulse'
/usr/bin/ld: ../../lib/libcocos2d.a(CCPhysicsBody.cpp.o): in function `cocos2d::PhysicsBody::getVelocityAtLocalPoint(cocos2d::Vec2 const&)':
/mnt/c/Users/huangziyi/source/cocos2d-x/cocos/physics/CCPhysicsBody.cpp:583: undefined reference to `cpBodyGetVelAtLocalPoint'
/usr/bin/ld: ../../lib/libcocos2d.a(CCPhysicsBody.cpp.o): in function `cocos2d::PhysicsBody::getVelocityAtWorldPoint(cocos2d::Vec2 const&)':
/mnt/c/Users/huangziyi/source/cocos2d-x/cocos/physics/CCPhysicsBody.cpp:588: undefined reference to `cpBodyGetVelAtWorldPoint'
/usr/bin/ld: ../../lib/libcocos2d.a(CCPhysicsShape.cpp.o): in function `cocos2d::PhysicsShape::recenterPoints(cocos2d::Vec2*, int, cocos2d::Vec2 const&)':
/mnt/c/Users/huangziyi/source/cocos2d-x/cocos/physics/CCPhysicsShape.cpp:269: undefined reference to `cpRecenterPoly'
/usr/bin/ld: ../../lib/libcocos2d.a(CCPhysicsShape.cpp.o): in function `cocos2d::PhysicsShapePolygon::updateScale()':
/mnt/c/Users/huangziyi/source/cocos2d-x/cocos/physics/CCPhysicsShape.cpp:629: undefined reference to `cpPolyShapeGetNumVerts'
/usr/bin/ld: ../../lib/libcocos2d.a(CCPhysicsWorld.cpp.o): in function `cocos2d::PhysicsWorld::queryPoint(std::function<bool (cocos2d::PhysicsWorld&, cocos2d::PhysicsShape&, void*)>, cocos2d::Vec2 const&, void*)':
/mnt/c/Users/huangziyi/source/cocos2d-x/cocos/physics/CCPhysicsWorld.cpp:389: undefined reference to `cpSpaceNearestPointQuery'
/usr/bin/ld: ../../lib/libcocos2d.a(CCPhysicsWorld.cpp.o): in function `cocos2d::PhysicsWorld::getShapes(cocos2d::Vec2 const&) const':
/mnt/c/Users/huangziyi/source/cocos2d-x/cocos/physics/CCPhysicsWorld.cpp:402: undefined reference to `cpSpaceNearestPointQuery'
/usr/bin/ld: ../../lib/libcocos2d.a(CCPhysicsWorld.cpp.o): in function `cocos2d::PhysicsWorld::getShape(cocos2d::Vec2 const&) const':
/mnt/c/Users/huangziyi/source/cocos2d-x/cocos/physics/CCPhysicsWorld.cpp:415: undefined reference to `cpSpaceNearestPointQueryNearest'
/usr/bin/ld: ../../lib/libcocos2d.a(CCPhysicsWorld.cpp.o): in function `cocos2d::PhysicsWorld::init(cocos2d::Scene&)':
/mnt/c/Users/huangziyi/source/cocos2d-x/cocos/physics/CCPhysicsWorld.cpp:448: undefined reference to `cpSpaceSetDefaultCollisionHandler'
/usr/bin/ld: ../../lib/libcocos2d.a(CCPhysicsWorld.cpp.o): in function `cocos2d::PhysicsDebugDraw::drawJoint(cocos2d::PhysicsJoint&)':
/mnt/c/Users/huangziyi/source/cocos2d-x/cocos/physics/CCPhysicsWorld.cpp:996: undefined reference to `cpPinJointGetClass'
/usr/bin/ld: /mnt/c/Users/huangziyi/source/cocos2d-x/cocos/physics/CCPhysicsWorld.cpp:1007: undefined reference to `cpSlideJointGetClass'
/usr/bin/ld: /mnt/c/Users/huangziyi/source/cocos2d-x/cocos/physics/CCPhysicsWorld.cpp:1018: undefined reference to `cpPivotJointGetClass'
/usr/bin/ld: /mnt/c/Users/huangziyi/source/cocos2d-x/cocos/physics/CCPhysicsWorld.cpp:1028: undefined reference to `cpGrooveJointGetClass'
/usr/bin/ld: /mnt/c/Users/huangziyi/source/cocos2d-x/cocos/physics/CCPhysicsWorld.cpp:1039: undefined reference to `cpDampedSpringGetClass'
/usr/bin/ld: ../../lib/libcocos2d.a(CCPhysicsContact.cpp.o): in function `cocos2d::PhysicsContact::generateContactData()':
/mnt/c/Users/huangziyi/source/cocos2d-x/cocos/physics/CCPhysicsContact.cpp:99: undefined reference to `cpArbiterGetPoint'
/usr/bin/ld: ../../lib/libcocos2d.a(CCPhysicsJoint.cpp.o): in function `cpPinJointGetDist':
/mnt/c/Users/huangziyi/source/cocos2d-x/external/chipmunk/include/chipmunk/constraints/cpPinJoint.h:50: undefined reference to `cpPinJointGetClass'
/usr/bin/ld: ../../lib/libcocos2d.a(CCPhysicsJoint.cpp.o): in function `cpPinJointSetDist':
/mnt/c/Users/huangziyi/source/cocos2d-x/external/chipmunk/include/chipmunk/constraints/cpPinJoint.h:50: undefined reference to `cpPinJointGetClass'
/usr/bin/ld: ../../lib/libcocos2d.a(CCPhysicsJoint.cpp.o): in function `cpSlideJointGetAnchr1':
/mnt/c/Users/huangziyi/source/cocos2d-x/external/chipmunk/include/chipmunk/constraints/cpSlideJoint.h:48: undefined reference to `cpSlideJointGetClass'
/usr/bin/ld: ../../lib/libcocos2d.a(CCPhysicsJoint.cpp.o): in function `cpSlideJointSetAnchr1':
/mnt/c/Users/huangziyi/source/cocos2d-x/external/chipmunk/include/chipmunk/constraints/cpSlideJoint.h:48: undefined reference to `cpSlideJointGetClass'
/usr/bin/ld: ../../lib/libcocos2d.a(CCPhysicsJoint.cpp.o): in function `cpSlideJointGetAnchr2':
/mnt/c/Users/huangziyi/source/cocos2d-x/external/chipmunk/include/chipmunk/constraints/cpSlideJoint.h:49: undefined reference to `cpSlideJointGetClass'
/usr/bin/ld: ../../lib/libcocos2d.a(CCPhysicsJoint.cpp.o): in function `cpSlideJointGetMin':
/mnt/c/Users/huangziyi/source/cocos2d-x/external/chipmunk/include/chipmunk/constraints/cpSlideJoint.h:50: undefined reference to `cpSlideJointGetClass'
/usr/bin/ld: ../../lib/libcocos2d.a(CCPhysicsJoint.cpp.o): in function `cpSlideJointSetMin':
/mnt/c/Users/huangziyi/source/cocos2d-x/external/chipmunk/include/chipmunk/constraints/cpSlideJoint.h:50: undefined reference to `cpSlideJointGetClass'
/usr/bin/ld: ../../lib/libcocos2d.a(CCPhysicsJoint.cpp.o):/mnt/c/Users/huangziyi/source/cocos2d-x/external/chipmunk/include/chipmunk/constraints/cpSlideJoint.h:51: more undefined references to `cpSlideJointGetClass' follow
/usr/bin/ld: ../../lib/libcocos2d.a(CCPhysicsJoint.cpp.o): in function `cpGrooveJointGetGrooveA':
/mnt/c/Users/huangziyi/source/cocos2d-x/external/chipmunk/include/chipmunk/constraints/cpGrooveJoint.h:49: undefined reference to `cpGrooveJointGetClass'
/usr/bin/ld: ../../lib/libcocos2d.a(CCPhysicsJoint.cpp.o): in function `cpGrooveJointGetGrooveB':
/mnt/c/Users/huangziyi/source/cocos2d-x/external/chipmunk/include/chipmunk/constraints/cpGrooveJoint.h:52: undefined reference to `cpGrooveJointGetClass'
/usr/bin/ld: ../../lib/libcocos2d.a(CCPhysicsJoint.cpp.o): in function `cpGrooveJointGetAnchr2':
/mnt/c/Users/huangziyi/source/cocos2d-x/external/chipmunk/include/chipmunk/constraints/cpGrooveJoint.h:55: undefined reference to `cpGrooveJointGetClass'
/usr/bin/ld: ../../lib/libcocos2d.a(CCPhysicsJoint.cpp.o): in function `cpGrooveJointSetAnchr2':
/mnt/c/Users/huangziyi/source/cocos2d-x/external/chipmunk/include/chipmunk/constraints/cpGrooveJoint.h:55: undefined reference to `cpGrooveJointGetClass'
/usr/bin/ld: ../../lib/libcocos2d.a(CCPhysicsJoint.cpp.o): in function `cpDampedSpringGetAnchr1':
/mnt/c/Users/huangziyi/source/cocos2d-x/external/chipmunk/include/chipmunk/constraints/cpDampedSpring.h:57: undefined reference to `cpDampedSpringGetClass'
/usr/bin/ld: ../../lib/libcocos2d.a(CCPhysicsJoint.cpp.o): in function `cpDampedSpringSetAnchr1':
/mnt/c/Users/huangziyi/source/cocos2d-x/external/chipmunk/include/chipmunk/constraints/cpDampedSpring.h:57: undefined reference to `cpDampedSpringGetClass'
/usr/bin/ld: ../../lib/libcocos2d.a(CCPhysicsJoint.cpp.o): in function `cpDampedSpringGetAnchr2':
/mnt/c/Users/huangziyi/source/cocos2d-x/external/chipmunk/include/chipmunk/constraints/cpDampedSpring.h:58: undefined reference to `cpDampedSpringGetClass'
/usr/bin/ld: ../../lib/libcocos2d.a(CCPhysicsJoint.cpp.o): in function `cpDampedSpringGetRestLength':
/mnt/c/Users/huangziyi/source/cocos2d-x/external/chipmunk/include/chipmunk/constraints/cpDampedSpring.h:59: undefined reference to `cpDampedSpringGetClass'
/usr/bin/ld: ../../lib/libcocos2d.a(CCPhysicsJoint.cpp.o): in function `cpDampedSpringSetRestLength':
/mnt/c/Users/huangziyi/source/cocos2d-x/external/chipmunk/include/chipmunk/constraints/cpDampedSpring.h:59: undefined reference to `cpDampedSpringGetClass'
/usr/bin/ld: ../../lib/libcocos2d.a(CCPhysicsJoint.cpp.o):/mnt/c/Users/huangziyi/source/cocos2d-x/external/chipmunk/include/chipmunk/constraints/cpDampedSpring.h:60: more undefined references to `cpDampedSpringGetClass' follow
/usr/bin/ld: ../../lib/libcocos2d.a(CCPhysicsJoint.cpp.o): in function `cpDampedRotarySpringGetRestAngle':
/mnt/c/Users/huangziyi/source/cocos2d-x/external/chipmunk/include/chipmunk/constraints/cpDampedRotarySpring.h:51: undefined reference to `cpDampedRotarySpringGetClass'
/usr/bin/ld: ../../lib/libcocos2d.a(CCPhysicsJoint.cpp.o): in function `cpDampedRotarySpringSetRestAngle':
/mnt/c/Users/huangziyi/source/cocos2d-x/external/chipmunk/include/chipmunk/constraints/cpDampedRotarySpring.h:51: undefined reference to `cpDampedRotarySpringGetClass'
/usr/bin/ld: ../../lib/libcocos2d.a(CCPhysicsJoint.cpp.o): in function `cpDampedRotarySpringGetStiffness':
/mnt/c/Users/huangziyi/source/cocos2d-x/external/chipmunk/include/chipmunk/constraints/cpDampedRotarySpring.h:52: undefined reference to `cpDampedRotarySpringGetClass'
/usr/bin/ld: ../../lib/libcocos2d.a(CCPhysicsJoint.cpp.o): in function `cpDampedRotarySpringSetStiffness':
/mnt/c/Users/huangziyi/source/cocos2d-x/external/chipmunk/include/chipmunk/constraints/cpDampedRotarySpring.h:52: undefined reference to `cpDampedRotarySpringGetClass'
/usr/bin/ld: ../../lib/libcocos2d.a(CCPhysicsJoint.cpp.o): in function `cpDampedRotarySpringGetDamping':
/mnt/c/Users/huangziyi/source/cocos2d-x/external/chipmunk/include/chipmunk/constraints/cpDampedRotarySpring.h:53: undefined reference to `cpDampedRotarySpringGetClass'
/usr/bin/ld: ../../lib/libcocos2d.a(CCPhysicsJoint.cpp.o):/mnt/c/Users/huangziyi/source/cocos2d-x/external/chipmunk/include/chipmunk/constraints/cpDampedRotarySpring.h:53: more undefined references to `cpDampedRotarySpringGetClass' follow
/usr/bin/ld: ../../lib/libcocos2d.a(CCPhysicsJoint.cpp.o): in function `cpRotaryLimitJointGetMin':
/mnt/c/Users/huangziyi/source/cocos2d-x/external/chipmunk/include/chipmunk/constraints/cpRotaryLimitJoint.h:45: undefined reference to `cpRotaryLimitJointGetClass'
/usr/bin/ld: ../../lib/libcocos2d.a(CCPhysicsJoint.cpp.o): in function `cpRotaryLimitJointSetMin':
/mnt/c/Users/huangziyi/source/cocos2d-x/external/chipmunk/include/chipmunk/constraints/cpRotaryLimitJoint.h:45: undefined reference to `cpRotaryLimitJointGetClass'
/usr/bin/ld: ../../lib/libcocos2d.a(CCPhysicsJoint.cpp.o): in function `cpRotaryLimitJointGetMax':
/mnt/c/Users/huangziyi/source/cocos2d-x/external/chipmunk/include/chipmunk/constraints/cpRotaryLimitJoint.h:46: undefined reference to `cpRotaryLimitJointGetClass'
/usr/bin/ld: ../../lib/libcocos2d.a(CCPhysicsJoint.cpp.o): in function `cpRotaryLimitJointSetMax':
/mnt/c/Users/huangziyi/source/cocos2d-x/external/chipmunk/include/chipmunk/constraints/cpRotaryLimitJoint.h:46: undefined reference to `cpRotaryLimitJointGetClass'
/usr/bin/ld: ../../lib/libcocos2d.a(CCPhysicsJoint.cpp.o): in function `cpRatchetJointGetAngle':
/mnt/c/Users/huangziyi/source/cocos2d-x/external/chipmunk/include/chipmunk/constraints/cpRatchetJoint.h:45: undefined reference to `cpRatchetJointGetClass'
/usr/bin/ld: ../../lib/libcocos2d.a(CCPhysicsJoint.cpp.o): in function `cpRatchetJointSetAngle':
/mnt/c/Users/huangziyi/source/cocos2d-x/external/chipmunk/include/chipmunk/constraints/cpRatchetJoint.h:45: undefined reference to `cpRatchetJointGetClass'
/usr/bin/ld: ../../lib/libcocos2d.a(CCPhysicsJoint.cpp.o): in function `cpRatchetJointGetPhase':
/mnt/c/Users/huangziyi/source/cocos2d-x/external/chipmunk/include/chipmunk/constraints/cpRatchetJoint.h:46: undefined reference to `cpRatchetJointGetClass'
/usr/bin/ld: ../../lib/libcocos2d.a(CCPhysicsJoint.cpp.o): in function `cpRatchetJointSetPhase':
/mnt/c/Users/huangziyi/source/cocos2d-x/external/chipmunk/include/chipmunk/constraints/cpRatchetJoint.h:46: undefined reference to `cpRatchetJointGetClass'
/usr/bin/ld: ../../lib/libcocos2d.a(CCPhysicsJoint.cpp.o): in function `cpRatchetJointGetRatchet':
/mnt/c/Users/huangziyi/source/cocos2d-x/external/chipmunk/include/chipmunk/constraints/cpRatchetJoint.h:47: undefined reference to `cpRatchetJointGetClass'
/usr/bin/ld: ../../lib/libcocos2d.a(CCPhysicsJoint.cpp.o):/mnt/c/Users/huangziyi/source/cocos2d-x/external/chipmunk/include/chipmunk/constraints/cpRatchetJoint.h:47: more undefined references to `cpRatchetJointGetClass' follow
/usr/bin/ld: ../../lib/libcocos2d.a(CCPhysicsJoint.cpp.o): in function `cpGearJointGetPhase':
/mnt/c/Users/huangziyi/source/cocos2d-x/external/chipmunk/include/chipmunk/constraints/cpGearJoint.h:46: undefined reference to `cpGearJointGetClass'
/usr/bin/ld: ../../lib/libcocos2d.a(CCPhysicsJoint.cpp.o): in function `cpGearJointSetPhase':
/mnt/c/Users/huangziyi/source/cocos2d-x/external/chipmunk/include/chipmunk/constraints/cpGearJoint.h:46: undefined reference to `cpGearJointGetClass'
/usr/bin/ld: ../../lib/libcocos2d.a(CCPhysicsJoint.cpp.o): in function `cpGearJointGetRatio':
/mnt/c/Users/huangziyi/source/cocos2d-x/external/chipmunk/include/chipmunk/constraints/cpGearJoint.h:47: undefined reference to `cpGearJointGetClass'
/usr/bin/ld: ../../lib/libcocos2d.a(CCPhysicsJoint.cpp.o): in function `cpSimpleMotorGetRate':
/mnt/c/Users/huangziyi/source/cocos2d-x/external/chipmunk/include/chipmunk/constraints/cpSimpleMotor.h:44: undefined reference to `cpSimpleMotorGetClass'
/usr/bin/ld: ../../lib/libcocos2d.a(CCPhysicsJoint.cpp.o): in function `cpSimpleMotorSetRate':
/mnt/c/Users/huangziyi/source/cocos2d-x/external/chipmunk/include/chipmunk/constraints/cpSimpleMotor.h:44: undefined reference to `cpSimpleMotorGetClass'
collect2: error: ld returned 1 exit status
make[2]: *** [tests/cpp-empty-test/CMakeFiles/cpp-empty-test.dir/build.make:155: bin/cpp-empty-test/cpp-empty-test] Error 1
make[1]: *** [CMakeFiles/Makefile2:482: tests/cpp-empty-test/CMakeFiles/cpp-empty-test.dir/all] Error 2
make: *** [Makefile:103: all] Error 2

MrThanlon avatar Feb 03 '23 09:02 MrThanlon