Closed dslm4515 closed 3 years ago
Prefix the cmake command with CFLAGS="$CFLAGS -I/llvmtools/include" CXXFLAGS="$CXXFLAGS -I/llvmtools/include"
and error goes away but another pops up:
[ 69%] Building CXX object src/CMakeFiles/cxx_shared.dir/debug.cpp.o
In file included from /mnt/cmlfs/sources/llvm/projects/libcxx/src/debug.cpp:15: In file included from /mnt/cmlfs/sources/llvm/projects/libcxx/build/include/c++/v1/__hash_table:18: /mnt/cmlfs/sources/llvm/projects/libcxx/build/include/c++/v1/cmath:321:9: error: no member named 'signbit' in the global namespace; did you mean
'__signbit'?
using ::signbit;
~~^~~~~~~
__signbit
/llvmtools/include/math.h:93:5: note: '__signbit' declared here
int __signbit(double);
^
In file included from /mnt/cmlfs/sources/llvm/projects/libcxx/src/debug.cpp:15: In file included from /mnt/cmlfs/sources/llvm/projects/libcxx/build/include/c++/v1/__hash_table:18: /mnt/cmlfs/sources/llvm/projects/libcxx/build/include/c++/v1/cmath:322:9: error: no member named 'fpclassify' in the global namespace; did you m
ean '__fpclassify'?
using ::fpclassify;
~~^~~~~~~~~~
__fpclassify
/llvmtools/include/math.h:51:5: note: '__fpclassify' declared here
int __fpclassify(double);
^
In file included from /mnt/cmlfs/sources/llvm/projects/libcxx/src/debug.cpp:15: In file included from /mnt/cmlfs/sources/llvm/projects/libcxx/build/include/c++/v1/__hash_table:18:
/mnt/cmlfs/sources/llvm/projects/libcxx/build/include/c++/v1/cmath:323:9: error: no member named 'isfinite' in the global namespace; di[65/1875]n 'finite'?
using ::isfinite;
~~^~~~~~~~
finite
/llvmtools/include/math.h:401:13: note: 'finite' declared here
int finite(double);
^
In file included from /mnt/cmlfs/sources/llvm/projects/libcxx/src/debug.cpp:15:
In file included from /mnt/cmlfs/sources/llvm/projects/libcxx/build/include/c++/v1/__hash_table:18:
/mnt/cmlfs/sources/llvm/projects/libcxx/build/include/c++/v1/cmath:324:9: error: no member named 'isinf' in the global namespace
using ::isinf;
~~^
/mnt/cmlfs/sources/llvm/projects/libcxx/build/include/c++/v1/cmath:325:9: error: no member named 'isnan' in the global namespace
using ::isnan;
~~^
/mnt/cmlfs/sources/llvm/projects/libcxx/build/include/c++/v1/cmath:326:9: error: no member named 'isnormal' in the global namespace
using ::isnormal;
~~^
/mnt/cmlfs/sources/llvm/projects/libcxx/build/include/c++/v1/cmath:327:9: error: no member named 'isgreater' in the global namespace; did you mean '__isgreater'?
using ::isgreater;
~~^~~~~~~~~
__isgreater
/llvmtools/include/math.h:118:1: note: '__isgreater' declared here
__ISREL_DEF(greater, >, double_t)
^
/llvmtools/include/math.h:105:21: note: expanded from macro '__ISREL_DEF'
static __inline int __is##rel(type __x, type __y) \
^
<scratch space>:554:1: note: expanded from here
__isgreater
^
In file included from /mnt/cmlfs/sources/llvm/projects/libcxx/src/debug.cpp:15:
In file included from /mnt/cmlfs/sources/llvm/projects/libcxx/build/include/c++/v1/__hash_table:18:
/mnt/cmlfs/sources/llvm/projects/libcxx/build/include/c++/v1/cmath:328:9: error: no member named 'isgreaterequal' in the global namespace; did you mean '__isgreaterequal'?
using ::isgreaterequal;
~~^~~~~~~~~~~~~~
__isgreaterequal
/llvmtools/include/math.h:121:1: note: '__isgreaterequal' declared here
__ISREL_DEF(greaterequal, >=, double_t)
^
/llvmtools/include/math.h:105:21: note: expanded from macro '__ISREL_DEF'
static __inline int __is##rel(type __x, type __y) \
^
<scratch space>:557:1: note: expanded from here
__isgreaterequal
^ [17/1875]
In file included from /mnt/cmlfs/sources/llvm/projects/libcxx/src/debug.cpp:15:
In file included from /mnt/cmlfs/sources/llvm/projects/libcxx/build/include/c++/v1/__hash_table:18:
/mnt/cmlfs/sources/llvm/projects/libcxx/build/include/c++/v1/cmath:329:9: error: no member named 'isless' in the global namespace; did you mean '__isless'?
using ::isless;
~~^~~~~~
__isless
/llvmtools/include/math.h:109:1: note: '__isless' declared here
__ISREL_DEF(less, <, double_t)
^
/llvmtools/include/math.h:105:21: note: expanded from macro '__ISREL_DEF'
static __inline int __is##rel(type __x, type __y) \
^
<scratch space>:545:1: note: expanded from here
__isless
^
In file included from /mnt/cmlfs/sources/llvm/projects/libcxx/src/debug.cpp:15:
In file included from /mnt/cmlfs/sources/llvm/projects/libcxx/build/include/c++/v1/__hash_table:18:
/mnt/cmlfs/sources/llvm/projects/libcxx/build/include/c++/v1/cmath:330:9: error: no member named 'islessequal' in the global namespace; did you mean '__islessequal'?
using ::islessequal;
~~^~~~~~~~~~~
__islessequal
/llvmtools/include/math.h:112:1: note: '__islessequal' declared here
__ISREL_DEF(lessequal, <=, double_t)
^
/llvmtools/include/math.h:105:21: note: expanded from macro '__ISREL_DEF'
static __inline int __is##rel(type __x, type __y) \
^
<scratch space>:548:1: note: expanded from here
__islessequal
^
In file included from /mnt/cmlfs/sources/llvm/projects/libcxx/src/debug.cpp:15:
In file included from /mnt/cmlfs/sources/llvm/projects/libcxx/build/include/c++/v1/__hash_table:18:
/mnt/cmlfs/sources/llvm/projects/libcxx/build/include/c++/v1/cmath:331:9: error: no member named 'islessgreater' in the global namespace; did you mean '__islessgreater'?
using ::islessgreater;
~~^~~~~~~~~~~~~
__islessgreater
/llvmtools/include/math.h:115:1: note: '__islessgreater' declared here
__ISREL_DEF(lessgreater, !=, double_t)
^
/llvmtools/include/math.h:105:21: note: expanded from macro '__ISREL_DEF'
static __inline int __is##rel(type __x, type __y) \
^
<scratch space>:551:1: note: expanded from here
__islessgreater
^
In file included from /mnt/cmlfs/sources/llvm/projects/libcxx/src/debug.cpp:15:
In file included from /mnt/cmlfs/sources/llvm/projects/libcxx/build/include/c++/v1/__hash_table:18:
/mnt/cmlfs/sources/llvm/projects/libcxx/build/include/c++/v1/cmath:332:9: error: no member named 'isunordered' in the global namespace
using ::isunordered;
~~^
/mnt/cmlfs/sources/llvm/projects/libcxx/build/include/c++/v1/cmath:333:9: error: no member named 'isunordered' in the global namespace
using ::isunordered;
~~^
13 errors generated.
make[2]: *** [src/CMakeFiles/cxx_shared.dir/build.make:180: src/CMakeFiles/cxx_shared.dir/debug.cpp.o] Error 1
make[2]: Leaving directory '/mnt/cmlfs/sources/llvm/projects/libcxx/build'
make[1]: *** [CMakeFiles/Makefile2:408: src/CMakeFiles/cxx_shared.dir/all] Error 2
make[1]: Leaving directory '/mnt/cmlfs/sources/llvm/projects/libcxx/build'
make: *** [Makefile:130: all] Error 2
make: Leaving directory '/mnt/cmlfs/sources/llvm/projects/libcxx/build'
per owl4ce:
Using -isystem
instead of -I
for CXX flags and build successful
cmake -B build \
-DCMAKE_INSTALL_PREFIX=/llvmtools \
-DLLVM_PATH="${LLVMSRC}" \
-DLIBCXX_ENABLE_SHARED=ON \
-DLIBCXX_ENABLE_STATIC=ON \
-DLIBCXX_HAS_MUSL_LIBC=ON \
-DLIBCXX_USE_COMPILER_RT=ON \
-DLIBCXX_CXX_ABI=libcxxabi \
-DLIBCXX_CXX_ABI_INCLUDE_PATHS="/llvmtools/include" \
-DLIBCXXABI_USE_LLVM_UNWINDER=ON \
-DLIBCXX_CXX_ABI_LIBRARY_PATH=/llvmtools/lib \
-DLIBCXX_INSTALL_HEADERS=ON \
-DCMAKE_CXX_FLAGS="-isystem /llvmtools/include" \
Removed line
-DCMAKE_C_FLAGS="-I/llvmtools/include"
[ 2-llvmtools >> 04-libcxx ] Building libcxx under llvm source fails to build:
Same error if built with make instead of ninja