[Pkg-openmpi-maintainers] Bug#608901: link failure with ld --as-needed

Ralf Wildenhues Ralf.Wildenhues at gmx.de
Tue Jan 4 19:56:37 UTC 2011


Hello Matthias,

* Matthias Klose wrote on Tue, Jan 04, 2011 at 02:57:41PM CET:
> With gcc, gcc-4.5 and binutils from experimental, the following
> configure test (taken from petsc) fails with --as-needed:
> 
> $ cat test.F
>       program main
>        include 'mpif.h'
>        integer ierr
>        call mpi_init(ierr)
>       end
> 
> $ mpif90 test.F -Wl,--as-needed -Wall -Wno-unused-variable -g
> -I/usr/lib/openmpi/include -I/usr/lib/openmpi/lib
> -L/usr/lib/openmpi/lib -L/usr/lib/gcc/i686-linux-gnu/4.5.2 -ldl
> -lmpi -lopen-rte -lopen-pal -lnsl -lutil -lgcc_s -lpthread
> -ldl
> /usr/bin/ld: /tmp/cccq3IWF.o(.debug_info+0x48d): unresolvable
> R_X86_64_64 relocation against symbol `mpi_fortran_argv_null_'
[...]
> the error messages hint to an object file not built with -fPIC, but
> I didn't find one yet.

Can you show -showme and -v output?

Thanks,
Ralf






More information about the Pkg-openmpi-maintainers mailing list