Re: GNU gfortran on Mac OSX



On 26 mai, 19:06, breyfogle <cldmcns...@xxxxxxxxxxxxx> wrote:
I have been successfully using GNU g77 for years on a variety of Mac
platforms. Recently I installed GNU gfortran 4.3 (over an existing g77
install) on a ppc Mac running 10.4.10.  Everything appeared to install
properly.  Applications upgraded to gortran build successfully and run
as intended.  However, every build produces an error message about being
unable to find one particular shared dynamic library.  See below:

Applicable versions:

PB15:~ dpm$ ld -v
Apple Computer, Inc. version cctools-590.36~obj
PB15:~ dpm$ gfortran -v
Using built-in specs.
Target: powerpc-apple-darwin8.10.0
Configured with: /tmp/gfortran-20071017/ibin/../gcc/configure
--prefix=/usr/local/gfortran --enable-languages=c,fortran
--with-gmp=/tmp/gfortran-20071017/gfortran_libs --enable-bootstrap
Thread model: posix
gcc version 4.3.0 20071017 (experimental) [trunk revision 129405] (GCC)

Sample compile & link messages:

PB15:~ dpm$ gfortran testgf.f
/usr/bin/ld: warning can't open dynamic library: /libgcc_s.1.dylib
referenced
from:/usr/local/gfortran/lib/gcc/powerpc-apple-darwin8.10.0/4.3.0/../../.
./libgfortran.dylib (checking for undefined symbols may be affected) (No
such file or directory, errno = 2)

The "libgcc_s.1.dylib" clearly exists, its in the same directory as
libgfortran.dylib and a bunch of others.  While this error does not
effect application functionality directly, I don't really like link
errors.  Something is obviously not correct and I would like to resolve
this if at all possible.  Any ideas ? Any and all help would be greatly
appreciated.

This is an old bug of gcc (now fixed, though I don't remember when).
A fix (that worked for me) is to do a symbolic link for /libgcc_s.
1.dylib:

ln -s /your_path/libgcc_s.1.dylib /libgcc_s.1.dylib

Dominique

.



Relevant Pages

  • Re: GNU gfortran on Mac OSX
    ... Recently I installed GNU gfortran 4.3 (over an existing g77 ... install) on a ppc Mac running 10.4.10. ... PB15:~ dpm$ gfortran -v ...
    (comp.lang.fortran)
  • Re: gfortran: OK, I quit, you win
    ... the output he got with gfortran and I could see that it was ... I couldn't install gfortran on my machine. ... usable on platforms the commercial vendors or even g95 won't ... to QNX, and I don't think Watcom ported their f77 compiler, ...
    (comp.lang.fortran)
  • Re: g77 or gfortran for Leopard
    ... I'll need to install an Apple Developer Kit for it. ... Both gfortran and g95 are open source Fortran 95 compilers for ... I'd not install g77 today, ... It works fine on Leopard. ...
    (comp.sys.mac.apps)
  • Re: g77 and gfortran together
    ... >> I have rpm's of the Fedora CDs for gcc4 and gfortran. ... >> Can I install gfortran and have no conflicts with g77? ...
    (comp.lang.fortran)
  • Re: XPe Toolset with SQL Express
    ... Although I managed to install the SP1 database with no errors, ... Are there some additional settings I need to adjust in SQL Express? ... DPM wrote: ...
    (microsoft.public.windowsxp.embedded)