[Bug 841888] [NEW] GCC 4.6: "gfortran -g" makes ld complain loudly when the MPI libraries are used

pablomme pablomme at googlemail.com
Mon Sep 5 14:58:02 UTC 2011


Public bug reported:

This problem can be reproduced under oneiric beta 1 (amd64) with:

sudo apt-get install gfortran libopenmpi-dev openmpi-bin
cat > test.f90 <<EOF
 PROGRAM f90_test
 IMPLICIT NONE
 INCLUDE 'mpif.h'
 INTEGER t1,nnodes,my_node,ierror
 t1=mpi_version
 call mpi_init(ierror)
 call mpi_comm_size(mpi_comm_world,nnodes,ierror)
 call mpi_comm_rank(mpi_comm_world,my_node,ierror)
 if(my_node==nnodes-1)write(6,'(i1)')mpi_version
 call mpi_finalize(ierror)
 END PROGRAM f90_test
EOF
mpif90 -g -o test test.f90

The output from the latter command is:

/usr/bin/ld: /tmp/pablo/ccKeUZ2J.o(.debug_info+0x493): unresolvable R_X86_64_64 relocation against symbol `mpi_fortran_argv_null_'
/usr/bin/ld: /tmp/pablo/ccKeUZ2J.o(.debug_info+0x4ad): unresolvable R_X86_64_64 relocation against symbol `mpi_fortran_argv_null_'
/usr/bin/ld: /tmp/pablo/ccKeUZ2J.o(.debug_info+0x523): unresolvable R_X86_64_64 relocation against symbol `mpi_fortran_errcodes_ignore_'
/usr/bin/ld: /tmp/pablo/ccKeUZ2J.o(.debug_info+0x53d): unresolvable R_X86_64_64 relocation against symbol `mpi_fortran_errcodes_ignore_'

The compiled code does run:

$ ./test
2
$ _

but the above problem should be fixed nonetheless.

ProblemType: Bug
DistroRelease: Ubuntu 11.10
Package: gfortran 4:4.6.1-2ubuntu5
ProcVersionSignature: Ubuntu 3.0.0-10.16-generic 3.0.4
Uname: Linux 3.0.0-10-generic x86_64
Architecture: amd64
Date: Mon Sep  5 15:49:24 2011
InstallationMedia: Ubuntu 11.04 "Natty Narwhal" - Release amd64 (20110427.1)
ProcEnviron:
 LANGUAGE=en_GB:en
 PATH=(custom, user)
 LANG=en_GB.UTF-8
 SHELL=/bin/bash
SourcePackage: gcc-defaults
UpgradeStatus: Upgraded to oneiric on 2011-09-02 (3 days ago)

** Affects: gcc-defaults (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: amd64 apport-bug oneiric running-unity

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

Title:
  GCC 4.6: "gfortran -g" makes ld complain loudly when the MPI libraries
  are used

Status in “gcc-defaults” package in Ubuntu:
  New

Bug description:
  This problem can be reproduced under oneiric beta 1 (amd64) with:

  sudo apt-get install gfortran libopenmpi-dev openmpi-bin
  cat > test.f90 <<EOF
   PROGRAM f90_test
   IMPLICIT NONE
   INCLUDE 'mpif.h'
   INTEGER t1,nnodes,my_node,ierror
   t1=mpi_version
   call mpi_init(ierror)
   call mpi_comm_size(mpi_comm_world,nnodes,ierror)
   call mpi_comm_rank(mpi_comm_world,my_node,ierror)
   if(my_node==nnodes-1)write(6,'(i1)')mpi_version
   call mpi_finalize(ierror)
   END PROGRAM f90_test
  EOF
  mpif90 -g -o test test.f90

  The output from the latter command is:

  /usr/bin/ld: /tmp/pablo/ccKeUZ2J.o(.debug_info+0x493): unresolvable R_X86_64_64 relocation against symbol `mpi_fortran_argv_null_'
  /usr/bin/ld: /tmp/pablo/ccKeUZ2J.o(.debug_info+0x4ad): unresolvable R_X86_64_64 relocation against symbol `mpi_fortran_argv_null_'
  /usr/bin/ld: /tmp/pablo/ccKeUZ2J.o(.debug_info+0x523): unresolvable R_X86_64_64 relocation against symbol `mpi_fortran_errcodes_ignore_'
  /usr/bin/ld: /tmp/pablo/ccKeUZ2J.o(.debug_info+0x53d): unresolvable R_X86_64_64 relocation against symbol `mpi_fortran_errcodes_ignore_'

  The compiled code does run:

  $ ./test
  2
  $ _

  but the above problem should be fixed nonetheless.

  ProblemType: Bug
  DistroRelease: Ubuntu 11.10
  Package: gfortran 4:4.6.1-2ubuntu5
  ProcVersionSignature: Ubuntu 3.0.0-10.16-generic 3.0.4
  Uname: Linux 3.0.0-10-generic x86_64
  Architecture: amd64
  Date: Mon Sep  5 15:49:24 2011
  InstallationMedia: Ubuntu 11.04 "Natty Narwhal" - Release amd64 (20110427.1)
  ProcEnviron:
   LANGUAGE=en_GB:en
   PATH=(custom, user)
   LANG=en_GB.UTF-8
   SHELL=/bin/bash
  SourcePackage: gcc-defaults
  UpgradeStatus: Upgraded to oneiric on 2011-09-02 (3 days ago)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/gcc-defaults/+bug/841888/+subscriptions




More information about the foundations-bugs mailing list