[Pkg-openmpi-maintainers] Bug#608901: link failure with ld --as-needed
Matthias Klose
doko at ubuntu.com
Tue Jan 4 13:57:41 UTC 2011
Package: openmpi,binutils
User: ubuntu-devel at lists.ubuntu.com
Usertags: origin-ubuntu natty ubuntu-patch
User: debian-gcc at lists.debian.org
Usertags: ld-as-needed
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_'
/usr/bin/ld: /tmp/cccq3IWF.o(.debug_info+0x4a7): unresolvable R_X86_64_64
relocation against symbol `mpi_fortran_argv_null_'
/usr/bin/ld: /tmp/cccq3IWF.o(.debug_info+0x511): unresolvable R_X86_64_64
relocation against symbol `mpi_fortran_errcodes_ignore_'
/usr/bin/ld: /tmp/cccq3IWF.o(.debug_info+0x52b): unresolvable R_X86_64_64
relocation against symbol `mpi_fortran_errcodes_ignore_'
the error messages hint to an object file not built with -fPIC, but I didn't
find one yet.
The -L/usr/lib/openmpi/lib is needed until bug #608717 is fixed.
More information about the Pkg-openmpi-maintainers
mailing list