Dear all,
I have just installed Ubuntu 18.4 (64bit) with gfortran-7 or -8.
I need to re-compile additional sac programs.
In my previous system (ubuntu 16 64bit), I can compile the programs with no
error.
But now, I have problem with ld.
Here is output:
not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: sacio.a(rsac2.o): relocation R_X86_64_32 against `.rodata' can
not be used when making a PIE object; recompile with -fPIC
.... more lines ...
/usr/bin/ld: final link failed: Nonrepresentable section on output
collect2: error: ld returned 1 exit status
Do you have any suggestions?
Best regards
Onur
I have just installed Ubuntu 18.4 (64bit) with gfortran-7 or -8.
I need to re-compile additional sac programs.
In my previous system (ubuntu 16 64bit), I can compile the programs with no
error.
But now, I have problem with ld.
Here is output:
gfortran sac2xy.f sacio.a/usr/bin/ld: sacio.a(rsac1.o): relocation R_X86_64_32 against `.rodata' can
not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: sacio.a(rsac2.o): relocation R_X86_64_32 against `.rodata' can
not be used when making a PIE object; recompile with -fPIC
.... more lines ...
/usr/bin/ld: final link failed: Nonrepresentable section on output
collect2: error: ld returned 1 exit status
gfortran sac2xy.f sacio.a -fPICThis also gives the same error.
Do you have any suggestions?
Best regards
Onur
-
Sometimes adding “-m64” in the gfortran line may work.
Steve Gao
From: sac-help-bounce<at>iris.washington.edu <sac-help-bounce<at>iris.washington.edu> On Behalf Of Onur Tan
Sent: Friday, August 9, 2019 11:39 AM
To: SAC Help <sac-help<at>lists.ds.iris.edu>
Subject: [IRIS][sac-help] ERROR: compiling with sacio.a
Dear all,
I have just installed Ubuntu 18.4 (64bit) with gfortran-7 or -8.
I need to re-compile additional sac programs.
In my previous system (ubuntu 16 64bit), I can compile the programs with no error.
But now, I have problem with ld.
Here is output:
gfortran sac2xy.f sacio.a
/usr/bin/ld: sacio.a(rsac1.o): relocation R_X86_64_32 against `.rodata' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: sacio.a(rsac2.o): relocation R_X86_64_32 against `.rodata' can not be used when making a PIE object; recompile with -fPIC
.... more lines ...
/usr/bin/ld: final link failed: Nonrepresentable section on output
collect2: error: ld returned 1 exit status
gfortran sac2xy.f sacio.a -fPIC
This also gives the same error.
Do you have any suggestions?
Best regards
Onur
-
Dear All -
It looks like the SAC I/O library (sacio.a) was compiled with a different set of code generation options than your code is being compiled with. The order of the options matters in a case like this. Try
gfortran -fPIC sac2xy.f sacio.a
On 9 Aug 2019, at 17:39, Onur Tan <xonurtan<at>gmail.com> wrote:
George Helffrich
Dear all,
I have just installed Ubuntu 18.4 (64bit) with gfortran-7 or -8.
I need to re-compile additional sac programs.
In my previous system (ubuntu 16 64bit), I can compile the programs with no error.
But now, I have problem with ld.
Here is output:
gfortran sac2xy.f sacio.a
/usr/bin/ld: sacio.a(rsac1.o): relocation R_X86_64_32 against `.rodata' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: sacio.a(rsac2.o): relocation R_X86_64_32 against `.rodata' can not be used when making a PIE object; recompile with -fPIC
.... more lines ...
/usr/bin/ld: final link failed: Nonrepresentable section on output
collect2: error: ld returned 1 exit status
gfortran sac2xy.f sacio.a -fPIC
This also gives the same error.
Do you have any suggestions?
Best regards
Onur
----------------------
SAC Help
Topic home: http://ds.iris.edu/message-center/topic/sac-help/ | Unsubscribe: sac-help-unsubscribe<at>lists.ds.iris.edu
Sent from the IRIS Message Center (http://ds.iris.edu/message-center/)
Update subscription preferences at http://ds.iris.edu/account/profile/
george<at>elsi.jp
-
Dear all,
I tried all suggestions, but I cannot solve the problem.
Someone also suggest me to re-compile SAC to generate new lib file. But, configure script cannot find installed packages on the system :(
The latest version of SAC is 101.6a in 2013.
Is it possible to share new version with small bug-fixes after 6 years ?
Best regards
Onur
On 9 Aug 2019, at 22:22, George Helffrich <george<at>elsi.jp> wrote:
Dear All -
It looks like the SAC I/O library (sacio.a) was compiled with a different set of code generation options than your code is being compiled with. The order of the options matters in a case like this. Try
gfortran -fPIC sac2xy.f sacio.a
On 9 Aug 2019, at 17:39, Onur Tan <xonurtan<at>gmail.com <xonurtan<at>gmail.com>> wrote:
George Helffrich
Dear all,
I have just installed Ubuntu 18.4 (64bit) with gfortran-7 or -8.
I need to re-compile additional sac programs.
In my previous system (ubuntu 16 64bit), I can compile the programs with no error.
But now, I have problem with ld.
Here is output:
gfortran sac2xy.f sacio.a
/usr/bin/ld: sacio.a(rsac1.o): relocation R_X86_64_32 against `.rodata' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: sacio.a(rsac2.o): relocation R_X86_64_32 against `.rodata' can not be used when making a PIE object; recompile with -fPIC
.... more lines ...
/usr/bin/ld: final link failed: Nonrepresentable section on output
collect2: error: ld returned 1 exit status
gfortran sac2xy.f sacio.a -fPIC
This also gives the same error.
Do you have any suggestions?
Best regards
Onur
----------------------
SAC Help
Topic home: http://ds.iris.edu/message-center/topic/sac-help/ | Unsubscribe: sac-help-unsubscribe<at>lists.ds.iris.edu <sac-help-unsubscribe<at>lists.ds.iris.edu>
Sent from the IRIS Message Center (http://ds.iris.edu/message-center/)
Update subscription preferences at http://ds.iris.edu/account/profile/
george<at>elsi.jp <george<at>elsi.jp>
----------------------
SAC Help
Topic home: http://ds.iris.edu/message-center/topic/sac-help/ | Unsubscribe: sac-help-unsubscribe<at>lists.ds.iris.edu
Sent from the IRIS Message Center (http://ds.iris.edu/message-center/)
Update subscription preferences at http://ds.iris.edu/account/profile/
-