Public bug reported:

$ 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_'

works with --no-as-needed.

** Affects: binutils (Ubuntu)
     Importance: Undecided
         Status: New

** Affects: openmpi (Ubuntu)
     Importance: Undecided
         Status: New

** Affects: openmpi (Debian)
     Importance: Unknown
         Status: Unknown

** Also affects: binutils (Ubuntu)
   Importance: Undecided
       Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/697229

Title:
  openmpi link failure with ld --as-needed

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to