library not found for -lgfortran

Mark Brethen mark.brethen at gmail.com
Tue Jul 8 18:21:50 PDT 2014


On Jul 8, 2014, at 7:46 PM, Sean Farley <sean at macports.org> wrote:

> Try setting 'configure.ld ${configure.fc}' in the pre-configure stage
> and see if that works. It might not but is worth a shot.

:debug:configure Backtrace: invalid command name "configure.ld"
    while executing
"proc-pre-org.macports.configure-configure-2 org.macports.configure"
    ("eval" body line 1)
    invoked from within
"eval $pre $targetname"
:info:configure Warning: targets not executed for freecad: org.macports.build org.macports.configure
:notice:configure Please see the log file for port freecad for details:
    /opt/local/var/macports/logs/_Users_marbre_ports_cad_freecad/freecad/main.log

This workaround was mentioned in the freecad forum (homebrew):

    # Enable Fortran
    libgfortran = `$FC --print-file-name libgfortran.a`.chomp
    ENV.append 'LDFLAGS', "-L#{File.dirname libgfortran} -lgfortran"
    inreplace "CMakeLists.txt", "if(CMAKE_COMPILER_IS_GNUCXX)\nENABLE_LANGUAGE(Fortran)\nendif(CMAKE_COMPILER_IS_GNUCXX)", 'ENABLE_LANGUAGE(Fortran)'


Mark






More information about the macports-dev mailing list