gfortran static linking under OS X (was: Re: )

Daniel Feenberg feenberg@nber.org
Mon Mar 22 22:20:18 GMT 2021



On Sat, 20 Mar 2021, Iain Sandoe wrote:

> Daniel Feenberg <feenberg@gmail.com> wrote:
>
>> On 3/19/21, Iain Sandoe <idsandoe@googlemail.com> wrote:
>> 
>>>> On Fri, 19 Mar 2021, Tobias Burnus wrote:
>> 
>>> you should be able to work around this without changing the compiler or
>>> rebuilding it,
>
>>> %rename lib liborig
>>> *lib:  -lquadmath -lm %(libgcc) %(liborig)

...
>

I managed to install 10.2 and found that the error message goes away. No 
need to mess with the .spec file.A "static" binary can be produced with:

    gfortran taxsim.for -static-libgfortran -static-libgcc

in version 10.2. however, I have only one Mac, so I can't be 100% sure the 
binary will port to another machine, but I am hopeful.

Thank you all for your attention..

Daniel Feenberg
NBER


More information about the Fortran mailing list