tpoechtrager / osxcross

Mac OS X cross toolchain for Linux, FreeBSD, OpenBSD and Android (Termux)
GNU General Public License v2.0
2.81k stars 320 forks source link

./build_clang.sh - fails in build_stage2 #354

Open MrCyjaneK opened 1 year ago

MrCyjaneK commented 1 year ago

Hey! I'm unable to run './build_clang.sh', first stage finish without errors but second one returns like this:

[  0%] Building CXX object utils/benchmark/src/CMakeFiles/benchmark.dir/complexity.cc.o
cd /home/weare/Pulpit/Software/osxcross/build/llvm-10.0.1.src/build_stage2/utils/benchmark/src && /home/weare/Pulpit/Software/osxcross/build/llvm-10.0.1.src/build_stage1/bin/clang++  -DHAVE_POSIX_REGEX -DHAVE_STD_REGEX -DHAVE_STEADY_CLOCK -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/weare/Pulpit/Software/osxcross/build/llvm-10.0.1.src/build_stage2/utils/benchmark/src -I/home/weare/Pulpit/Software/osxcross/build/llvm-10.0.1.src/utils/benchmark/src -I/usr/include/libxml2 -I/home/weare/Pulpit/Software/osxcross/build/llvm-10.0.1.src/build_stage2/include -I/home/weare/Pulpit/Software/osxcross/build/llvm-10.0.1.src/include -I/home/weare/Pulpit/Software/osxcross/build/llvm-10.0.1.src/utils/benchmark/include -I/home/weare/Pulpit/Software/osxcross/build/llvm-10.0.1.src/utils/benchmark/src/../include  -march=native -fPIC -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wstring-conversion -ffunction-sections -fdata-sections  -std=c++11  -Wall  -Wextra  -Wshadow  -pedantic  -pedantic-errors  -Wshorten-64-to-32  -Wfloat-equal  -fstrict-aliasing  -fno-exceptions  -Wstrict-aliasing  -Wthread-safety -O3 -DNDEBUG   -std=c++14 -o CMakeFiles/benchmark.dir/complexity.cc.o -c /home/weare/Pulpit/Software/osxcross/build/llvm-10.0.1.src/utils/benchmark/src/complexity.cc
/home/weare/Pulpit/Software/osxcross/build/llvm-10.0.1.src/utils/benchmark/src/benchmark_register.h:17:18: error: default initialization of an object of const type 'const long'
  static const T kmax = std::numeric_limits<T>::max();
                 ^
                      = 0
/home/weare/Pulpit/Software/osxcross/build/llvm-10.0.1.src/utils/benchmark/src/benchmark_register.cc:270:3: note: in instantiation of function template specialization 'AddRange<long>' requested here
  AddRange(&arglist, start, limit, range_multiplier_);
  ^
In file included from /home/weare/Pulpit/Software/osxcross/build/llvm-10.0.1.src/utils/benchmark/src/benchmark_register.cc:15:
/home/weare/Pulpit/Software/osxcross/build/llvm-10.0.1.src/utils/benchmark/src/benchmark_register.h:17:18: error: default initialization of an object of const type 'const int'
  static const T kmax = std::numeric_limits<T>::max();
                 ^
                      = 0
/home/weare/Pulpit/Software/osxcross/build/llvm-10.0.1.src/utils/benchmark/src/benchmark_register.cc:417:3: note: in instantiation of function template specialization 'AddRange<int>' requested here
  AddRange(&thread_counts_, min_threads, max_threads, 2);
  ^
5 errors generated.
make[2]: *** [utils/benchmark/src/CMakeFiles/benchmark.dir/build.make:76: utils/benchmark/src/CMakeFiles/benchmark.dir/benchmark_register.cc.o] Error 1
make[2]: *** Waiting for unfinished jobs....

I'm running a ubuntu 22.04 fork (Pop!_OS) with all up to date packages, I've tried using both system-wide clang and the one that is recommended in readme (PATH=/opt/cmake-3.14.5-Linux-x86_64/bin:$PATH INSTALLPREFIX=/opt/clang ./build_clang.sh).