Open oroppas opened 1 year ago
@llvm/issue-subscribers-libc
Hi, can you try this now with HEAD?
It passed the configuration but failed to link the test:
[314/326] Linking CXX executable libc/test/src/__support/libc_str_to_float_comparison_test
FAILED: libc/test/src/__support/libc_str_to_float_comparison_test
: && /home/ryutas/packages/llvm/build/./bin/clang++ --target=x86_64-pc-linux-gnu -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -O2 -g -DNDEBUG -fuse-ld=lld -Wl,--color-diagnostics libc/test/src/__support/CMakeFiles/libc_str_to_float_comparison_test.dir/str_to_float_comparison_test.cpp.o -o libc/test/src/__support/libc_str_to_float_comparison_test && cd /home/ryutas/packages/llvm/build/runtimes/runtimes-bins/libc/test/src/__support && /home/ryutas/packages/llvm/build/runtimes/runtimes-bins/libc/test/src/__support/libc_str_to_float_comparison_test /home/ryutas/packages/llvm/llvm-project/libc/test/src/__support/str_to_float_comparison_data.txt
/home/ryutas/packages/llvm/build/runtimes/runtimes-bins/libc/test/src/__support/libc_str_to_float_comparison_test: error while loading shared libraries: libunwind.so.1: cannot open shared object file: No such file or directory
[318/326] Building CXX object libc/test/UnitTest/CMakeFiles/LibcUnitTest.dir/LibcTest.cpp.o
ninja: build stopped: subcommand failed.
FAILED: runtimes/runtimes-stamps/runtimes-build /home/ryutas/packages/llvm/build/runtimes/runtimes-stamps/runtimes-build
cd /home/ryutas/packages/llvm/build/runtimes/runtimes-bins && /usr/bin/cmake --build .
ninja: build stopped: subcommand failed.
Can you disable tests with -DLLVM_INCLUDE_TESTS=OFF
?
Yup. It worked!
Hmm, with clean build, I've got the different configure error:
[6169/6207] Performing configure step for 'runtimes'
Not searching for unused variables given on the command line.
-- The C compiler identification is Clang 17.0.0
-- The CXX compiler identification is Clang 17.0.0
-- The ASM compiler identification is Clang with GNU-like command-line
-- Found assembler: /home/ryuta/packages/flang/build/./bin/clang
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - failed
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - failed
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Could NOT find Terminfo (missing: Terminfo_LIBRARIES Terminfo_LINKABLE)
-- Could NOT find ZLIB (missing: ZLIB_LIBRARY) (found version "1.2.12")
-- Found LibXml2: /usr/lib64/libxml2.so (found version "2.10.3")
-- Could NOT find Terminfo (missing: Terminfo_LIBRARIES Terminfo_LINKABLE)
-- Could NOT find ZLIB (missing: ZLIB_LIBRARY) (found version "1.2.12")
-- Performing Test LLVM_RUNTIMES_LINKING_WORKS
-- Performing Test LLVM_RUNTIMES_LINKING_WORKS - Failed
-- Performing Test CXX_SUPPORTS_UNWINDLIB_EQ_NONE_FLAG
-- Performing Test CXX_SUPPORTS_UNWINDLIB_EQ_NONE_FLAG - Failed
-- Performing Test CXX_SUPPORTS_NOSTDLIBXX_FLAG
-- Performing Test CXX_SUPPORTS_NOSTDLIBXX_FLAG - Failed
-- Performing Test CXX_SUPPORTS_NOSTDINCXX_FLAG
-- Performing Test CXX_SUPPORTS_NOSTDINCXX_FLAG - Failed
CMake Warning (dev) at /usr/share/cmake/Modules/GNUInstallDirs.cmake:243 (message):
Unable to determine default CMAKE_INSTALL_LIBDIR directory because no
target architecture is known. Please enable at least one language before
including GNUInstallDirs.
Call Stack (most recent call first):
/home/ryuta/packages/flang/llvm-project/llvm/cmake/modules/AddLLVM.cmake:1 (include)
CMakeLists.txt:156 (include)
This warning is for project developers. Use -Wno-dev to suppress it.
-- Linker detection: LLD
-- Performing Test CXX_SUPPORTS_CUSTOM_LINKER
-- Performing Test CXX_SUPPORTS_CUSTOM_LINKER - Failed
CMake Error at /home/ryuta/packages/flang/llvm-project/llvm/cmake/modules/HandleLLVMOptions.cmake:326 (message):
Host compiler does not support '-fuse-ld=lld'
Call Stack (most recent call first):
CMakeLists.txt:157 (include)
-- Configuring incomplete, errors occurred!
Checking build/runtimes/runtimes-bins/CMakeFiles/CMakeConfigureLog.yaml
kind: "try_compile-v1"
backtrace:
- "/usr/share/cmake/Modules/Internal/CheckSourceCompiles.cmake:101 (try_compile)"
- "/usr/share/cmake/Modules/CheckCXXSourceCompiles.cmake:76 (cmake_check_source_compiles)"
- "/home/ryuta/packages/flang/llvm-project/llvm/cmake/modules/HandleLLVMOptions.cmake:324 (check_cxx_source_compiles)"
- "CMakeLists.txt:157 (include)"
checks:
- "Performing Test CXX_SUPPORTS_CUSTOM_LINKER"
directories:
source: "/home/ryuta/packages/flang/build/runtimes/runtimes-bins/CMakeFiles/CMakeScratch/TryCompile-FpjrYD"
binary: "/home/ryuta/packages/flang/build/runtimes/runtimes-bins/CMakeFiles/CMakeScratch/TryCompile-FpjrYD"
cmakeVariables:
CMAKE_CXX_COMPILER_TARGET: "x86_64-redhat-linux-gnu"
CMAKE_CXX_FLAGS: ""
CMAKE_CXX_FLAGS_DEBUG: "-g"
CMAKE_C_COMPILER_TARGET: "x86_64-redhat-linux-gnu"
CMAKE_EXE_LINKER_FLAGS: " -fuse-ld=lld"
CMAKE_MODULE_PATH: "/home/ryuta/packages/flang/llvm-project/runtimes/cmake;/home/ryuta/packages/flang/llvm-project/runtimes/cmake/modules;/home/ryuta/packages/flang/llvm-project/runtimes/../cmake;/home/ryuta/packages/flang/llvm-project/runtimes/../cmake/Modules;/home/ryuta/packages/flang/llvm-project/runtimes/../llvm/cmake;/home/ryuta/packages/flang/llvm-project/runtimes/../llvm/cmake/modules;/home/ryuta/packages/flang/build/lib/cmake/llvm;/home/ryuta/packages/flang/build/lib/cmake/llvm"
buildResult:
variable: "CXX_SUPPORTS_CUSTOM_LINKER"
cached: true
stdout: |
Change Dir: /home/ryuta/packages/flang/build/runtimes/runtimes-bins/CMakeFiles/CMakeScratch/TryCompile-FpjrYD
Run Build Command(s):/usr/bin/ninja-build -v cmTC_5a78d && [1/2] /home/ryuta/packages/flang/build/./bin/clang++ --target=x86_64-redhat-linux-gnu -DCXX_SUPPORTS_CUSTOM_LINKER -MD -MT CMakeFiles/cmTC_5a78d.dir/src.cxx.o -MF CMakeFiles/cmTC_5a78d.dir/src.cxx.o.d -o CMakeFiles/cmTC_5a78d.dir/src.cxx.o -c /home/ryuta/packages/flang/build/runtimes/runtimes-bins/CMakeFiles/CMakeScratch/TryCompile-FpjrYD/src.cxx
[2/2] : && /home/ryuta/packages/flang/build/./bin/clang++ --target=x86_64-redhat-linux-gnu -fuse-ld=lld CMakeFiles/cmTC_5a78d.dir/src.cxx.o -o cmTC_5a78d && :
FAILED: cmTC_5a78d
: && /home/ryuta/packages/flang/build/./bin/clang++ --target=x86_64-redhat-linux-gnu -fuse-ld=lld CMakeFiles/cmTC_5a78d.dir/src.cxx.o -o cmTC_5a78d && :
ld.lld: error: unable to find library -lunwind
ld.lld: error: unable to find library -lunwind
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
ninja: build stopped: subcommand failed.
exitCode: 1
...
It's having trouble finding libunwind.so
but find build -name "libunwind.*"
finds nothing. There's something wrong with cmake configure sequence?
Hi,
There is an issue with building
libc
withlibunwind
from scratch. Here's how I build:Removing
libc
fromLLVM_ENABLE_RUNTIMES
, the build scceeds.Here's the snippets of the log: