gfortran unresolvable R_X86_64_PC32 relocation against symbol

Asked by Keping Xie

I compile my own code, which suffers the last step compiling. Error message.

gfortran -fno-automatic -O3 -std=c++11 -I ../mod/ -I ./inc -fPIC -o f06a.x f06a.o -L alib/ -l4min -l4ite -l4fit -l3dis -l3vbp -l3vpt -l3jet -l3hhk -l3wtt -l2prz -l2fnlo -l2appl -l2qnm -l2hoppet -l2lha -l2evl -l2ewk -l2qcd -l2cub -l1utl -L/home/kepingx/share/applgrid/lib -lfAPPLgrid -lAPPLgrid -L/home/kepingx/share/fastnlo/lib -lfastnlotoolkit -lstdc++ -lm -lgcc -lgcc_s
/usr/bin/ld: alib//lib2qnm.a(usrevol.o)(.text+0x7db): unresolvable R_X86_64_PC32 relocation against symbol `epsval_'
/usr/bin/ld: final link failed: Nonrepresentable section on output
collect2: error: ld returned 1 exit status
Makefile:152: recipe for target 'all' failed
make: *** [all] Error 1

The variable 'epsval' is defined by my own header file.

I tried the flag '-fPIC', both with and without it. But either works.
My gfortran version is
GNU Fortran (Ubuntu 5.5.0-12ubuntu1) 5.5.0 20171010
Copyright (C) 2015 Free Software Foundation, Inc.

And I work on the latest Ubuntu 18.04 LTS.

I switch it gfortran-4.8, 5, 6, 7, but it the problem is not solved for any of them.

Best regards,
KP

Question information

Language:
English Edit question
Status:
Expired
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Manfred Hampl (m-hampl) said :
#1

In a google search I found https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=713607 which looks quite similar.
There the cause seems to have been a double use of a variable name.

Have you tried renaming epsval to something different?

Revision history for this message
Keping Xie (kepingx) said :
#2

Hi Manfred,

This is not the variable doubly used problem. I tried to rename this variable, but similar problem happens to other variable. I forget to mention, this problem does not show up on my previous Ubuntu 16.04 or other system, such as SMP Web. It only happens when I update my OS to Ubuntu 18.04.

Best,
Keping

Revision history for this message
Launchpad Janitor (janitor) said :
#3

This question was expired because it remained in the 'Open' state without activity for the last 15 days.