[fpc-devel] FPC 3.0.4 ld error on opensuse 13.2
Nikolai Zhubr
n-a-zhubr at yandex.ru
Tue Jul 9 19:46:07 CEST 2019
Hi all,
I've just discovered fpc-3.0.4-1.x86_64.rpm does not quite work on
opensuse 13.2. That is, linking helloworld fails with:
fpc hello.pas
Free Pascal Compiler version 3.0.4 [2017/10/02] for x86_64
Copyright (c) 1993-2017 by Florian Klaempfl and others
Target OS: Linux for x86-64
Compiling hello.pas
Linking hello
/usr/bin/ld: warning: link.res contains output sections; did you forget -T?
/usr/bin/ld: /usr/lib64/fpc/3.0.4/units/x86_64-linux/rtl/prt0.o:
unrecognized relocation (0x2a) in section `.text'
/usr/bin/ld: final link failed: Bad value
hello.pas(7,1) Error: Error while linking
hello.pas(7,1) Fatal: There were 1 errors compiling module, stopping
Fatal: Compilation aborted
Error: /usr/bin/ppcx64 returned an error exitcode
Meanwhile, fpc-2.6.4-1.x86_64.rpm does work fine.
/usr/bin/ld --version
GNU ld (GNU Binutils; openSUSE 13.2) 2.24.0.20140403-6.1
Of course this ld is pretty old, so my first thought was that I need
some newer binutils. However, I've found fpcbuild-3.0.4.zip contains
2.22 version (for windows, but anyway), and also on windows I use
cross-binutils 2.16 and 2.31 (and they work fine and produce perfectly
valid linux-i386 and linux-arm executables), so now I'm somewhat
confused about what to do next. AFAICS docs does not explicitely mention
any particular binutils requirement. I could repackage/patch/replace
stock binutils package, but because I don't understand the exact reason
for the error, I thought I'd ask for advice first.
Thank you,
Regards,
Nikolai
More information about the fpc-devel
mailing list