Quuxplusone / LLVMBugzillaTest

0 stars 0 forks source link

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

Open Quuxplusone opened 5 years ago

Quuxplusone commented 5 years ago
Bugzilla Link PR39693
Status NEW
Importance P enhancement
Reported by Jeffrey Walton (noloader@gmail.com)
Reported on 2018-11-16 10:23:14 -0800
Last modified on 2018-11-16 12:21:51 -0800
Version 7.0
Hardware Macintosh MacOS X
CC llvm-bugs@lists.llvm.org, noloader@gmail.com
Fixed by commit(s)
Attachments
Blocks
Blocked by
See also
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
<hang here>
Quuxplusone 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