[MacPorts] #62124: gcc9 @9.3.0_4 gfortran fails with "ld: library not found for -lSystem" in Big Sur

MacPorts noreply at macports.org
Fri Jan 22 15:23:41 UTC 2021


#62124: gcc9 @9.3.0_4 gfortran fails with "ld: library not found for -lSystem" in
Big Sur
--------------------+-----------------------
 Reporter:  cquike  |      Owner:  (none)
     Type:  defect  |     Status:  new
 Priority:  Normal  |  Milestone:
Component:  ports   |    Version:  2.6.4
 Keywords:  bigsur  |       Port:  gcc8 gcc9
--------------------+-----------------------
 In a fresh installed Big Sur machine with a fresh installed macports the
 gfortran command fails to compile (link) a hello world Fortran program:

 {{{
 $ gfortran-mp-9 -o hello hello.f

 ld: library not found for -lSystem
 collect2: error: ld returned 1 exit status
 }}}

 I have also tried with gfortran-mp-8 with the same results. The same
 command in a macOS 10.15 machine doesn't give any error.

 The versions installed are:

 {{{
 # port installed | grep gcc
   gcc8 @8.4.0_2 (active)
   gcc9 @9.3.0_4 (active)
   gcc_select @0.1_9 (active)
   libgcc @3.0_0 (active)
   libgcc8 @8.4.0_1 (active)
   libgcc9 @9.3.0_3 (active)
   libgcc10 @10.2.0_3 (active)

 # sw_vers
 ProductName:    macOS
 ProductVersion: 11.1
 BuildVersion:   20C69

 #/usr/bin/xcodebuild -version
 Xcode 12.3
 Build version 12C33

 }}}

 The hello.f example is the simplest Fortran program:

 {{{
       PROGRAM HELLO
 *     The PRINT statement is like WRITE,
 *     but prints to the standard output unit
         PRINT '(A)', 'Hello, world'
         STOP
       END
 }}}

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


More information about the macports-tickets mailing list