Hi, I'm trying to compile https://github.com/elixir-nx/xla on a FreeBSD 14 x86_64 system.
This project builds well on Linux and OSX, so it should build on FreeBSD.
The author explained their CI builds using GCC 9.x, so I installed gcc9-9.5.0_1 from pkg and tried to build, first using this command:
also
Then both using gmake instead of make, but got similar results.
As you can see in the output, it looks like it uses /usr/local/bin/clang instead of gcc9.
Would anyone take a peek into this?
This project builds well on Linux and OSX, so it should build on FreeBSD.
The author explained their CI builds using GCC 9.x, so I installed gcc9-9.5.0_1 from pkg and tried to build, first using this command:
ROOT_DIR="$(pwd)" BUILD_ARCHIVE="~/xla_extension.tar.gz" make
also
CXXOPTS="-std=c++14" ROOT_DIR="$(pwd)" BUILD_ARCHIVE="~/xla_extension.tar.gz" make
Then both using gmake instead of make, but got similar results.
Code:
ERROR: /usr/home/informemedico/.cache/bazel/_bazel_informemedico/1fd8e3102f291348a56716ebce84006d/external/llvm-project/llvm/BUILD.bazel:219:11: Compiling llvm/lib/Support/APFixedPoint.cpp [for tool] failed: (Exit 1): clang failed: error executing command (from target @llvm-project//llvm:Support) /usr/bin/clang -U_FORTIFY_SOURCE '-D_FORTIFY_SOURCE=1' -fstack-protector -Wall -fno-omit-frame-pointer -g0 -O2 -DNDEBUG -ffunction-sections -fdata-sections '-std=c++0x' -MD -MF ... (remaining 65 arguments skipped)
In file included from external/llvm-project/llvm/lib/Support/APFixedPoint.cpp:14:
In file included from external/llvm-project/llvm/include/llvm/ADT/APFixedPoint.h:19:
In file included from external/llvm-project/llvm/include/llvm/ADT/APSInt.h:18:
In file included from external/llvm-project/llvm/include/llvm/ADT/APInt.h:19:
In file included from external/llvm-project/llvm/include/llvm/Support/MathExtras.h:16:
external/llvm-project/llvm/include/llvm/ADT/bit.h:84:21: error: no template named 'enable_if_t' in namespace 'std'
typename = std::enable_if_t<sizeof(To) == sizeof(From)>,
~~~~~^
external/llvm-project/llvm/include/llvm/ADT/bit.h:85:21: error: no template named 'enable_if_t' in namespace 'std'
typename = std::enable_if_t<std::is_trivially_constructible<To>::value>,
~~~~~^
external/llvm-project/llvm/include/llvm/ADT/bit.h:86:21: error: no template named 'enable_if_t' in namespace 'std'
typename = std::enable_if_t<std::is_trivially_copyable<To>::value>,
~~~~~^
external/llvm-project/llvm/include/llvm/ADT/bit.h:87:21: error: no template named 'enable_if_t' in namespace 'std'
typename = std::enable_if_t<std::is_trivially_copyable<From>::value>>
~~~~~^
external/llvm-project/llvm/include/llvm/ADT/bit.h:99:39: error: no template named 'enable_if_t' in namespace 'std'
template <typename T, typename = std::enable_if_t<std::is_integral_v<T>>>
~~~~~^
external/llvm-project/llvm/include/llvm/ADT/bit.h:99:56: error: no template named 'is_integral_v' in namespace 'std'; did you mean 'is_integral'?
As you can see in the output, it looks like it uses /usr/local/bin/clang instead of gcc9.
Would anyone take a peek into this?