Opened 7 years ago

Closed 7 years ago

#54768 closed defect (fixed)

libgcc6 @6.4.0_0+universal: i386 portion of libgfortran.3.dylib links with libquadmath.0.dylib at the wrong path

Reported by: ryandesign (Ryan Carsten Schmidt) Owned by: jeremyhu (Jeremy Huddleston Sequoia)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: jeremyhu (Jeremy Huddleston Sequoia), gnw3
Port: libgcc6

Description

The i386 portion of a universal (muniversal) build of arpack failed to configure, because:

dyld: Library not loaded: /opt/local/lib/libgcc/i386/libquadmath.0.dylib
  Referenced from: /opt/local/lib/libgcc/libgfortran.3.dylib
  Reason: image not found
./configure: line 3280: 77518 Abort trap: 6           ./conftest$ac_cv_exeext

Sure enough, the i386 portion of libgfortran.3.dylib is looking for libquadmath.0.dylib in the wrong path:

$ port provides /opt/local/lib/libgcc/libgfortran.3.dylib
/opt/local/lib/libgcc/libgfortran.3.dylib is provided by: libgcc6
$ port -vq installed libgcc6
  libgcc6 @6.4.0_0+universal (active) platform='darwin 16' archs='i386 x86_64' date='2017-09-05T19:34:55-0500'
$ otool -L -arch x86_64 /opt/local/lib/libgcc/libgfortran.3.dylib
/opt/local/lib/libgcc/libgfortran.3.dylib:
	/opt/local/lib/libgcc/libgfortran.3.dylib (compatibility version 4.0.0, current version 4.0.0)
	/opt/local/lib/libgcc/libquadmath.0.dylib (compatibility version 1.0.0, current version 1.0.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1238.60.2)
	/opt/local/lib/libgcc/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0)
$ otool -L -arch i386 /opt/local/lib/libgcc/libgfortran.3.dylib 
/opt/local/lib/libgcc/libgfortran.3.dylib:
	/opt/local/lib/libgcc/libgfortran.3.dylib (compatibility version 4.0.0, current version 4.0.0)
	/opt/local/lib/libgcc/i386/libquadmath.0.dylib (compatibility version 1.0.0, current version 1.0.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1238.60.2)
	/opt/local/lib/libgcc/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0)

Wrong path: /opt/local/lib/libgcc/i386/libquadmath.0.dylib
Right path: /opt/local/lib/libgcc/libquadmath.0.dylib

libgfortran.4.dylib provided by libgcc doesn't have this issue.

libquadmath.0.dylib seems to know its own path correctly:

$ port provides /opt/local/lib/libgcc/libquadmath.0.dylib
/opt/local/lib/libgcc/libquadmath.0.dylib is provided by: libgcc
$ port -vq installed libgcc
  libgcc @7.2.0_0+universal (active) platform='darwin 16' archs='i386 x86_64' date='2017-09-05T17:57:38-0500'
$ otool -L -arch x86_64 /opt/local/lib/libgcc/libquadmath.0.dylib
/opt/local/lib/libgcc/libquadmath.0.dylib:
	/opt/local/lib/libgcc/libquadmath.0.dylib (compatibility version 1.0.0, current version 1.0.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1238.60.2)
	/opt/local/lib/libgcc/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0)
$ otool -L -arch i386 /opt/local/lib/libgcc/libquadmath.0.dylib
/opt/local/lib/libgcc/libquadmath.0.dylib:
	/opt/local/lib/libgcc/libquadmath.0.dylib (compatibility version 1.0.0, current version 1.0.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1238.60.2)
	/opt/local/lib/libgcc/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0)

Change History (4)

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

Summary: libgcc6 @6.4.0_0+universal: i386 portion has wrong install_namelibgcc6 @6.4.0_0+universal: i386 portion of libgfortran.3.dylib links with libquadmath.0.dylib at the wrong path

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

Cc: gnw3 added

Has duplicate #54769.

comment:3 Changed 7 years ago by jeremyhu (Jeremy Huddleston Sequoia)

I see the problem. Testing a fix.

comment:4 Changed 7 years ago by jeremyhu (Jeremy Huddleston Sequoia)

Owner: set to jeremyhu
Resolution: fixed
Status: newclosed

In 46baadbb579e804092d71e9faf01481972cf0a22/macports-ports:

libgcc6: Fix linkage against libquadmath when built +universal

Fixes #54768

Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@…>

Note: See TracTickets for help on using tickets.