[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Linking errors from gplc with ld 2.28
From: |
Keri Harris |
Subject: |
Re: Linking errors from gplc with ld 2.28 |
Date: |
Mon, 24 Jul 2017 09:37:52 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 |
On 21/07/2017 12:25, Jasper Taylor wrote:
I just upgraded my Debian box from Jessie to Stretch and I find I can no
longer use gplc to convert Prolog code into executables. I get a lot of
error messages starting as follows...
/usr/bin/ld: /tmp/gplcMP1nIg.o: relocation R_X86_64_32S against `.text'
can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /usr/local/gprolog-1.4.4/lib/all_pl_bips.o: relocation
R_X86_64_32S against `.text' can not be used when making a shared
object; recompile with -fPIC
/usr/bin/ld: /usr/local/gprolog-1.4.4/lib/all_fd_bips.o: relocation
R_X86_64_32S against `.text' can not be used when making a shared
object; recompile with -fPIC
.
.
/usr/bin/ld: final link failed: Nonrepresentable section on output
collect2: error: ld returned 1 exit status
compilation failed
The first line refers to the object file generated from the Prolog code,
subsequent lines to objects included in the gprolog installation. Debian
Stretch includes ld version 2.28, while systems on which gplc works
properly include ld version 2.25.
Adding -C '-fPIC' makes no difference, presumably because the c compiler
is not used when converting Prolog code to executable. Adding -A -'fPIC'
produces an error message from the assembler, presumably because
position-independence is determined in the assembly language code and
cannot be added by the assembler.
I get similar errors attempting to recompile gprolog on the new system.
Does anyone know what is going on?
It's quite possible that this particular problem has been fixed by
upstream commit cc8249 [1]. Are you able to apply that fix and rebuild
gprolog?
Thanks
Keri
[1] https://sourceforge.net/p/gprolog/code/ci/cc8249