[MacPorts] #61899: ruby27 @2.7.2: pre-built archive for Big Sur contains hardcoded path to 11.0 SDK

MacPorts noreply at macports.org
Wed Dec 23 10:47:42 UTC 2020


#61899: ruby27 @2.7.2: pre-built archive for Big Sur contains hardcoded path to
11.0 SDK
-------------------------+--------------------
 Reporter:  michaellass  |      Owner:  (none)
     Type:  defect       |     Status:  new
 Priority:  Normal       |  Milestone:
Component:  ports        |    Version:
 Keywords:               |       Port:  ruby27
-------------------------+--------------------
 When ruby27 is installed from the pre-built archive
 (https://packages.macports.org/ruby27/ruby27-2.7.2_0.darwin_20.x86_64.tbz2),
 there are two files included with hardcoded paths to the 11.0 SDK:

 * /opt/local/lib/ruby2.7/2.7.0/x86_64-darwin20/rbconfig.rb
 * /opt/local/lib/pkgconfig/ruby-2.7.pc

 The entries in the first file (rbconfig.rb) cause gem to fail building
 native extensions on macOS 11.1:


 {{{
 Building native extensions. This could take a while...
 ERROR:  Error installing iStats:
         ERROR: Failed to build gem native extension.

     current directory:
 /Users/lass/.gem/ruby/gems/iStats-1.6.1/ext/osx_stats
 /opt/local/bin/ruby2.7 -I /opt/local/lib/ruby2.7/2.7.0 -r
 ./siteconf20201223-83991-j5zrwi.rb extconf.rb
 creating Makefile

 current directory: /Users/lass/.gem/ruby/gems/iStats-1.6.1/ext/osx_stats
 make "DESTDIR=" clean

 current directory: /Users/lass/.gem/ruby/gems/iStats-1.6.1/ext/osx_stats
 make "DESTDIR="
 compiling smc.c
 clang: warning: no such sysroot directory:
 '/Library/Developer/CommandLineTools/SDKs/MacOSX11.0.sdk' [-Wmissing-
 sysroot]
 smc.c:20:10: fatal error: 'stdio.h' file not found
 #include <stdio.h>
          ^~~~~~~~~
 1 error generated.
 make: *** [smc.o] Error 1

 make failed, exit code 2
 }}}

 Either changing the files manually from 11.0 to 11.1 or building ruby27
 from source fixes the issue.

 I'm not sure how this could be fixed properly to work on 11.0 and 11.1.
 Maybe it is possible to specify
 /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk as SDK in the portfile
 such that this more universal symlink is stored in those files instead.

-- 
Ticket URL: <https://trac.macports.org/ticket/61899>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list