Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#61827 closed defect (fixed)

rb27-nokogiri @1.10.4 : Failed to compile on Big Sur (Apple Silicon)

Reported by: milkcocoa (Shu Masuda) Owned by: kimuraw (kimura wataru)
Priority: Normal Milestone:
Component: ports Version: 2.6.4
Keywords: bigsur arm64 Cc: radarhere (Andrew Murray)
Port: rb-nokogiri

Description

--->  Fetching archive for rb27-nokogiri
--->  Attempting to fetch rb27-nokogiri-1.10.4_0.darwin_20.arm64.tbz2 from https://kmq.jp.packages.macports.org/rb27-nokogiri
--->  Attempting to fetch rb27-nokogiri-1.10.4_0.darwin_20.arm64.tbz2 from https://ywg.ca.packages.macports.org/mirror/macports/packages/rb27-nokogiri
--->  Attempting to fetch rb27-nokogiri-1.10.4_0.darwin_20.arm64.tbz2 from http://jog.id.packages.macports.org/macports/packages/rb27-nokogiri
--->  Fetching distfiles for rb27-nokogiri
--->  Verifying checksums for rb27-nokogiri
--->  Extracting rb27-nokogiri
--->  Configuring rb27-nokogiri
--->  Building rb27-nokogiri
--->  Staging rb27-nokogiri into destroot
Error: Failed to destroot rb27-nokogiri: command execution failed

I've attached the main.log for reference.

Attachments (4)

main.log (58.9 KB) - added by milkcocoa (Shu Masuda) 3 years ago.
main.log
mkmf.log (1.3 KB) - added by nortcele 3 years ago.
main.2.log (27.1 KB) - added by radarhere (Andrew Murray) 3 years ago.
mkmf.2.log (1.2 KB) - added by radarhere (Andrew Murray) 3 years ago.

Download all attachments as: .zip

Change History (19)

Changed 3 years ago by milkcocoa (Shu Masuda)

Attachment: main.log added

main.log

comment:1 Changed 3 years ago by milkcocoa (Shu Masuda)

Keywords: bigsur added; bigger removed

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

Owner: set to kimuraw
Status: newassigned

comment:3 Changed 3 years ago by nortcele

A complementary error message is in the mkmf.log file.

Changed 3 years ago by nortcele

Attachment: mkmf.log added

comment:4 Changed 3 years ago by nortcele

I got the error file after a failing attempt to install rb27-nokogiri on macOS 11.1 20C69 (MacPorts 2.6.4, Xcode 12.3 12C33) on an Intel Macbook Pro.

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

Port: rb-nokogiri added; rb27-nokogiri removed

comment:6 Changed 3 years ago by radarhere (Andrew Murray)

Cc: radarhere added

comment:7 Changed 3 years ago by kimuraw (kimura wataru)

from nortcele's mkmf.log, SDK paths looks to conflict between macports' ruby and your Mac.

as a workaround, recompile ruby with sudo port -ns upgrade --force ruby27 solves this problem.

% ruby2.7 -rpp -e 'pp RbConfig::CONFIG["CFLAGS"]' | grep sysroot
"-pipe -Os -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX11.0.sdk -fno-common"
% ls /Library/Developer/CommandLineTools/SDKs/MacOSX11.0.sdk 
ls: /Library/Developer/CommandLineTools/SDKs/MacOSX11.0.sdk: No such file or directory
% xcrun --sdk macosx --show-sdk-path
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk

% sudo port -ns upgrade --force ruby27
% ruby2.7 -rpp -e 'pp RbConfig::CONFIG["CFLAGS"]' | grep sysroot
"-pipe -Os -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX11.1.sdk -fno-common" # 11.0 -> 11.1

comment:8 Changed 3 years ago by kimuraw (kimura wataru)

Status: assignedaccepted

related issue: #61866 "base uses incorrect SDK for Big Sur 11.1 and Xcode 12.3"

comment:9 Changed 3 years ago by kimuraw (kimura wataru)

Resolution: fixed
Status: acceptedclosed

In 06938beeea8a135d46a9577d775b27d877058c1c/macports-ports (master):

lang/ruby27, ruby26: fix build error of ruby extentions on macOS 11

macOS 11 and Xcode 12 changes SDK path for macOS minor versions.
this breaks building ruby binary extentions.

/Library/Developer/CommandLineTools/SDKs/MacOSX11.0.sdk

-> /Library/Developer/CommandLineTools/SDKs/MacOSX11.1.sdk (11.0 removed)


To fix this problem, port:ruby2x rewrites SDKROOT to "MacOSX.sdk" (symlink)
from "MacOSX11.x.sdk" in rbconfig.rb and ruby-2.x.pc at post-build.

Closes: #61827
Closes: #61899

Changed 3 years ago by radarhere (Andrew Murray)

Attachment: main.2.log added

comment:10 Changed 3 years ago by radarhere (Andrew Murray)

For me at least, this is still broken. I've attached a log.

comment:11 Changed 3 years ago by kimuraw (kimura wataru)

Please confirm the version of port:ruby27. it should be "@2.7.2_1".

If not, try sudo port selfupdate && sudo port upgrade ruby27.

% port installed ruby27
The following ports are currently installed:
  ruby27 @2.7.1_1
  ruby27 @2.7.2_0
  ruby27 @2.7.2_1 (active)

% ruby2.7 -rpp -e 'pp RbConfig::CONFIG["CFLAGS"]' | grep sysroot
"-pipe -Os -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -fno-common"
Last edited 3 years ago by kimuraw (kimura wataru) (previous) (diff)

comment:12 Changed 3 years ago by radarhere (Andrew Murray)

I don't imagine it is, but if you believe this is something unique to my system, feel free to move on to other things.

% sudo port selfupdate
Password:
--->  Updating MacPorts base sources using rsync
MacPorts base version 2.6.4 installed,
MacPorts base version 2.6.4 downloaded.
--->  Updating the ports tree
--->  MacPorts base is already the latest version

The ports tree has been updated. To upgrade your installed ports, you should run
  port upgrade outdated
% port list outdated
% port installed ruby27                                         
The following ports are currently installed:
  ruby27 @2.7.2_1 (active)
% ruby2.7 -rpp -e 'pp RbConfig::CONFIG["CFLAGS"]' | grep sysroot
"-pipe -Os -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -fno-common"

comment:13 in reply to:  12 Changed 3 years ago by ryandesign (Ryan Carsten Schmidt)

Replying to radarhere:

% port list outdated

Note that port list outdated doesn't do what you think it does. See wiki:FAQ#portlist.

% port installed ruby27                                         
The following ports are currently installed:
  ruby27 @2.7.2_1 (active)
% ruby2.7 -rpp -e 'pp RbConfig::CONFIG["CFLAGS"]' | grep sysroot
"-pipe -Os -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -fno-common"

Looks like you have successfully updated to the fixed version.

The log you attached says:

:info:destroot checking if the C compiler accepts  -I /opt/local/include/libxml2... *** extconf.rb failed ***
:info:destroot Could not create Makefile due to some reason, probably lack of necessary
:info:destroot libraries and/or headers.  Check the mkmf.log file for more details.  You may

So please attach mkmf.log.

Changed 3 years ago by radarhere (Andrew Murray)

Attachment: mkmf.2.log added

comment:14 Changed 3 years ago by kimuraw (kimura wataru)

mkmf.log says "/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk" not found.

re-install "Command line Tools" with dmg from https://developer.apple.com/download/ (developer ID required) might solve this problem.

similar problem: https://trac.macports.org/wiki/BigSurProblems#InstallmacOSSDK11manuallyincaseofproblems

% ls -l /Library/Developer/CommandLineTools/SDKs            
total 0
lrwxr-xr-x  1 root  wheel   14 Dec 20 23:53 MacOSX.sdk@ -> MacOSX11.1.sdk
drwxr-xr-x  7 root  wheel  224 Mar 27  2020 MacOSX10.14.sdk/
drwxr-xr-x  8 root  wheel  256 Dec 20 23:54 MacOSX10.15.sdk/
drwxr-xr-x  7 root  wheel  224 Dec 20 23:53 MacOSX11.1.sdk/

comment:15 Changed 3 years ago by radarhere (Andrew Murray)

Ah, yep, that fixed it. Thanks for your time

Note: See TracTickets for help on using tickets.