Definitely, building LLVM is a huge challenge if you want make check-all
to pass all tests, and the reason seems to be all this automatic logic. The build system insists in getting all the OSX settings automatically, which means the only way to succeed is to build for the defaults (ie: no universal build, no static libc++, and build only for the SDKROOT in the Xcode version you install, and with a default deployment target equal to the OSX version you are running). All the automatic guessing that the build does would be reasonable if LLVM was not for developers, but if you are a developer, you probably have your development settings chosen, and you want to use your settings, with no automatic logic at all. I think that if the LLVM system required you to define your OSX environment manually, most of the nightmares would be gone.
I build LLVM from time to time only (last time was 7.0.0), because it always takes me about 3-4 days to get a build that passes all or almost all make check-all
tests, but with 16.0.6, getting a universal build with static libc++ and static libomp seems to be beyond my reach (I’ve been now trying to succeed for a week). The build always finishes, but with a lot of make check-all
failures (sometimes hundreds, sometimes thousands)… I’m just a step from surrendering, and go back to the Xcode Apple build of llvm, and lose all the control I had over using a specific compiler version whose build I can control.
I almost got it, with a build which had just a dozen failures whose reason I knew and I thought I could fix, but then, out of a sudden, in the next build I got thousands of failures that I cannot debug, with this message:
********************
FAIL: llvm-libc++-shared.cfg.in :: std/utilities/format/format.range/format.range.fmtmap/format.functions.format.pass.cpp (76555 of 77731)
******************** TEST 'llvm-libc++-shared.cfg.in :: std/utilities/format/format.range/format.range.fmtmap/format.functions.format.pass.cpp' FAILED ********************
Script:
--
: 'COMPILED WITH'; /Users/programming/src/LLVM/16.0.6/build/./bin/clang++ /Users/programming/src/LLVM/16.0.6/src/llvm-project-16.0.6.src/libcxx/test/std/utilities/format/format.range/format.range.fmtmap/format.functions.format.pass.cpp -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk --target=x86_64-apple-darwin21.6.0 -nostdinc++ -I /Users/programming/src/LLVM/16.0.6/build/include/c++/v1 -I /Users/programming/src/LLVM/16.0.6/build/include/c++/v1 -I /Users/programming/src/LLVM/16.0.6/src/llvm-project-16.0.6.src/libcxx/test/support -std=c++2b -Werror -Wall -Wctad-maybe-unsupported -Wextra -Wshadow -Wundef -Wno-unused-command-line-argument -Wno-attributes -Wno-pessimizing-move -Wno-c++11-extensions -Wno-noexcept-type -Wno-atomic-alignment -Wno-user-defined-literals -Wno-tautological-compare -Wsign-compare -Wunused-variable -Wunused-parameter -Wunreachable-code -Wno-unused-local-typedef -D_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER -D_LIBCPP_ENABLE_EXPERIMENTAL -D_LIBCPP_DISABLE_AVAILABILITY -Werror=thread-safety -Wuser-defined-warnings -lc++experimental -nostdlib++ -L /Users/programming/src/LLVM/16.0.6/build/./lib -Wl,-rpath,/Users/programming/src/LLVM/16.0.6/build/./lib -lc++ -pthread -o /Users/programming/src/LLVM/16.0.6/build/runtimes/runtimes-bins/test/std/utilities/format/format.range/format.range.fmtmap/Output/format.functions.format.pass.cpp.dir/t.tmp.exe
: 'EXECUTED AS'; "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/bin/python3.9" /Users/programming/src/LLVM/16.0.6/src/llvm-project-16.0.6.src/libcxx/test/../utils/run.py --execdir /Users/programming/src/LLVM/16.0.6/build/runtimes/runtimes-bins/test/std/utilities/format/format.range/format.range.fmtmap/Output/format.functions.format.pass.cpp.dir -- /Users/programming/src/LLVM/16.0.6/build/runtimes/runtimes-bins/test/std/utilities/format/format.range/format.range.fmtmap/Output/format.functions.format.pass.cpp.dir/t.tmp.exe
--
Exit Code: 245
Command Output (stdout):
--
$ ":" "COMPILED WITH"
$ "/Users/programming/src/LLVM/16.0.6/build/./bin/clang++" "/Users/programming/src/LLVM/16.0.6/src/llvm-project-16.0.6.src/libcxx/test/std/utilities/format/format.range/format.range.fmtmap/format.functions.format.pass.cpp" "-isysroot" "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk" "--target=x86_64-apple-darwin21.6.0" "-nostdinc++" "-I" "/Users/programming/src/LLVM/16.0.6/build/include/c++/v1" "-I" "/Users/programming/src/LLVM/16.0.6/build/include/c++/v1" "-I" "/Users/programming/src/LLVM/16.0.6/src/llvm-project-16.0.6.src/libcxx/test/support" "-std=c++2b" "-Werror" "-Wall" "-Wctad-maybe-unsupported" "-Wextra" "-Wshadow" "-Wundef" "-Wno-unused-command-line-argument" "-Wno-attributes" "-Wno-pessimizing-move" "-Wno-c++11-extensions" "-Wno-noexcept-type" "-Wno-atomic-alignment" "-Wno-user-defined-literals" "-Wno-tautological-compare" "-Wsign-compare" "-Wunused-variable" "-Wunused-parameter" "-Wunreachable-code" "-Wno-unused-local-typedef" "-D_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER" "-D_LIBCPP_ENABLE_EXPERIMENTAL" "-D_LIBCPP_DISABLE_AVAILABILITY" "-Werror=thread-safety" "-Wuser-defined-warnings" "-lc++experimental" "-nostdlib++" "-L" "/Users/programming/src/LLVM/16.0.6/build/./lib" "-Wl,-rpath,/Users/programming/src/LLVM/16.0.6/build/./lib" "-lc++" "-pthread" "-o" "/Users/programming/src/LLVM/16.0.6/build/runtimes/runtimes-bins/test/std/utilities/format/format.range/format.range.fmtmap/Output/format.functions.format.pass.cpp.dir/t.tmp.exe"
$ ":" "EXECUTED AS"
$ "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/bin/python3.9" "/Users/programming/src/LLVM/16.0.6/src/llvm-project-16.0.6.src/libcxx/test/../utils/run.py" "--execdir" "/Users/programming/src/LLVM/16.0.6/build/runtimes/runtimes-bins/test/std/utilities/format/format.range/format.range.fmtmap/Output/format.functions.format.pass.cpp.dir" "--" "/Users/programming/src/LLVM/16.0.6/build/runtimes/runtimes-bins/test/std/utilities/format/format.range/format.range.fmtmap/Output/format.functions.format.pass.cpp.dir/t.tmp.exe"
note: command had no output on stdout or stderr
error: command failed with exit status: 245
--
So, the only info it gives me is: command failed with exit status: 245
. I don’t know why these thousands of errors suddenly appeared.
I think I need to go for a walk, think, and decide.