[MacPorts] #63099: Selfupdate failure to 2.7.1: /usr/bin/cc can't link -lSystem

MacPorts noreply at macports.org
Tue Jun 15 12:23:14 UTC 2021


#63099: Selfupdate failure to 2.7.1: /usr/bin/cc can't link -lSystem
-----------------------+--------------------
 Reporter:  gallafent  |      Owner:  (none)
     Type:  defect     |     Status:  new
 Priority:  Normal     |  Milestone:
Component:  base       |    Version:  2.7.1
 Keywords:             |       Port:
-----------------------+--------------------
 This is a really strange one (to me at least!).

 While running the configure script of selfupdate, the compiler at
 /usr/bin/cc can't build executables, claiming that it can't link -lSystem.
 If I run the same command on the command line, on a similarly trival do-
 nothing source file containing a trivial main function returning 0, with
 or without sudo, I get a working executable.

 On a hunch, I gave /usr/bin/cc “full disk access” using System
 Preferences, in case this was causing problems, and tried running again,
 but that made no difference.

 The only unusual thing about my config is that /opt/local is not on the
 system drive of my mac, it's on an external drive. Because / is mounted
 read only these days, I was unable to delete /opt and replace it with a
 symlink to the right location on the external drive, I instead symlinked
 one level down so that inside /opt, there's the symlink:

 {{{
 williamg at forth /opt % ls -l
 total 0
 lrwxr-xr-x  1 root  wheel  27  8 Mar 10:32 local ->
 /Volumes/S860E1TB/opt/local
 }}}

 (Moving everything below /opt back to the system drive isn't an option,
 it's too full).

 config.log from
 /Volumes/S860E1TB/opt/local/var/macports/sources/rsync.macports.org/macports/release/tarballs/base
 will be attached.

 Output of port -v selfupdate:

 {{{
 williamg at forth base % sudo port -v selfupdate
 Password:
 --->  Updating MacPorts base sources using rsync

 Willkommen auf dem RSYNC-server auf ftp.fau.de.
 Nicht all unsere Mirror sind per rsync verfuegbar.

 Welcome to the RSYNC daemon on ftp.fau.de.
 Not all of our mirrors are available through rsync.


 receiving file list ... done

 sent 16 bytes  received 55 bytes  142.00 bytes/sec
 total size is 85857280  speedup is 1209257.46

 Willkommen auf dem RSYNC-server auf ftp.fau.de.
 Nicht all unsere Mirror sind per rsync verfuegbar.

 Welcome to the RSYNC daemon on ftp.fau.de.
 Not all of our mirrors are available through rsync.


 receiving file list ... done

 sent 16 bytes  received 62 bytes  156.00 bytes/sec
 total size is 512  speedup is 6.56
 MacPorts base version 2.7.0 installed,
 MacPorts base version 2.7.1 downloaded.
 --->  Updating the ports tree
 Synchronizing local ports tree from
 rsync://rsync.macports.org/release/tarballs/ports.tar

 Willkommen auf dem RSYNC-server auf ftp.fau.de.
 Nicht all unsere Mirror sind per rsync verfuegbar.

 Welcome to the RSYNC daemon on ftp.fau.de.
 Not all of our mirrors are available through rsync.


 receiving file list ... done
 ./

 sent 68 bytes  received 99 bytes  111.33 bytes/sec
 total size is 84753920  speedup is 507508.50

 Willkommen auf dem RSYNC-server auf ftp.fau.de.
 Nicht all unsere Mirror sind per rsync verfuegbar.

 Welcome to the RSYNC daemon on ftp.fau.de.
 Not all of our mirrors are available through rsync.


 receiving file list ... done

 sent 16 bytes  received 56 bytes  48.00 bytes/sec
 total size is 15837700  speedup is 219968.06

 Willkommen auf dem RSYNC-server auf ftp.fau.de.
 Nicht all unsere Mirror sind per rsync verfuegbar.

 Welcome to the RSYNC daemon on ftp.fau.de.
 Not all of our mirrors are available through rsync.


 receiving file list ... done

 sent 16 bytes  received 63 bytes  158.00 bytes/sec
 total size is 512  speedup is 6.48
 --->  MacPorts base is outdated, installing new version 2.7.1
 Installing new MacPorts release in /opt/local as _unknown:_unknown;
 permissions 0755

 checking build system type... x86_64-apple-darwin20.5.0
 checking host system type... x86_64-apple-darwin20.5.0
 checking target system type... x86_64-apple-darwin20.5.0
 checking MacPorts version... 2.7.1
 checking for sw_vers... /usr/bin/sw_vers
 checking for defaults... /usr/bin/defaults
 checking for xcode-select... /usr/bin/xcode-select
 checking macOS version... 11.4
 checking Xcode location... /Applications/Xcode.app/Contents/Developer
 checking Xcode version... 12.5
 checking whether the C compiler works... no
 configure: error: in
 `/Volumes/S860E1TB/opt/local/var/macports/sources/rsync.macports.org/macports/release/tarballs/base':
 configure: error: C compiler cannot create executables
 See `config.log' for more details
 Command failed: CC=/usr/bin/cc
 SDKROOT=/Library/Developer/CommandLineTools/SDKs/MacOSX11.0.sdk
 ./configure --prefix=/opt/local --with-install-user=_unknown --with-
 install-group=_unknown --with-directory-mode=0755 --enable-readline &&
 SDKROOT=/Library/Developer/CommandLineTools/SDKs/MacOSX11.0.sdk make
 SELFUPDATING=1 && make install SELFUPDATING=1
 Exit code: 77
 Error: Error installing new MacPorts base: command execution failed
 Error: Follow https://guide.macports.org/#project.tickets if you believe
 there is a bug.
 Error: /opt/local/bin/port: port selfupdate failed: Error installing new
 MacPorts base: command execution failed
 }}}

 Any advice welcome / further testing or information required, let me know!

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


More information about the macports-tickets mailing list