Opened 2 years ago

Closed 22 months ago

#63899 closed defect (fixed)

gcc10: dyld: Library not loaded: @rpath/libgfortran.5.dylib

Reported by: mdekauwe (Martin De Kauwe) Owned by:
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: cjones051073 (Chris Jones), cooljeanius (Eric Gallager)
Port: gcc10

Description

Hi,

I have built gfortran fine (sudo port install gcc10 +gfortran) without errors. I have used it to successfully compile code; however, when it runs it complains:

dyld: Library not loaded: @rpath/libgfortran.5.dylib

As best I can tell, this relates to the path not being expanded at run time. If I check it...

$ otool -L  /opt/local/lib/libgcc/libgfortran.5.dylib
/opt/local/lib/libgcc/libgfortran.5.dylib:
	@rpath/libgfortran.5.dylib (compatibility version 6.0.0, current version 6.0.0)
	@rpath/libgcc_s.1.1.dylib (compatibility version 1.0.0, current version 1.1.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1292.100.5)

Any assistance would be greatly appreciated.

This is on a 2020 M1 MacBook if that affects anything.

Change History (7)

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

Port: gcc10 added
Summary: gfortran missing @rpathgcc10: dyld: Library not loaded: @rpath/libgfortran.5.dylib

comment:2 Changed 2 years ago by cjones051073 (Chris Jones)

gcc10 is not really supported on Apple silicon. I suggest trying gcc-devel or gcc11 (although both also still have issues with M1 machines).

Last edited 2 years ago by cjones051073 (Chris Jones) (previous) (diff)

comment:3 Changed 2 years ago by cjones051073 (Chris Jones)

Cc: cjones051073 added

comment:4 Changed 2 years ago by mdekauwe (Martin De Kauwe)

Thanks, I didn't realise that about gcc10 and the mac chips.

comment:5 Changed 2 years ago by cjones051073 (Chris Jones)

The simple fact is there currently is no official release of gcc that supports apple silicon. Gcc11 has some patches that are supposed to work, but we have had issues with them. Gcc-devel has generally worked better but this is a rolling release, that builds gcc snapshots and thus changes regularly. It also uses different sources for intel and arm as currently the mainstream gcc snapshots still do not have support folded in, so we use a separate branch maintained by the primary gcc darwin lead. But still, it is never a proper prelease just a snapshot build so no guarantees i am afraid.

Last edited 2 years ago by cjones051073 (Chris Jones) (previous) (diff)

comment:6 Changed 2 years ago by cooljeanius (Eric Gallager)

Cc: cooljeanius added

comment:7 Changed 22 months ago by cjones051073 (Chris Jones)

Resolution: fixed
Status: newclosed

Gcc10 has been updated with support for arm.

Note: See TracTickets for help on using tickets.