Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#54397 closed defect (duplicate)

llvm-4.0 @4.0.0 fails to build on Snow Leopard because: "/opt/local/bin/clang-mp-3.9 -- broken!

Reported by: ballapete (Peter "Pete" Dyballa) Owned by: jeremyhu (Jeremy Huddleston Sequoia)
Priority: Normal Milestone:
Component: ports Version: 2.4.1
Keywords: snowleopard Cc: larryv@…
Port: llvm-4.0

Description

Trying to migrate to what is described in https://www.macports.org/install.php#installing I started to build to build the ports. In order build apple-gcc40 apple-gcc42 clang-4.0 first llvm-4.0 needs to be built. This fails early:

DEBUG: Environment: 
CC='/opt/local/bin/clang-mp-3.9'
CC_PRINT_OPTIONS='YES'
CC_PRINT_OPTIONS_FILE='/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_llvm-4.0/llvm-4.0/work/.CC_PRINT_OPTIONS'
CFLAGS='-pipe -Os'
CPATH='/opt/local/include'
CPPFLAGS='-I/opt/local/include'
CXX='/opt/local/bin/clang++-mp-3.9'
CXXFLAGS='-pipe -Os -U__STRICT_ANSI__ -std=c++11 -stdlib=libc++'
F77FLAGS='-m64'
F90FLAGS='-pipe -Os -m64'
FCFLAGS='-pipe -Os -m64'
FFLAGS='-pipe -Os'
INSTALL='/usr/bin/install -c'
LDFLAGS='-L/opt/local/lib -Wl,-headerpad_max_install_names'
LIBRARY_PATH='/opt/local/lib'
MACOSX_DEPLOYMENT_TARGET='10.6'
OBJC='/opt/local/bin/clang-mp-3.9'
OBJCFLAGS='-pipe -Os'
OBJCXX='/opt/local/bin/clang++-mp-3.9'
OBJCXXFLAGS='-pipe -Os -U__STRICT_ANSI__ -std=c++11 -stdlib=libc++'
Executing:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_llvm-4.0/llvm-4.0/work/build" && /opt/local/bin/cmake -DCMAKE_INSTALL_PREFIX='/opt/local/libexec/llvm-4.0' -DCMAKE_BUILD_TYPE=Release -DCMAKE_BUILD_WITH_INSTALL_RPATH=ON -DCMAKE_C_COMPILER="$CC" -DCMAKE_COLOR_MAKEFILE=ON -DCMAKE_CXX_COMPILER="$CXX" -DCMAKE_FIND_FRAMEWORK=LAST -DCMAKE_MODULE_PATH=/opt/local/share/cmake/Modules -DCMAKE_VERBOSE_MAKEFILE=ON -Wno-dev -DCMAKE_INSTALL_NAME_DIR=/opt/local/libexec/llvm-4.0/lib -DCMAKE_INSTALL_RPATH=/opt/local/libexec/llvm-4.0/lib -DCMAKE_SYSTEM_PREFIX_PATH="/opt/local/libexec/llvm-4.0;/opt/local;/usr" -DLLVM_LINK_LLVM_DYLIB=ON -DLLVM_ENABLE_ASSERTIONS=OFF -DLLVM_ENABLE_RTTI=ON -DLLVM_INCLUDE_TESTS=OFF -DLLVM_INCLUDE_EXAMPLES=OFF -DLLVM_ENABLE_FFI=ON -DLLVM_BINDINGS_LIST=none -DFFI_INCLUDE_DIR=`pkg-config --cflags-only-I libffi | sed 's/-I//'` -DFFI_LIBRARY_DIR=/opt/local/lib -DLLVM_ENABLE_BACKTRACES=OFF -DCMAKE_C_FLAGS_RELEASE="-DNDEBUG" -DCMAKE_CXX_FLAGS_RELEASE="-DNDEBUG" -DCMAKE_OSX_ARCHITECTURES="x86_64" -DCMAKE_OSX_DEPLOYMENT_TARGET="10.6" -DCMAKE_OSX_SYSROOT="/" ../llvm-4.0.0.src 
DEBUG: system:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_llvm-4.0/llvm-4.0/work/build" && /opt/local/bin/cmake -DCMAKE_INSTALL_PREFIX='/opt/local/libexec/llvm-4.0' -DCMAKE_BUILD_TYPE=Release -DCMAKE_BUILD_WITH_INSTALL_RPATH=ON -DCMAKE_C_COMPILER="$CC" -DCMAKE_COLOR_MAKEFILE=ON -DCMAKE_CXX_COMPILER="$CXX" -DCMAKE_FIND_FRAMEWORK=LAST -DCMAKE_MODULE_PATH=/opt/local/share/cmake/Modules -DCMAKE_VERBOSE_MAKEFILE=ON -Wno-dev -DCMAKE_INSTALL_NAME_DIR=/opt/local/libexec/llvm-4.0/lib -DCMAKE_INSTALL_RPATH=/opt/local/libexec/llvm-4.0/lib -DCMAKE_SYSTEM_PREFIX_PATH="/opt/local/libexec/llvm-4.0;/opt/local;/usr" -DLLVM_LINK_LLVM_DYLIB=ON -DLLVM_ENABLE_ASSERTIONS=OFF -DLLVM_ENABLE_RTTI=ON -DLLVM_INCLUDE_TESTS=OFF -DLLVM_INCLUDE_EXAMPLES=OFF -DLLVM_ENABLE_FFI=ON -DLLVM_BINDINGS_LIST=none -DFFI_INCLUDE_DIR=`pkg-config --cflags-only-I libffi | sed 's/-I//'` -DFFI_LIBRARY_DIR=/opt/local/lib -DLLVM_ENABLE_BACKTRACES=OFF -DCMAKE_C_FLAGS_RELEASE="-DNDEBUG" -DCMAKE_CXX_FLAGS_RELEASE="-DNDEBUG" -DCMAKE_OSX_ARCHITECTURES="x86_64" -DCMAKE_OSX_DEPLOYMENT_TARGET="10.6" -DCMAKE_OSX_SYSROOT="/" ../llvm-4.0.0.src 
sh: pkg-config: command not found
-- The C compiler identification is Clang 3.9.1
-- The CXX compiler identification is Clang 3.9.1
-- The ASM compiler identification is Clang
-- Found assembler: /opt/local/bin/clang-mp-3.9
-- Check for working C compiler: /opt/local/bin/clang-mp-3.9
-- Check for working C compiler: /opt/local/bin/clang-mp-3.9 -- broken
CMake Error at /opt/local/share/cmake-3.8/Modules/CMakeTestCCompiler.cmake:51 (message):
  The C compiler "/opt/local/bin/clang-mp-3.9" is not able to compile a
  simple test program.

  It fails with the following output:

   Change Dir: /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_llvm-4.0/llvm-4.0/work/build/CMakeFiles/CMakeTmp

  

  Run Build Command:"/usr/bin/make" "cmTC_a88cf/fast"

  /usr/bin/make -f CMakeFiles/cmTC_a88cf.dir/build.make
  CMakeFiles/cmTC_a88cf.dir/build

  Building C object CMakeFiles/cmTC_a88cf.dir/testCCompiler.c.o

  /opt/local/bin/clang-mp-3.9 -pipe -Os -arch x86_64
  -mmacosx-version-min=10.6 -o CMakeFiles/cmTC_a88cf.dir/testCCompiler.c.o -c
  /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_llvm-4.0/llvm-4.0/work/build/CMakeFiles/CMakeTmp/testCCompiler.c


  Linking C executable cmTC_a88cf

  /opt/local/bin/cmake -E cmake_link_script
  CMakeFiles/cmTC_a88cf.dir/link.txt --verbose=1

  /opt/local/bin/clang-mp-3.9 -pipe -Os -arch x86_64
  -mmacosx-version-min=10.6 -Wl,-search_paths_first
  -Wl,-headerpad_max_install_names -L/opt/local/lib
  -Wl,-headerpad_max_install_names
  CMakeFiles/cmTC_a88cf.dir/testCCompiler.c.o -o cmTC_a88cf

  ld: library not found for -lto_library

  clang: error: linker command failed with exit code 1 (use -v to see
  invocation)

Before port built 50 packages.

Attachments (1)

main.log (19.6 KB) - added by ballapete (Peter "Pete" Dyballa) 7 years ago.

Download all attachments as: .zip

Change History (5)

Changed 7 years ago by ballapete (Peter "Pete" Dyballa)

Attachment: main.log added

comment:1 Changed 7 years ago by mf2k (Frank Schima)

Cc: jeremyhu@… removed
Owner: set to jeremyhu
Port: llvm-4.0 added; clang removed
Status: newassigned

comment:2 Changed 7 years ago by kencu (Ken)

duplicate of 53931.

Mojca and I were pondering an automatic fix for this, but for now at least, Steps 8 and 9 of LibcxxOnOlderSystems takes care of this. I would suggest you consider following those instructions from top to bottom (broken record, aren't I?) but if not that, at least steps 8 and 9 for this particular issue.

comment:3 Changed 7 years ago by mf2k (Frank Schima)

Resolution: duplicate
Status: assignedclosed

comment:4 in reply to:  2 Changed 7 years ago by ballapete (Peter "Pete" Dyballa)

Replying to kencu:

duplicate of 53931.

Sorry! I missed to continue after the recipe. Since I still do not know how to "uninstall all ports that use C++" I installed a fresh version of MacPorts and after I saw that libcxxabi and libcxx were installed I thought I could simply install all the missing other ports.

Note: See TracTickets for help on using tickets.