[Bug 865353] Re: OpenMPI libraries are incompatible with --as-needed in gcc's link command
Matthias Klose
doko at ubuntu.com
Tue Oct 4 08:31:46 UTC 2011
looks like an issue with ld.bfd. you can work around it by using gold
for now.
mpif90 -B/usr/lib/gold-ld -g mpitest.f90
** Package changed: gcc-4.6 (Ubuntu) => binutils (Ubuntu)
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to binutils in Ubuntu.
https://bugs.launchpad.net/bugs/865353
Title:
OpenMPI libraries are incompatible with --as-needed in gcc's link
command
Status in “binutils” package in Ubuntu:
New
Bug description:
In Ubuntu 11.10 an application that links against libmpi_f77 of
OpenMPI 1.5.4 or 1.4.3 built from source *FAILS* to link due to
unresolvable relocations:
program main
include 'mpif.h'
integer ierr
call mpi_init(ierr)
end
marcusmae at loveland:~/Programming/mpitest$ mpif90 -g mpitest.f90
/usr/bin/ld: /tmp/cc3NLduM.o(.debug_info+0x542): unresolvable
R_X86_64_64 relocation against symbol `mpi_fortran_argv_null_'
/usr/bin/ld: /tmp/cc3NLduM.o(.debug_info+0x55c): unresolvable
R_X86_64_64 relocation against symbol `mpi_fortran_argv_null_'
/usr/bin/ld: /tmp/cc3NLduM.o(.debug_info+0x5d2): unresolvable
R_X86_64_64 relocation against symbol `mpi_fortran_errcodes_ignore_'
/usr/bin/ld: /tmp/cc3NLduM.o(.debug_info+0x5ec): unresolvable
R_X86_64_64 relocation against symbol `mpi_fortran_errcodes_ignore_'
The solution is to remove --as-needed from the linker command line in
gcc specs.
This issue is also described in http://bugs.debian.org/cgi-
bin/bugreport.cgi?bug=608901
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/binutils/+bug/865353/+subscriptions
More information about the foundations-bugs
mailing list