Opened 3 weeks ago

Last modified 2 weeks ago

#69733 new defect

libgcc11 @11.4.0: Hangs at patch phase

Reported by: PWLisowski Owned by:
Priority: Normal Milestone:
Component: ports Version:
Keywords: ventura sonoma Cc:
Port: libgcc11

Description (last modified by ryandesign (Ryan Carsten Schmidt))

When trying to install PGPLOT in a a new Mac, the installation hangs up when it reaches the attempt to patch libgc11.

--->  Computing dependencies for libgcc11
--->  Fetching archive for libgcc11
--->  Attempting to fetch libgcc11-11.4.0_1+stdlib_flag.darwin_23.arm64.tbz2 from https://packages.macports.org/libgcc11
--->  Attempting to fetch libgcc11-11.4.0_1+stdlib_flag.darwin_23.arm64.tbz2 from http://mirror.fcix.net/macports/packages/libgcc11
--->  Attempting to fetch libgcc11-11.4.0_1+stdlib_flag.darwin_23.arm64.tbz2 from https://ywg.ca.packages.macports.org/mirror/macports/packages/libgcc11
--->  Applying patches to libgcc11

Change History (8)

comment:1 Changed 3 weeks ago by ryandesign (Ryan Carsten Schmidt)

Description: modified (diff)
Keywords: ventura sonoma added
Port: libgcc11 added
Summary: PGPLOT fails to install on SONOMA 14.4.1 on M3 Maclibgcc11 @11.4.0: Hangs at patch phase

Typically a hang at the patch phase on macOS 13 or later means the Portfile's worksrcdir is wrong. See comment:ticket:69649:7.

comment:2 Changed 3 weeks ago by ryandesign (Ryan Carsten Schmidt)

However patching succeeds on my macOS 12 system so the worksrcdir is not wrong in this case.

Could you please run:

sudo port clean libgcc11
sudo port -d patch libgcc11

and copy/paste the last 20 or so lines into this ticket so that we can see what the problem is?

I will warn you, however, that libgcc11 is already marked as incompatible with macOS 13 and later, so even once we fix the patching issue that won't make this port work; see #66398 for more details.

I'm surprised MacPorts even tried to go this far. You should have gotten an error message earlier telling you the port was known to fail on your OS version. Maybe you did get that message and told MacPorts to try anyway.

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

Since your ultimate goal is to install pgplot, the fix probably isn't to make libgcc11 work, but rather to make pgplot use a newer libgcc. In fact, it already does by default. The default gcc for all ports that (like pgplot) use the compilers portgroup was changed to gcc12 in July 2022 and changed to gcc13 in October 2023. Is it possible your ports tree is out of date? If so, run sudo port selfupdate to update.

comment:4 Changed 3 weeks ago by PWLisowski

Apparently libgc11 is not installed. Here is the result:

ans1@iMac ~ % sudo port clean libgc11
Password:
Error: Port libgc11 not found

Here is the result from sudo port selfupdate

ans1@iMac ~ % sudo port selfupdate
Password:
--->  Updating MacPorts base sources using rsync
MacPorts base version 2.9.3 installed,
MacPorts base version 2.9.3 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
ans1@iMac ~ % sudo port upgrade outdated
--->  Fetching archive for arpack
--->  Attempting to fetch arpack-3.9.1_1+accelerate+gfortran.darwin_23.arm64.tbz2 from https://packages.macports.org/arpack
--->  Attempting to fetch arpack-3.9.1_1+accelerate+gfortran.darwin_23.arm64.tbz2 from http://mirror.fcix.net/macports/packages/arpack
--->  Attempting to fetch arpack-3.9.1_1+accelerate+gfortran.darwin_23.arm64.tbz2 from https://ywg.ca.packages.macports.org/mirror/macports/packages/arpack
--->  Computing dependencies for arpack
The following dependencies will be installed:
libgcc
libgcc13
libtool
Continue? [Y/n]: Y
--->  Configuring arpack
Error: Failed to configure arpack: consult /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_math_arpack/arpack/work/arpack-ng-3.9.1/config.log
Error: Failed to configure arpack: configure failure: command execution failed
Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_math_arpack/arpack/main.log for details.
Error: Follow https://guide.macports.org/#project.tickets if you believe there is a bug.
Last edited 3 weeks ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

comment:5 in reply to:  4 Changed 3 weeks ago by ryandesign (Ryan Carsten Schmidt)

Replying to PWLisowski:

Apparently libgc11 is not installed. Here is the result:

ans1@iMac ~ % sudo port clean libgc11
Password:
Error: Port libgc11 not found

Two c's in libgcc11.

Here is the result from sudo port selfupdate

ans1@iMac ~ % sudo port selfupdate
Password:
--->  Updating MacPorts base sources using rsync
MacPorts base version 2.9.3 installed,
MacPorts base version 2.9.3 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

Ok, great. That confirms that MacPorts base and your port definitions are now up to date.

--->  Configuring arpack
Error: Failed to configure arpack: consult /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_math_arpack/arpack/work/arpack-ng-3.9.1/config.log
Error: Failed to configure arpack: configure failure: command execution failed
Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_math_arpack/arpack/main.log for details.
Error: Follow https://guide.macports.org/#project.tickets if you believe there is a bug.

Please file a separate bug report about that since it's unrelated to the libgcc11 issue.

comment:6 Changed 3 weeks ago by PWLisowski

I first ran

sudo port clean libgcc11
sudo port -d patch libgcc11

last 20 or so lines:

patching file libtool.m4
patching file 'libvtv/configure'
patching file 'libvtv/configure.ac'
patching file 'lto-plugin/Makefile.in'
patching file 'lto-plugin/configure'
patching file 'lto-plugin/configure.ac'
patching file 'zlib/configure'
patching file 'zlib/configure.ac'
--->  Applying patch-disable-dyld_library_path.diff
DEBUG: Environment: 
CC_PRINT_OPTIONS='YES'
CC_PRINT_OPTIONS_FILE='/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc11/libgcc11/work/.CC_PRINT_OPTIONS'
CPATH='/opt/local/include'
DEVELOPER_DIR='/Library/Developer/CommandLineTools'
LIBRARY_PATH='/opt/local/lib'
MACOSX_DEPLOYMENT_TARGET='14.0'
SDKROOT='/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk'
Executing:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc11/libgcc11/work/gcc-11.4.0" && /usr/bin/patch -p0 < '/opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/lang/gcc11/files/patch-disable-dyld_library_path.diff'
DEBUG: system:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc11/libgcc11/work/gcc-11.4.0" && /usr/bin/patch -p0 < '/opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/lang/gcc11/files/patch-disable-dyld_library_path.diff'
patching file Makefile.in
--->  Applying patch-gcc10-disable-macports-cctools-as-changes.diff
DEBUG: Environment: 
CC_PRINT_OPTIONS='YES'
CC_PRINT_OPTIONS_FILE='/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc11/libgcc11/work/.CC_PRINT_OPTIONS'
CPATH='/opt/local/include'
DEVELOPER_DIR='/Library/Developer/CommandLineTools'
LIBRARY_PATH='/opt/local/lib'
MACOSX_DEPLOYMENT_TARGET='14.0'
SDKROOT='/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk'
Executing:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc11/libgcc11/work/gcc-11.4.0" && /usr/bin/patch -p0 < '/opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/lang/gcc11/files/patch-gcc10-disable-macports-cctools-as-changes.diff'
DEBUG: system:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc11/libgcc11/work/gcc-11.4.0" && /usr/bin/patch -p0 < '/opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/lang/gcc11/files/patch-gcc10-disable-macports-cctools-as-changes.diff'
patching file Makefile.in
ans1@iMac ~ % 
Last edited 2 weeks ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

comment:7 Changed 2 weeks ago by ryandesign (Ryan Carsten Schmidt)

On macOS 12 the last lines are:

patching file Makefile.in
Hunk #1 succeeded at 656 (offset 3 lines).

The patch program in macOS 13 and later is less forgiving than that in macOS 12 and earlier and we're still working on understanding all the ways in which it fails to work the way we need it to (#69649). I thought simple offsets like this were something it could handle but I'll regenerate it to remove the offset.

comment:8 Changed 2 weeks ago by ryandesign (Ryan Carsten Schmidt)

In fd5b7c530568be0c4c2b2beeafac0faa2a6687be/macports-ports (master):

gcc11: Regenerate patch to remove offset

See: #69733

Note: See TracTickets for help on using tickets.