Ubuntu 22.04 + UE4.26, can't make launch because of issues with math modules of C compiler #9127
Unanswered
eleuven111
asked this question in
Q&A
Replies: 1 comment 1 reply
-
You can try to edit the toolchain: Change the CarlaUE5/CMake/Toolchain.cmake and replace lines 89-94 with:
then also change line 96: add_link_options (-stdlib=libc++ -L${UE_LIBS} -lm) or use another math library? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I'm currently building CARLA (latest version from GitHub) on Ubuntu 22.04 using Clang 10 and libc++ as required by UE4.26. Compilation is done through the usual make launch process.
Everything builds fine up to the point where LibCarla is compiled, but I keep getting errors from the math.h header (specifically libc++'s version under ThirdParty/Linux/LibCxx/include/c++/v1). For example:
error: no member named 'ceilf' in the global namespace
error: no member named 'cosf' in the global namespace
These errors happen inside math.h itself, at lines like:
inline _LIBCPP_INLINE_VISIBILITY float cos(float x) _NOEXCEPT { return ::cosf(x); }
which fails because apparently ::cosf isn’t found.
The compile command clearly shows that -stdlib=libc++ and the correct -isystem path are set multiple times, and everything is going through /opt/llvm-10/bin/clang++. No trace of g++ anywhere.
Additionally, is already properly included in all the relevant .cpp files that use math functions like cos, ceil, pow, atan2, etc.
At this point I don’t know if:
Any idea what's missing or misconfigured here?
Thanks.
Beta Was this translation helpful? Give feedback.
All reactions