Le 12/12/2017 à 20:49, Mattias Gaertner a écrit :
Show quoted text 10 lines
Hi,
I installed fpc-3.0.4-1.x86_64.rpm from sourceforge on CentOS 7 and
compiling even the simplest of programs gives:
/bin/ld: /usr/lib64/fpc/3.0.4/units/x86_64-linux/rtl/cprt0.o:
unrecognized relocation (0x2a) in section `.text'
/bin/ld: final link failed: Bad value
Is this known?
Yes and no ...
Relocation R_X86_64_REX_GOTP (0x2a) is a new relocation type that was recently introduced in GNU binutils 2.26 for x86_64 (aka amd64) CPUs.
This problem has been reported in
https://bugs.freepascal.org/view.php?id=32251
Normally the .tar file should have been generated on a system that uses an earlier GNU binutils version, avoiding the problem if a Free Pascal program is linked using a less recent GNU linker version.
Apparently, we did not check that this was also the case for the RPM file.
Could you please test the tar installer (or copy the rtl/*prt*.o from the tar installation
to /usr/lib64/fpc/3.0.4/units/x86_64-linux/rtl/ directory) and report if this fixes the issue?
Alternatively, upgrading to a GNU linker version 2.26 or above should also fix the linker error.
Pierre Muller