llvm / llvm-project

The LLVM Project is a collection of modular and reusable compiler and toolchain technologies.
http://llvm.org
Other
26.77k stars 10.97k forks source link

LLVM from sources and hang after "Looking for __cxa_throw in stdc++ - found" #39041

Open 70311826-e6d8-4d29-8604-c4ec4bfa7f0d opened 5 years ago

70311826-e6d8-4d29-8604-c4ec4bfa7f0d commented 5 years ago
Bugzilla Link 39693
Version 7.0
OS MacOS X
CC @noloader

Extended Description

I'm working on an old PowerMac. I am trying to build LLVM/Clang from sources. MacPorts does not provide an updated Clang compiler. I am bootstrapping the process with MacPorts GCC 5 compiler (to satisfy the GCC 4.8 minimum).

My build script works fine on Fedora 29 x86_64. On the PowerMac it is having some trouble. The build script is at https://github.com/noloader/build-llvm .

On the PowerMac the script hangs at:

-- Performing Test COMPILER_RT_HAS_WD4722_FLAG -- Performing Test COMPILER_RT_HAS_WD4722_FLAG - Failed -- Performing Test COMPILER_RT_HAS_WD4800_FLAG -- Performing Test COMPILER_RT_HAS_WD4800_FLAG - Failed -- Looking for func -- Looking for func - found -- Looking for dlopen in dl -- Looking for dlopen in dl - found -- Looking for shm_open in rt -- Looking for shm_open in rt - not found -- Looking for pow in m -- Looking for pow in m - found -- Looking for pthread_create in pthread -- Looking for pthread_create in pthread - found -- Looking for cxa_throw in c++ -- Looking for __cxa_throw in c++ - not found -- Looking for cxa_throw in stdc++ -- Looking for __cxa_throw in stdc++ - found

70311826-e6d8-4d29-8604-c4ec4bfa7f0d commented 5 years ago

Running Cmake with --debug-output shows the following. I'm not sure what to make of it, though.

... -- Looking for __cxa_throw in c++ - not found Called from: [3] /opt/local/share/cmake-3.12/Modules/CheckLibraryExists.cmake [2] /Users/test/llvm_source/llvm/projects/compiler-rt/cmake/config-ix.cmake [1] /Users/test/llvm_source/llvm/projects/compiler-rt/CMakeLists.txt -- Looking for __cxa_throw in stdc++ Called from: [3] /opt/local/share/cmake-3.12/Modules/CheckLibraryExists.cmake [2] /Users/test/llvm_source/llvm/projects/compiler-rt/cmake/config-ix.cmake [1] /Users/test/llvm_source/llvm/projects/compiler-rt/CMakeLists.txt CMake Warning (dev) at /opt/local/share/cmake-3.12/Modules/CheckLibraryExists.cmake:56 (try_compile): Policy CMP0066 is not set: Honor per-config flags in try_compile() source-file signature. Run "cmake --help-policy CMP0066" for policy details. Use the cmake_policy command to set the policy and suppress this warning.

For compatibility with older versions of CMake, try_compile is not honoring caller config-specific compiler flags (e.g. CMAKE_C_FLAGS_DEBUG) in the test project. Call Stack (most recent call first): projects/compiler-rt/cmake/config-ix.cmake:113 (check_library_exists) projects/compiler-rt/CMakeLists.txt:168 (include) This warning is for project developers. Use -Wno-dev to suppress it.

Called from: [3] /opt/local/share/cmake-3.12/Modules/CheckLibraryExists.cmake [2] /Users/test/llvm_source/llvm/projects/compiler-rt/cmake/config-ix.cmake [1] /Users/test/llvm_source/llvm/projects/compiler-rt/CMakeLists.txt -- Looking for __cxa_throw in stdc++ - found Called from: [3] /opt/local/share/cmake-3.12/Modules/CheckLibraryExists.cmake [2] /Users/test/llvm_source/llvm/projects/compiler-rt/cmake/config-ix.cmake [1] /Users/test/llvm_source/llvm/projects/compiler-rt/CMakeLists.txt