filament: Arch linux clang doesn't find standard library headers
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:
- string
- map
- cmath
- functional
- limits
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.
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 16
I have the same problem with Arch and the libc++ from AUR.
Building with
./build releasesays thatldcannot find-lc++.But if I try
ld -lc++ --verbosethenldfindslibc++: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.