Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to build from source on Ubuntu 22.04 #20783

Open
hien-ngo29 opened this issue Aug 30, 2023 · 3 comments
Open

Failed to build from source on Ubuntu 22.04 #20783

hien-ngo29 opened this issue Aug 30, 2023 · 3 comments

Comments

@hien-ngo29
Copy link

hien-ngo29 commented Aug 30, 2023

  • cocos2d-x version: 4.0
  • OS: Ubuntu 22.04

I followed this tutorial on this page. It has configured successfully but failed to compile.

Compile log:

Consolidate compiler generated dependencies of target ext_tinyxml2
Consolidate compiler generated dependencies of target ext_unzip
Consolidate compiler generated dependencies of target ext_xxhash
Consolidate compiler generated dependencies of target ext_recast
[  0%] Built target ext_xxhash
[  2%] Built target ext_tinyxml2
[  2%] Built target ext_unzip
[  4%] Built target ext_recast
Consolidate compiler generated dependencies of target ext_clipper
Consolidate compiler generated dependencies of target ext_xxtea
Consolidate compiler generated dependencies of target ext_edtaa3func
Consolidate compiler generated dependencies of target ext_convertUTF
[  4%] Built target ext_xxtea
[  4%] Built target ext_edtaa3func
[  5%] Built target ext_clipper
Consolidate compiler generated dependencies of target ext_poly2tri
[  5%] Built target ext_convertUTF
Consolidate compiler generated dependencies of target ext_md5
Consolidate compiler generated dependencies of target ext_tolua
[  6%] Built target ext_md5
Consolidate compiler generated dependencies of target ext_luasocket
[  6%] Built target ext_poly2tri
[  6%] Built target ext_tolua
[  8%] Built target ext_luasocket
Copying resources for cpp-empty-test ...
Copying lua scripts ...
Copying resources for cpp-tests ...
    copying to /home/hien/cocos2d-x/build/linux-build/bin/cpp-empty-test/Resources
    copying to /home/hien/cocos2d-x/build/linux-build/bin/cpp-tests/Resources
Copying resources for lua-empty-test ...
    copying to /home/hien/cocos2d-x/build/linux-build/bin/lua-empty-test/Resources/res
[  8%] Built target SYNC_RESOURCE-cpp-empty-test
[  8%] Built target SYNC_RESOURCE-lua-empty-test
[  8%] Built target COPY_LUA-lua-empty-test
[  8%] Built target SYNC_RESOURCE-cpp-tests
Consolidate compiler generated dependencies of target external
Copying lua scripts ...
Copying resources for lua-tests ...
Copying resources for HelloCpp ...
[  9%] Built target external
    copying to /home/hien/cocos2d-x/build/linux-build/bin/lua-tests/Resources/res
    copying to /home/hien/cocos2d-x/build/linux-build/bin/HelloCpp/Resources
    copying to /home/hien/cocos2d-x/build/linux-build/bin/lua-tests/Resources/res
[  9%] Built target SYNC_RESOURCE-HelloCpp
[  9%] Built target COPY_LUA-lua-tests
[  9%] Built target SYNC_RESOURCE-lua-tests
Consolidate compiler generated dependencies of target cocos2d
[ 78%] Built target cocos2d
Consolidate compiler generated dependencies of target HelloCpp
Consolidate compiler generated dependencies of target cpp-empty-test
Consolidate compiler generated dependencies of target cpp-tests
[ 78%] Linking CXX executable ../../../bin/HelloCpp/HelloCpp
[ 79%] Linking CXX executable ../../../bin/cpp-empty-test/cpp-empty-test
Consolidate compiler generated dependencies of target luacocos2d
[ 79%] Linking CXX executable ../../../bin/cpp-tests/cpp-tests
[ 86%] Built target luacocos2d
Consolidate compiler generated dependencies of target lua-empty-test
[ 86%] Linking CXX executable ../../../bin/lua-empty-test/lua-empty-test
/usr/bin/ld: ../../../../../external/linux-specific/fmod/prebuilt/64-bit/libfmod.so: .dynsym local symbol at index 2 (>= sh_info of 2)
/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/linux-specific/fmod/prebuilt/64-bit/libfmod.so: .dynsym local symbol at index 2 (>= sh_info of 2)
/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/linux-specific/fmod/prebuilt/64-bit/libfmod.so: .dynsym local symbol at index 2 (>= sh_info of 2)
/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/linux-specific/fmod/prebuilt/64-bit/libfmod.so: .dynsym local symbol at index 2 (>= sh_info of 2)
/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
/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:167: bin/cpp-empty-test/cpp-empty-test] Error 1
make[1]: *** [CMakeFiles/Makefile2:1102: engine/tests/cpp-empty-test/CMakeFiles/cpp-empty-test.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
collect2: error: ld returned 1 exit status
make[2]: *** [engine/tests/HelloCpp/CMakeFiles/HelloCpp.dir/build.make:167: bin/HelloCpp/HelloCpp] Error 1
make[1]: *** [CMakeFiles/Makefile2:1418: engine/tests/HelloCpp/CMakeFiles/HelloCpp.dir/all] Error 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/lua-empty-test/CMakeFiles/lua-empty-test.dir/build.make:155: bin/lua-empty-test/lua-empty-test] Error 1
make[1]: *** [CMakeFiles/Makefile2:1234: engine/tests/lua-empty-test/CMakeFiles/lua-empty-test.dir/all] Error 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-tests/CMakeFiles/cpp-tests.dir/build.make:2349: bin/cpp-tests/cpp-tests] Error 1
make[1]: *** [CMakeFiles/Makefile2:1166: engine/tests/cpp-tests/CMakeFiles/cpp-tests.dir/all] Error 2
make: *** [Makefile:91: all] Error 2

Device Info (This is a really old PC):
image

How do I fix this?

@IsCqian
Copy link

IsCqian commented Sep 7, 2023

I also meet this problem, can you tell me if you have resolved it so far?

@hien-ngo29 hien-ngo29 changed the title Failed to build from source on Ubuntu 20.04 Failed to build from source on Ubuntu 22.04 Sep 7, 2023
@hien-ngo29
Copy link
Author

I'm sorry. I still can't resolved the problem.

@Diam2023
Copy link

see this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants