-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Arch linux clang doesn't find standard library headers #104
Comments
Thanks for the report. Do you have |
Let me inform you that Arch linux has no such package. Clang in arch uses the gcc standard library by default if i'm not mistaken. |
That may be but our code doesn't compile with GCC's standard library. |
Ok then it's a personal problem of mine, and i'll try to fix it. Just consider this a headsup than that your project does not compile on arch linux out of the box. |
I definitely appreciate the heads up. I'll investigate a bit more and try to find the package name for arch Linux to update our readme. |
|
Building it now, i'll get back to you with results. My mistake that i didn't check that out before creating an issue. |
No need to apologize, I know it would be a lot easier if it worked with any combination of gcc/clang/libstdc++/libc++ :) |
Thank you my friend! It compiles now :) Sorry for wasting your time. I'm excited to explore your engine ;) |
Glad you were able to get it to compile, don't hesitate if you run into other issues! |
I also can't build it on Arch due to libc++ problem
I can run examples from Clion, but when I try to build release(no matter if it's via build.sh file or CMake/Ninja) then I get:
|
Same as @wefhy, I have both libc++ and libc++abi installed from the AUR (on Manjaro) but ld still can't find |
I have the same problem with Arch and the libc++ from AUR. Building with But if I try
Maybe It's something to do with how ninja finds the libraries, I don't really know how ninja works. I think I'll try to build using a Docker image when I have the time. |
I don't think Ninja is a problem here, because the same thing has happened to me when using make (using the -m option). Right now, the Manjaro repository hosts a libc++ / libc++abi package, but it does not include static libs. To fix this, you need to clone the PKGBUILD from the manjaro package Git repo (https://gitlab.manjaro.org/packages/community/libcxx.git), add the option However, even when the libc++ static libraries are detected, it seems like there are still some problems left. I get a lot of linker errors, such as:
I thought maybe there are some incompatibilities between my current system's clang and libc++. But then I've checked that the two are both version 7.0.1. I am still investigating this error... |
Finally solved the problem! To compile release builds in Arch Linux (or Manjaro), you need to also link EDIT: exactly the same solution as #16... |
Thanks for the report! Note that this workaround is mentioned in the README.md file. |
Describe the bug
With standard clang version 6.0.1 and gcc version 8.2.1 (delivers std lib on arch) there is an issue of clang complaining that he does not find following headers:
When compiling self written programs these issues do not occur. I've tried to edit the CMakeLists.txt by adding the include_directories where these files reside. This works, but then multiple files complain about an undeclared identifier "strlen".
I suppose the issue resides in customizing parameters when executing clang.
The cmake generator line i use is provided in your build guide:
CC=/usr/bin/clang CXX=/usr/bin/clang++ \ cmake -G Ninja -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=../debug/filament ../..
This happens on a standard clean install of arch linux with the newest version of clang and gcc.
The text was updated successfully, but these errors were encountered: