Skip to content

Instantly share code, notes, and snippets.

@ADKaster
Created July 22, 2022 21:07
Show Gist options
  • Save ADKaster/2b6284bd23b75e68490fc970e6dd75da to your computer and use it in GitHub Desktop.
Save ADKaster/2b6284bd23b75e68490fc970e6dd75da to your computer and use it in GitHub Desktop.
check-cxx lit compile error on SerenityOS
ninja: Entering directory `llvm-build'
[0/1] cd /home/anon/llvm-build/runtimes/runtimes-bins && /usr/local/bin/cmake --build /home/anon/llvm-build/runtimes/runtimes-bins/ --target check-cxx --config Debug
[0/1] Running libcxx tests
llvm-lit: /home/anon/llvm-build/runtimes/runtimes-bins/libcxx/test/lit.site.cfg:63: note: Using configuration variant: libcxx
llvm-lit: /home/anon/llvm-project-14.0.1.src/libcxx/utils/libcxx/test/newconfig.py:23: note: Applied 'add Lit feature target=x86_64-pc-serenity' as a result of parameter 'target_triple=x86_64-pc-serenity'
llvm-lit: /home/anon/llvm-project-14.0.1.src/libcxx/utils/libcxx/test/newconfig.py:23: note: Applied 'add --target=x86_64-pc-serenity to %{flags}' as a result of parameter 'target_triple=x86_64-pc-serenity'
llvm-lit: /home/anon/llvm-project-14.0.1.src/libcxx/utils/libcxx/test/newconfig.py:23: note: Applied 'add substitution %{triple} = x86_64-pc-serenity' as a result of parameter 'target_triple=x86_64-pc-serenity'
llvm-lit: /home/anon/llvm-project-14.0.1.src/libcxx/utils/libcxx/test/newconfig.py:23: note: Applied 'add Lit feature c++2b' as a result of parameter 'std=c++2b (default)'
llvm-lit: /home/anon/llvm-project-14.0.1.src/libcxx/utils/libcxx/test/newconfig.py:23: note: Applied 'add -std=c++2b to %{compile_flags}' as a result of parameter 'std=c++2b (default)'
llvm-lit: /home/anon/llvm-project-14.0.1.src/libcxx/utils/libcxx/test/newconfig.py:23: note: Applied 'add Lit feature stdlib=llvm-libc++' as a result of parameter 'stdlib=llvm-libc++ (default)'
llvm-lit: /home/anon/llvm-project-14.0.1.src/libcxx/utils/libcxx/test/newconfig.py:23: note: Applied 'add Lit feature stdlib=libc++' as a result of parameter 'stdlib=llvm-libc++ (default)'
llvm-lit: /home/anon/llvm-project-14.0.1.src/libcxx/utils/libcxx/test/newconfig.py:23: note: Applied 'add -Werror to %{compile_flags}' as a result of parameter 'enable_warnings=True (default)'
llvm-lit: /home/anon/llvm-project-14.0.1.src/libcxx/utils/libcxx/test/newconfig.py:23: note: Applied 'add -Wall to %{compile_flags}' as a result of parameter 'enable_warnings=True (default)'
llvm-lit: /home/anon/llvm-project-14.0.1.src/libcxx/utils/libcxx/test/newconfig.py:23: note: Applied 'add -Wextra to %{compile_flags}' as a result of parameter 'enable_warnings=True (default)'
llvm-lit: /home/anon/llvm-project-14.0.1.src/libcxx/utils/libcxx/test/newconfig.py:23: note: Applied 'add -Wshadow to %{compile_flags}' as a result of parameter 'enable_warnings=True (default)'
llvm-lit: /home/anon/llvm-project-14.0.1.src/libcxx/utils/libcxx/test/newconfig.py:23: note: Applied 'add -Wundef to %{compile_flags}' as a result of parameter 'enable_warnings=True (default)'
llvm-lit: /home/anon/llvm-project-14.0.1.src/libcxx/utils/libcxx/test/newconfig.py:23: note: Applied 'add -Wno-unused-command-line-argument to %{compile_flags}' as a result of parameter 'enable_warnings=True (default)'
llvm-lit: /home/anon/llvm-project-14.0.1.src/libcxx/utils/libcxx/test/newconfig.py:23: note: Applied 'add -Wno-attributes to %{compile_flags}' as a result of parameter 'enable_warnings=True (default)'
llvm-lit: /home/anon/llvm-project-14.0.1.src/libcxx/utils/libcxx/test/newconfig.py:23: note: Applied 'add -Wno-pessimizing-move to %{compile_flags}' as a result of parameter 'enable_warnings=True (default)'
llvm-lit: /home/anon/llvm-project-14.0.1.src/libcxx/utils/libcxx/test/newconfig.py:23: note: Applied 'add -Wno-c++11-extensions to %{compile_flags}' as a result of parameter 'enable_warnings=True (default)'
llvm-lit: /home/anon/llvm-project-14.0.1.src/libcxx/utils/libcxx/test/newconfig.py:23: note: Applied 'add -Wno-user-defined-literals to %{compile_flags}' as a result of parameter 'enable_warnings=True (default)'
llvm-lit: /home/anon/llvm-project-14.0.1.src/libcxx/utils/libcxx/test/newconfig.py:23: note: Applied 'add -Wno-noexcept-type to %{compile_flags}' as a result of parameter 'enable_warnings=True (default)'
llvm-lit: /home/anon/llvm-project-14.0.1.src/libcxx/utils/libcxx/test/newconfig.py:23: note: Applied 'add -Wno-aligned-allocation-unavailable to %{compile_flags}' as a result of parameter 'enable_warnings=True (default)'
llvm-lit: /home/anon/llvm-project-14.0.1.src/libcxx/utils/libcxx/test/newconfig.py:23: note: Applied 'add -Wno-atomic-alignment to %{compile_flags}' as a result of parameter 'enable_warnings=True (default)'
llvm-lit: /home/anon/llvm-project-14.0.1.src/libcxx/utils/libcxx/test/newconfig.py:23: note: Applied 'add -Wno-sized-deallocation to %{compile_flags}' as a result of parameter 'enable_warnings=True (default)'
llvm-lit: /home/anon/llvm-project-14.0.1.src/libcxx/utils/libcxx/test/newconfig.py:23: note: Applied 'add -Wsign-compare to %{compile_flags}' as a result of parameter 'enable_warnings=True (default)'
llvm-lit: /home/anon/llvm-project-14.0.1.src/libcxx/utils/libcxx/test/newconfig.py:23: note: Applied 'add -Wunused-variable to %{compile_flags}' as a result of parameter 'enable_warnings=True (default)'
llvm-lit: /home/anon/llvm-project-14.0.1.src/libcxx/utils/libcxx/test/newconfig.py:23: note: Applied 'add -Wunused-parameter to %{compile_flags}' as a result of parameter 'enable_warnings=True (default)'
llvm-lit: /home/anon/llvm-project-14.0.1.src/libcxx/utils/libcxx/test/newconfig.py:23: note: Applied 'add -Wunreachable-code to %{compile_flags}' as a result of parameter 'enable_warnings=True (default)'
llvm-lit: /home/anon/llvm-project-14.0.1.src/libcxx/utils/libcxx/test/newconfig.py:23: note: Applied 'add -Wno-unused-local-typedef to %{compile_flags}' as a result of parameter 'enable_warnings=True (default)'
llvm-lit: /home/anon/llvm-project-14.0.1.src/libcxx/utils/libcxx/test/newconfig.py:23: note: Applied 'add Lit feature c++experimental' as a result of parameter 'enable_experimental=True (default)'
llvm-lit: /home/anon/llvm-project-14.0.1.src/libcxx/utils/libcxx/test/newconfig.py:23: note: Applied 'prepend -lc++experimental to %{link_flags}' as a result of parameter 'enable_experimental=True (default)'
llvm-lit: /home/anon/llvm-project-14.0.1.src/libcxx/utils/libcxx/test/newconfig.py:23: note: Applied 'add Lit feature long_tests' as a result of parameter 'long_tests=True (default)'
llvm-lit: /home/anon/llvm-project-14.0.1.src/libcxx/utils/libcxx/test/newconfig.py:23: note: Applied 'add -D_LIBCPP_DISABLE_AVAILABILITY to %{compile_flags}' as a result of parameter 'use_system_cxx_lib=False (default)'
llvm-lit: /home/anon/llvm-project-14.0.1.src/libcxx/utils/libcxx/test/newconfig.py:32: note: Applied 'add Lit feature fcoroutines-ts' as a result of implicitly detected feature 'fcoroutines-ts'
llvm-lit: /home/anon/llvm-project-14.0.1.src/libcxx/utils/libcxx/test/newconfig.py:32: note: Applied 'add -fcoroutines-ts to %{compile_flags}' as a result of implicitly detected feature 'fcoroutines-ts'
llvm-lit: /home/anon/llvm-project-14.0.1.src/libcxx/utils/libcxx/test/newconfig.py:32: note: Applied 'add Lit feature thread-safety' as a result of implicitly detected feature 'thread-safety'
llvm-lit: /home/anon/llvm-project-14.0.1.src/libcxx/utils/libcxx/test/newconfig.py:32: note: Applied 'add -Werror=thread-safety to %{compile_flags}' as a result of implicitly detected feature 'thread-safety'
llvm-lit: /home/anon/llvm-project-14.0.1.src/libcxx/utils/libcxx/test/newconfig.py:32: note: Applied 'add Lit feature diagnose-if-support' as a result of implicitly detected feature 'diagnose-if-support'
llvm-lit: /home/anon/llvm-project-14.0.1.src/libcxx/utils/libcxx/test/newconfig.py:32: note: Applied 'add -Wuser-defined-warnings to %{compile_flags}' as a result of implicitly detected feature 'diagnose-if-support'
llvm-lit: /home/anon/llvm-project-14.0.1.src/libcxx/utils/libcxx/test/newconfig.py:32: note: Applied 'add Lit feature has-fblocks' as a result of implicitly detected feature 'has-fblocks'
llvm-lit: /home/anon/llvm-project-14.0.1.src/libcxx/utils/libcxx/test/newconfig.py:32: note: Applied 'add Lit feature -fsized-deallocation' as a result of implicitly detected feature '-fsized-deallocation'
llvm-lit: /home/anon/llvm-project-14.0.1.src/libcxx/utils/libcxx/test/newconfig.py:32: note: Applied 'add Lit feature -faligned-allocation' as a result of implicitly detected feature '-faligned-allocation'
llvm-lit: /home/anon/llvm-project-14.0.1.src/libcxx/utils/libcxx/test/newconfig.py:32: note: Applied 'add Lit feature fdelayed-template-parsing' as a result of implicitly detected feature 'fdelayed-template-parsing'
llvm-lit: /home/anon/llvm-project-14.0.1.src/libcxx/utils/libcxx/test/newconfig.py:32: note: Applied 'add Lit feature objective-c++' as a result of implicitly detected feature 'objective-c++'
llvm-lit: /home/anon/llvm-project-14.0.1.src/libcxx/utils/libcxx/test/newconfig.py:32: note: Applied 'add Lit feature verify-support' as a result of implicitly detected feature 'verify-support'
llvm-lit: /home/anon/llvm-project-14.0.1.src/libcxx/utils/libcxx/test/newconfig.py:32: note: Applied 'add Lit feature clang' as a result of implicitly detected feature 'clang'
llvm-lit: /home/anon/llvm-project-14.0.1.src/libcxx/utils/libcxx/test/newconfig.py:32: note: Applied 'add -D_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER to %{compile_flags}' as a result of implicitly detected feature 'clang'
llvm-lit: /home/anon/llvm-project-14.0.1.src/libcxx/utils/libcxx/test/newconfig.py:32: note: Applied 'add Lit feature clang-14' as a result of implicitly detected feature 'clang-14'
llvm-lit: /home/anon/llvm-project-14.0.1.src/libcxx/utils/libcxx/test/newconfig.py:32: note: Applied 'add Lit feature clang-14.0' as a result of implicitly detected feature 'clang-14.0'
llvm-lit: /home/anon/llvm-project-14.0.1.src/libcxx/utils/libcxx/test/newconfig.py:32: note: Applied 'add Lit feature clang-14.0.1' as a result of implicitly detected feature 'clang-14.0.1'
llvm-lit: /home/anon/llvm-project-14.0.1.src/libcxx/utils/libcxx/test/newconfig.py:32: note: Applied 'add Lit feature libcpp-has-thread-api-pthread' as a result of implicitly detected feature 'libcpp-has-thread-api-pthread'
llvm-lit: /home/anon/llvm-project-14.0.1.src/libcxx/utils/libcxx/test/newconfig.py:32: note: Applied 'add -Wno-macro-redefined -D_LIBCPP_HAS_THREAD_API_PTHREAD to %{compile_flags}' as a result of implicitly detected feature 'libcpp-has-thread-api-pthread=1'
llvm-lit: /home/anon/llvm-project-14.0.1.src/libcxx/utils/libcxx/test/newconfig.py:32: note: Applied 'add Lit feature libcpp-abi-version=1' as a result of implicitly detected feature 'libcpp-abi-version=1'
llvm-lit: /home/anon/llvm-project-14.0.1.src/libcxx/utils/libcxx/test/newconfig.py:32: note: Applied 'add -Wno-macro-redefined -D_LIBCPP_ABI_VERSION=1 to %{compile_flags}' as a result of implicitly detected feature 'libcpp-abi-version=1'
llvm-lit: /home/anon/llvm-project-14.0.1.src/libcxx/utils/libcxx/test/newconfig.py:32: note: Applied 'add Lit feature libcpp-has-no-incomplete-format' as a result of implicitly detected feature 'libcpp-has-no-incomplete-format'
llvm-lit: /home/anon/llvm-project-14.0.1.src/libcxx/utils/libcxx/test/newconfig.py:32: note: Applied 'add -Wno-macro-redefined -D_LIBCPP_HAS_NO_INCOMPLETE_FORMAT to %{compile_flags}' as a result of implicitly detected feature 'libcpp-has-no-incomplete-format'
llvm-lit: /home/anon/llvm-project-14.0.1.src/libcxx/utils/libcxx/test/newconfig.py:32: note: Applied 'add Lit feature libcpp-has-no-incomplete-ranges' as a result of implicitly detected feature 'libcpp-has-no-incomplete-ranges'
llvm-lit: /home/anon/llvm-project-14.0.1.src/libcxx/utils/libcxx/test/newconfig.py:32: note: Applied 'add -Wno-macro-redefined -D_LIBCPP_HAS_NO_INCOMPLETE_RANGES to %{compile_flags}' as a result of implicitly detected feature 'libcpp-has-no-incomplete-ranges'
llvm-lit: /home/anon/llvm-project-14.0.1.src/llvm/utils/lit/lit/TestingConfig.py:103: fatal: unable to parse config file '/home/anon/llvm-build/runtimes/runtimes-bins/libcxx/test/lit.site.cfg', traceback: Traceback (most recent call last):
File "/home/anon/llvm-project-14.0.1.src/llvm/utils/lit/lit/TestingConfig.py", line 92, in load_from_path
exec(compile(data, path, 'exec'), cfg_globals, None)
File "/home/anon/llvm-build/runtimes/runtimes-bins/libcxx/test/lit.site.cfg", line 66, in <module>
configuration.configure()
File "/home/anon/llvm-project-14.0.1.src/libcxx/utils/libcxx/test/config.py", line 138, in configure
libcxx.test.newconfig.configure(
File "/home/anon/llvm-project-14.0.1.src/libcxx/utils/libcxx/test/newconfig.py", line 29, in configure
actions = feature.getActions(config)
File "/home/anon/llvm-project-14.0.1.src/libcxx/utils/libcxx/test/dsl.py", line 532, in getActions
if not self._isSupported(config):
File "/home/anon/llvm-project-14.0.1.src/libcxx/utils/libcxx/test/features.py", line 165, in <lambda>
when=lambda cfg, alts=alts: hasAnyLocale(cfg, alts)))
File "/home/anon/llvm-project-14.0.1.src/libcxx/utils/libcxx/test/dsl.py", line 64, in f
cache[cacheKey] = function(config, *args, **kwargs)
File "/home/anon/llvm-project-14.0.1.src/libcxx/utils/libcxx/test/dsl.py", line 233, in hasAnyLocale
programOutput(config, program, args=[pipes.quote(l) for l in locales])
File "/home/anon/llvm-project-14.0.1.src/libcxx/utils/libcxx/test/dsl.py", line 64, in f
cache[cacheKey] = function(config, *args, **kwargs)
File "/home/anon/llvm-project-14.0.1.src/libcxx/utils/libcxx/test/dsl.py", line 168, in programOutput
raise ConfigurationCompilationError("Failed to build program, stderr is:\n{}".format(err))
libcxx.test.dsl.ConfigurationCompilationError: Failed to build program, stderr is:
# command stderr:
clang version 14.0.1 (git@github.com:IdanHo/serenity.git 024a7710c6e619aa2ef732fdde0e0e2f0fccf620)
Target: x86_64-pc-serenity
Thread model: posix
InstalledDir: /usr/local/bin
"/usr/local/bin/clang-14" -cc1 -triple x86_64-pc-serenity -emit-obj -mrelax-all --mrelax-relocations -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name tmpsqjd3g3q.cpp -mrelocation-model pic -pic-level 2 -fhalf-no-semantic-interposition -mframe-pointer=all -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu x86-64 -tune-cpu generic -mllvm -treat-scalable-fixed-error-as-warning -debugger-tuning=gdb -v -fcoverage-compilation-dir=/home/anon/llvm-build/runtimes/runtimes-bins/libcxx/test/__config_exec__ -nostdinc++ -resource-dir /usr/local/lib/clang/14.0.1 -I /home/anon/llvm-build/include/x86_64-pc-serenity/c++/v1 -I /home/anon/llvm-build/include/c++/v1 -I /home/anon/llvm-build/runtimes/runtimes-bins/libcxx/include/c++build -I /home/anon/llvm-project-14.0.1.src/libcxx/test/support -D _LIBCPP_DISABLE_AVAILABILITY -D _LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER -D _LIBCPP_HAS_THREAD_API_PTHREAD -D _LIBCPP_ABI_VERSION=1 -D _LIBCPP_HAS_NO_INCOMPLETE_FORMAT -D _LIBCPP_HAS_NO_INCOMPLETE_RANGES -internal-isystem /usr/local/lib/clang/14.0.1/include -internal-isystem /usr/local/include -internal-isystem /usr/include -Werror -Wall -Wextra -Wshadow -Wundef -Wno-unused-command-line-argument -Wno-attributes -Wno-pessimizing-move -Wno-c++11-extensions -Wno-user-defined-literals -Wno-noexcept-type -Wno-atomic-alignment -Wsign-compare -Wunused-variable -Wunused-parameter -Wunreachable-code -Wno-unused-local-typedef -Werror=thread-safety -Wuser-defined-warnings -Wno-macro-redefined -Wno-macro-redefined -Wno-macro-redefined -Wno-macro-redefined -std=c++2b -fdeprecated-macro -fdebug-compilation-dir=/home/anon/llvm-build/runtimes/runtimes-bins/libcxx/test/__config_exec__ -ferror-limit 19 -ftls-model=initial-exec -stack-protector 2 -fcoroutines-ts -fgnuc-version=4.2.1 -fcxx-exceptions -fexceptions -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /tmp/tmpsqjd3g3q-3e9e9e.o -x c++ /home/anon/llvm-build/runtimes/runtimes-bins/libcxx/test/__config_src__/tmpsqjd3g3q.cpp
clang -cc1 version 14.0.1 based upon LLVM 14.0.1 default target x86_64-pc-serenity
ignoring duplicate directory "/usr/local/include"
ignoring duplicate directory "/usr/local/lib/clang/14.0.1/include"
ignoring duplicate directory "/usr/include"
#include "..." search starts here:
#include <...> search starts here:
/home/anon/llvm-build/include/x86_64-pc-serenity/c++/v1
/home/anon/llvm-build/include/c++/v1
/home/anon/llvm-build/runtimes/runtimes-bins/libcxx/include/c++build
/home/anon/llvm-project-14.0.1.src/libcxx/test/support
/usr/local/lib/clang/14.0.1/include
/usr/local/include
/usr/include
End of search list.
"/usr/local/bin/ld.lld" -pie -dynamic-linker /usr/lib/Loader.so --eh-frame-hdr -o /home/anon/llvm-build/runtimes/runtimes-bins/libcxx/test/__config_exec__/Output/tmpsqjd3g3q.cpp.dir/t.tmp.exe --pack-dyn-relocs=relr /usr/lib/crt0.o /usr/lib/crti.o /usr/local/lib/clang/14.0.1/lib/serenity/clang_rt.crtbegin-x86_64.o -L/home/anon/llvm-build/./lib/x86_64-pc-serenity -L/home/anon/llvm-build/./lib/x86_64-pc-serenity -L/usr/local/lib -L/usr/lib /tmp/tmpsqjd3g3q-3e9e9e.o -lc++experimental -rpath /home/anon/llvm-build/./lib/x86_64-pc-serenity -rpath /home/anon/llvm-build/./lib/x86_64-pc-serenity -lc++ /usr/local/lib/clang/14.0.1/lib/serenity/clang_rt.crtend-x86_64.o /usr/lib/crtn.o
ld.lld: error: undefined symbol: environ
>>> referenced by crt0.cpp:35 (./Build/x86_64clang/./Userland/Libraries/LibC/crt0.cpp:35)
>>> /usr/lib/crt0.o:(_entry)
ld.lld: error: undefined symbol: __environ_is_malloced
>>> referenced by crt0.cpp:36 (./Build/x86_64clang/./Userland/Libraries/LibC/crt0.cpp:36)
>>> /usr/lib/crt0.o:(_entry)
ld.lld: error: undefined symbol: __begin_atexit_locking
>>> referenced by crt0.cpp:37 (./Build/x86_64clang/./Userland/Libraries/LibC/crt0.cpp:37)
>>> /usr/lib/crt0.o:(_entry)
ld.lld: error: undefined symbol: s_global_initializers_ran
>>> referenced by crt0.cpp:39 (./Build/x86_64clang/./Userland/Libraries/LibC/crt0.cpp:39)
>>> /usr/lib/crt0.o:(_entry)
ld.lld: error: undefined symbol: exit
>>> referenced by crt0.cpp:45 (./Build/x86_64clang/./Userland/Libraries/LibC/crt0.cpp:45)
>>> /usr/lib/crt0.o:(_entry)
ld.lld: error: undefined symbol: setlocale
>>> referenced by tmpsqjd3g3q.cpp
>>> /tmp/tmpsqjd3g3q-3e9e9e.o:(main)
clang-14: error: linker command failed with exit code 1 (use -v to see invocation)
error: command failed with exit status: 1
FAILED: libcxx/test/CMakeFiles/check-cxx /home/anon/llvm-build/runtimes/runtimes-bins/libcxx/test/CMakeFiles/check-cxx
cd /home/anon/llvm-build/runtimes/runtimes-bins/libcxx/test && /usr/local/bin/python3.10 /home/anon/llvm-build/./bin/llvm-lit -sv /home/anon/llvm-build/runtimes/runtimes-bins/libcxx/test
ninja: build stopped: subcommand failed.
FAILED: runtimes/CMakeFiles/check-cxx /home/anon/llvm-build/runtimes/CMakeFiles/check-cxx
cd /home/anon/llvm-build/runtimes/runtimes-bins && /usr/local/bin/cmake --build /home/anon/llvm-build/runtimes/runtimes-bins/ --target check-cxx --config Debug
ninja: build stopped: subcommand failed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment