Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#59341 closed defect (duplicate)

compiling cmake fails on High Sierra: tries to build universal against the 10.14 SDK on 10.13

Reported by: freemanbach (Freeman) Owned by: michaelld (Michael Dickens)
Priority: Normal Milestone:
Component: ports Version: 2.6.1
Keywords: Cc:
Port: cmake

Description (last modified by kencu (Ken))

Darwin ITEC-MBR-E16198 17.7.0 Darwin Kernel Version 17.7.0: Sun Jun 2 20:31:42 PDT 2019; root:xnu-4570.71.46~1/RELEASE_X86_64 x86_64

flo@ITEC-MBR-E16198 ~> sudo port upgrade outdated
--->  Computing dependencies for cmake
--->  Fetching archive for cmake
--->  Attempting to fetch cmake-3.15.4_0+universal.darwin_17.i386-x86_64.tbz2 from https://packages.macports.org/cmake
--->  Attempting to fetch cmake-3.15.4_0+universal.darwin_17.i386-x86_64.tbz2 from http://aus.us.packages.macports.org/macports/packages/cmake
--->  Attempting to fetch cmake-3.15.4_0+universal.darwin_17.i386-x86_64.tbz2 from http://ywg.ca.packages.macports.org/mirror/macports/packages/cmake
--->  Configuring cmake
Error: Failed to configure cmake: configure failure: command execution failed
Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_cmake/cmake/main.log for details.
Error: Problem while installing cmake
Error: Follow https://guide.macports.org/#project.tickets to report a bug.
:info:configure loading initial cache file /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_cmake/cmake/work/cmake-3.15.4-i386/Bootstrap.cmk/InitialCacheFlags.cmake
:info:configure -- The C compiler identification is AppleClang 10.0.0.10001044
:info:configure -- The CXX compiler identification is AppleClang 10.0.0.10001044
:info:configure -- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/clang
:info:configure -- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/clang -- broken
:info:configure CMake Error at Modules/CMakeTestCCompiler.cmake:60 (message):
:info:configure   The C compiler
:info:configure     "/Library/Developer/CommandLineTools/usr/bin/clang"
:info:configure   is not able to compile a simple test program.
:info:configure   It fails with the following output:
:info:configure     Change Dir: /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_cmake/cmake/work/cmake-3.15.4-i386/CMakeFiles/CMakeTmp
:info:configure     
:info:configure     Run Build Command(s):/usr/bin/make cmTC_3b0ec/fast && make -f CMakeFiles/cmTC_3b0ec.dir/build.make CMakeFiles/cmTC_3b0ec.dir/build
:info:configure     Building C object CMakeFiles/cmTC_3b0ec.dir/testCCompiler.c.o
:info:configure     /Library/Developer/CommandLineTools/usr/bin/clang   -pipe -Os -arch i386  -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk -mmacosx-version-min=10.13   -o CMakeFiles/cmTC_3b0ec.dir/testCCompiler.c.o   -c /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_cmake/cmake/work/cmake-3.15.4-i386/CMakeFiles/CMakeTmp/testCCompiler.c
:info:configure     Linking C executable cmTC_3b0ec
:info:configure     /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_cmake/cmake/work/cmake-3.15.4-i386/Bootstrap.cmk/cmake -E cmake_link_script CMakeFiles/cmTC_3b0ec.dir/link.txt --verbose=1
:info:configure     /Library/Developer/CommandLineTools/usr/bin/clang -pipe -Os -arch i386  -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk -mmacosx-version-min=10.13 -Wl,-search_paths_first -Wl,-headerpad_max_install_names -L/opt/local/lib -Wl,-headerpad_max_install_names -arch i386  CMakeFiles/cmTC_3b0ec.dir/testCCompiler.c.o  -o cmTC_3b0ec 
:info:configure     ld: warning: The i386 architecture is deprecated for macOS (remove from the Xcode build setting: ARCHS)
:info:configure     ld: warning: ignoring file /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/lib/libSystem.tbd, missing required architecture i386 in file /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/lib/libSystem.tbd
:info:configure     ld: dynamic main executables must link with libSystem.dylib for architecture i386
:info:configure     clang: error: linker command failed with exit code 1 (use -v to see invocation)
:info:configure     make[1]: *** [cmTC_3b0ec] Error 1
:info:configure     make: *** [cmTC_3b0ec/fast] Error 2

Attachments (1)

main.log (1.2 MB) - added by freemanbach (Freeman) 5 years ago.
Compile error log

Download all attachments as: .zip

Change History (7)

Changed 5 years ago by freemanbach (Freeman)

Attachment: main.log added

Compile error log

comment:1 Changed 5 years ago by kencu (Ken)

Description: modified (diff)
Keywords: compile cmake removed
Owner: set to michaelld
Port: cmake added
Status: newassigned
Summary: compiling cmake failed on High Sierracompiling cmake fails on High Sierra: tries to build universal against the 10.14 SDK

comment:2 Changed 5 years ago by jmroot (Joshua Root)

Summary: compiling cmake fails on High Sierra: tries to build universal against the 10.14 SDKcompiling cmake fails on High Sierra: tries to build universal against the 10.14 SDK on 10.13
Type: updatedefect

comment:3 Changed 5 years ago by ryandesign (Ryan Carsten Schmidt)

The log shows you have Xcode 10.1. Xcode 10.x only has the macOS 10.14 SDK, which doesn't have 32-bit parts. If you want to build 32-bit, downgrade to Xcode 9 and the corresponding version of the command line tools to get the 10.13 SDK which still has 32-bit parts.

Or, don't try to build universal.

comment:4 in reply to:  3 Changed 5 years ago by freemanbach (Freeman)

Thanks Ryan, i will avoid building 32bit Universal SDK. Replying to ryandesign:

The log shows you have Xcode 10.1. Xcode 10.x only has the macOS 10.14 SDK, which doesn't have 32-bit parts. If you want to build 32-bit, downgrade to Xcode 9 and the corresponding version of the command line tools to get the 10.13 SDK which still has 32-bit parts.

Or, don't try to build universal.

comment:5 Changed 5 years ago by ryandesign (Ryan Carsten Schmidt)

Resolution: duplicate
Status: assignedclosed

Duplicate of #58142.

comment:6 Changed 5 years ago by kencu (Ken)

Or find the MacOSX10.13.sdk and copy or symlink it into the SDK folder in /Libary/Developer/CommandLineTools/SDKs.

Then all your +universal builds should work again with Xcode 10.x on 10.13.

Note: See TracTickets for help on using tickets.