Doubts using the precompiled binaries

Manfred Schwarb manfred99@gmx.ch
Tue Apr 25 22:22:00 GMT 2017


Am 25.04.2017 um 20:30 schrieb marco restelli:
> Hi all,
>    I am experimenting with the precompiled binaries from the GCC Wiki,
> and in particular with gcc-6.3.0.
> 
> I have two questions.
> 
> 
> 1) I get an error trying to link without -fno-use-linker-plugin
> 
> gfortran *.o -o test
> collect2: fatal error: cannot find 'ld'
> compilation terminated.
> 
>>From the documentation, I see that this should not be a problem with
> ld >= 2.21, and I have 2.26.1. Also, using gfortran compiled by myself
> I don't need this option. Is this expected?
> 

ld >= 2.21 definitely has plugin support.
You probably need the package binutils-gold for this to work.


> 
> 2) Trying to do static linking with "-static" I get the error
> 
> <local-installation-path>/bin/../lib/gcc/x86_64-pc-linux-gnu/6.3.0/../../../../lib64/libgfortran.a(unix.o):
> In function `tempfile':
> /tmp/gcc-6.3.0-build/x86_64-pc-linux-gnu/libgfortran/../../../gcc-6.3.0-source/gcc-6.3.0/libgfortran/io/unix.c:1208:
> undefined reference to `__secure_getenv'
> collect2: error: ld returned 1 exit status
> 

Hmm, I do see it, too. No idea. I will investigate, seems to be quite a mess.
If someone has a clue, I would appreciate it.

The build system has binutils-2.25, as I got troubles building gfortran
with older binutils. I don't know if this has something to do with it.


Cheers, and sorry for the mess,
Manfred



> Again, I don't see this problem using gfortran compiled by myself. How
> could I fix this?
> 
> 
> Thank you,
>    Marco
> 



More information about the Fortran mailing list