Closed The-Sapphire-Starship closed 3 years ago
use_llvm=yes
requires that you have the Clang compiler installed. If you only have GCC installed, do not pass use_llvm=yes
to the SCons command line.
Also, you can probably remove the CCFLAGS
override and stick with the default values.
Okay, ive ommited use_llvm=yes
and CCFLAGS
and it is currently compiling, i started with the command hiulit provides in his unofficial rpi godot github repo and made the edits i remember from the command i was using before, i will post here whether it was successful or not when it is done compiling
It was almost done but then it stopped:
[Initial build] /usr/bin/ld: core/libcore.x11.opt.tools.32.a(memory.x11.opt.tools.32.o): in function `Memory::alloc_static(unsigned int, bool)':
/usr/include/c++/8/bits/atomic_base.h:514: undefined reference to `__atomic_fetch_add_8'
/usr/bin/ld: /usr/include/c++/8/bits/atomic_base.h:514: undefined reference to `__atomic_fetch_add_8'
/usr/bin/ld: /usr/include/c++/8/bits/atomic_base.h:396: undefined reference to `__atomic_load_8'
/usr/bin/ld: /usr/include/c++/8/bits/atomic_base.h:434: undefined reference to `__atomic_compare_exchange_8'
/usr/bin/ld: core/libcore.x11.opt.tools.32.a(memory.x11.opt.tools.32.o): in function `Memory::realloc_static(void*, unsigned int, bool)':
/usr/include/c++/8/bits/atomic_base.h:514: undefined reference to `__atomic_fetch_add_8'
/usr/bin/ld: /usr/include/c++/8/bits/atomic_base.h:396: undefined reference to `__atomic_load_8'
/usr/bin/ld: /usr/include/c++/8/bits/atomic_base.h:434: undefined reference to `__atomic_compare_exchange_8'
/usr/bin/ld: /usr/include/c++/8/bits/atomic_base.h:524: undefined reference to `__atomic_fetch_sub_8'
/usr/bin/ld: core/libcore.x11.opt.tools.32.a(memory.x11.opt.tools.32.o): in function `Memory::free_static(void*, bool)':
/usr/include/c++/8/bits/atomic_base.h:524: undefined reference to `__atomic_fetch_sub_8'
/usr/bin/ld: /usr/include/c++/8/bits/atomic_base.h:524: undefined reference to `__atomic_fetch_sub_8'
/usr/bin/ld: core/libcore.x11.opt.tools.32.a(memory.x11.opt.tools.32.o): in function `Memory::get_mem_usage()':
/usr/include/c++/8/bits/atomic_base.h:396: undefined reference to `__atomic_load_8'
/usr/bin/ld: core/libcore.x11.opt.tools.32.a(memory.x11.opt.tools.32.o): in function `Memory::get_mem_max_usage()':
/usr/include/c++/8/bits/atomic_base.h:396: undefined reference to `__atomic_load_8'
/usr/bin/ld: core/libcore.x11.opt.tools.32.a(memory.x11.opt.tools.32.o): in function `_GLOBAL__sub_I__ZnwjPKc':
/usr/include/c++/8/bits/atomic_base.h:374: undefined reference to `__atomic_store_8'
/usr/bin/ld: /usr/include/c++/8/bits/atomic_base.h:374: undefined reference to `__atomic_store_8'
/usr/bin/ld: /usr/include/c++/8/bits/atomic_base.h:374: undefined reference to `__atomic_store_8'
/usr/bin/ld: servers/libservers.x11.opt.tools.32.a(visual_server_wrap_mt.x11.opt.tools.32.o): in function `VisualServerWrapMT::thread_flush()':
/usr/include/c++/8/bits/atomic_base.h:524: undefined reference to `__atomic_fetch_sub_8'
/usr/bin/ld: servers/libservers.x11.opt.tools.32.a(visual_server_wrap_mt.x11.opt.tools.32.o): in function `VisualServerWrapMT::thread_draw(bool, double)':
/usr/include/c++/8/bits/atomic_base.h:524: undefined reference to `__atomic_fetch_sub_8'
/usr/bin/ld: servers/libservers.x11.opt.tools.32.a(visual_server_wrap_mt.x11.opt.tools.32.o): in function `VisualServerWrapMT::sync()':
/usr/include/c++/8/bits/atomic_base.h:514: undefined reference to `__atomic_fetch_add_8'
/usr/bin/ld: servers/libservers.x11.opt.tools.32.a(visual_server_wrap_mt.x11.opt.tools.32.o): in function `VisualServerWrapMT::draw(bool, double)':
/usr/include/c++/8/bits/atomic_base.h:514: undefined reference to `__atomic_fetch_add_8'
/usr/bin/ld: servers/libservers.x11.opt.tools.32.a(visual_server_wrap_mt.x11.opt.tools.32.o): in function `VisualServerWrapMT::VisualServerWrapMT(VisualServer*, bool)':
/usr/include/c++/8/bits/atomic_base.h:374: undefined reference to `__atomic_store_8'
/usr/bin/ld: core/libcore.x11.opt.tools.32.a(safe_refcount.x11.opt.tools.32.o): in function `check_lockless_atomics()':
/usr/include/c++/8/bits/atomic_base.h:354: undefined reference to `__atomic_is_lock_free'
collect2: error: ld returned 1 exit status
scons: *** [bin/godot.x11.opt.tools.32] Error 1
scons: building terminated because of errors.```
This should have been fixed a while ago: https://github.com/godotengine/godot/issues/31407
im pretty sure i did git checkout 3.3.2-stable
before running this but i can try again and make sure
it appears to pick up where it left off then end in the same error
@Calinou ^ Sorry if you don't like being mentioned like this, im just not sure if you have seen the new messages yet or not
@Calinou ^ Sorry if you don't like being mentioned like this, im just not sure if you have seen the new messages yet or not
I've seen your messages, but I don't know what would be the cause of the error then.
Manually disabling modules and setting CCFLAGS
should not be necessary if you are building on device (it's for cross-compiling only), at least current 3.x is building and running on the ARM64 version of Ubuntu 21.04 (QEMU/HVF VM on M1 mac).
undefined reference to `__atomic_fetch_add_8'
Try adding LINKFLAGS="-latomic"
to the build command.
Adding LINKFLAGS="-latomic"
worked!
Thanks for the help!
Here is the build command in full(just in case I loss it again and I can easily find it or just in case someone else is having the same problem you can refer them to this):
scons platform=x11 target=release_debug tools=yes -j4 module_webm_enabled=no LINKFLAGS="-latomic"
Thank you for your help @Calinou and @bruvzg!
Out of curiosity, does it work if you compile without LINKFLAGS="-latomic"
but with use_static_cpp=no
? If so, the cause of this issue is the same as https://github.com/godotengine/godot/issues/46375 (except with a different compiler this time).
Nope, it does not appear too:
Enabling ALSA
Enabling PulseAudio
Enabling udev support
Checking for C header file mntent.h... (cached) yes
scons: done reading SConscript files.
scons: Building targets ...
[ 96%] Linking Program ==> bin/godot.x11.opt.tools.32
[100%] progress_finish(["progress_finish"], [])
[100%] /usr/bin/ld: core/libcore.x11.opt.tools.32.a(memory.x11.opt.tools.32.o): in function `Memory::alloc_static(unsigned int, bool)':
/usr/include/c++/8/bits/atomic_base.h:514: undefined reference to `__atomic_fetch_add_8'
/usr/bin/ld: /usr/include/c++/8/bits/atomic_base.h:514: undefined reference to `__atomic_fetch_add_8'
/usr/bin/ld: /usr/include/c++/8/bits/atomic_base.h:396: undefined reference to `__atomic_load_8'
/usr/bin/ld: /usr/include/c++/8/bits/atomic_base.h:434: undefined reference to `__atomic_compare_exchange_8'
/usr/bin/ld: core/libcore.x11.opt.tools.32.a(memory.x11.opt.tools.32.o): in function `Memory::realloc_static(void*, unsigned int, bool)':
/usr/include/c++/8/bits/atomic_base.h:514: undefined reference to `__atomic_fetch_add_8'
/usr/bin/ld: /usr/include/c++/8/bits/atomic_base.h:396: undefined reference to `__atomic_load_8'
/usr/bin/ld: /usr/include/c++/8/bits/atomic_base.h:434: undefined reference to `__atomic_compare_exchange_8'
/usr/bin/ld: /usr/include/c++/8/bits/atomic_base.h:524: undefined reference to `__atomic_fetch_sub_8'
/usr/bin/ld: core/libcore.x11.opt.tools.32.a(memory.x11.opt.tools.32.o): in function `Memory::free_static(void*, bool)':
/usr/include/c++/8/bits/atomic_base.h:524: undefined reference to `__atomic_fetch_sub_8'
/usr/bin/ld: /usr/include/c++/8/bits/atomic_base.h:524: undefined reference to `__atomic_fetch_sub_8'
/usr/bin/ld: core/libcore.x11.opt.tools.32.a(memory.x11.opt.tools.32.o): in function `Memory::get_mem_usage()':
/usr/include/c++/8/bits/atomic_base.h:396: undefined reference to `__atomic_load_8'
/usr/bin/ld: core/libcore.x11.opt.tools.32.a(memory.x11.opt.tools.32.o): in function `Memory::get_mem_max_usage()':
/usr/include/c++/8/bits/atomic_base.h:396: undefined reference to `__atomic_load_8'
/usr/bin/ld: core/libcore.x11.opt.tools.32.a(memory.x11.opt.tools.32.o): in function `_GLOBAL__sub_I__ZnwjPKc':
/usr/include/c++/8/bits/atomic_base.h:374: undefined reference to `__atomic_store_8'
/usr/bin/ld: /usr/include/c++/8/bits/atomic_base.h:374: undefined reference to `__atomic_store_8'
/usr/bin/ld: /usr/include/c++/8/bits/atomic_base.h:374: undefined reference to `__atomic_store_8'
/usr/bin/ld: servers/libservers.x11.opt.tools.32.a(visual_server_wrap_mt.x11.opt.tools.32.o): in function `VisualServerWrapMT::thread_flush()':
/usr/include/c++/8/bits/atomic_base.h:524: undefined reference to `__atomic_fetch_sub_8'
/usr/bin/ld: servers/libservers.x11.opt.tools.32.a(visual_server_wrap_mt.x11.opt.tools.32.o): in function `VisualServerWrapMT::thread_draw(bool, double)':
/usr/include/c++/8/bits/atomic_base.h:524: undefined reference to `__atomic_fetch_sub_8'
/usr/bin/ld: servers/libservers.x11.opt.tools.32.a(visual_server_wrap_mt.x11.opt.tools.32.o): in function `VisualServerWrapMT::sync()':
/usr/include/c++/8/bits/atomic_base.h:514: undefined reference to `__atomic_fetch_add_8'
/usr/bin/ld: servers/libservers.x11.opt.tools.32.a(visual_server_wrap_mt.x11.opt.tools.32.o): in function `VisualServerWrapMT::draw(bool, double)':
/usr/include/c++/8/bits/atomic_base.h:514: undefined reference to `__atomic_fetch_add_8'
/usr/bin/ld: servers/libservers.x11.opt.tools.32.a(visual_server_wrap_mt.x11.opt.tools.32.o): in function `VisualServerWrapMT::VisualServerWrapMT(VisualServer*, bool)':
/usr/include/c++/8/bits/atomic_base.h:374: undefined reference to `__atomic_store_8'
/usr/bin/ld: core/libcore.x11.opt.tools.32.a(safe_refcount.x11.opt.tools.32.o): in function `check_lockless_atomics()':
/usr/include/c++/8/bits/atomic_base.h:354: undefined reference to `__atomic_is_lock_free'
collect2: error: ld returned 1 exit status
scons: *** [bin/godot.x11.opt.tools.32] Error 1
scons: building terminated because of errors.```
Godot version
3.3.2-stable
System information
rpi4, raspberry pi os, xfce desktop environment
Issue description
Im trying to compile godot on my raspberry pi, ive done it before but i lost the text file that had the command i was using in it and Im trying to figure out the command that will work again. Im using this command:
Using that command im getting this error:
Any idea how to fix this?
Steps to reproduce
Try compiling godot using this command:
on a rpi4 running raspberry pi os with xfce desktop environment
Minimal reproduction project
No response