[fpc-devel] Hitting bug 4733

Yves Glodt yglodt at gmail.com
Wed Apr 5 20:29:24 CEST 2006


Hello,

I am trying to compile a Firebird UDF library with fpc 2.0.0 under on
the amd64 architecture (precisely: ubuntu dapper preview release),
but unfortunately I hit bug 4733...
That is: The code compiles fine, but fails to link, here below the
complete error:


yves at dapper64:~/subversion/linux/UdfLib$ make
fpc -Sd UdfLib.dpr
Free Pascal Compiler version 2.0.0 [2005/05/15] for x86_64
Copyright (c) 1993-2005 by Florian Klaempfl
Target OS: Linux for x86-64
Compiling UdfLib.dpr
Assembling udflib
Linking libUdfLib.so
/usr/bin/ld: /usr/lib/fpc/2.0.0/units/x86_64-linux/rtl/system.o:
relocation R_X86_64_32S against `TC_SYSTEM_ISMULTITHREAD' can not be
used when making a shared object; recompile with -fPIC
/usr/lib/fpc/2.0.0/units/x86_64-linux/rtl/system.o: could not read
symbols: Bad value
UdfLib.dpr(86) Error: Error while linking
Error: /usr/bin/ppcx64 returned an error exitcode (normal if you did
not specifiy a source file to be compiled)
make: *** [all] Error 1
yves at dapper64:~/subversion/linux/UdfLib$


Now, brave as I am I checked out svn and tried to build the beast,
with the -fPIC directive, but I failed miserably
because I could simply not figure out where to set that flag. I tried
different makefiles but none seemed to
make it for me...
(Generally, I am not even sure compiling with -fPIC will resolve my problem...)

I would be very thankful for any hint on how to get the code to link :-)

Best regards,
Yves


p.s.
I should mention that the mentioned UDF library builds, links and runs
fine one the i386 platform (Tested on debian sarge and sid)
The debs I used to install fpc are these:
ftp://ftp.freepascal.org/pub/fpc/dist/i386-linux-2.0.0/deb/


More information about the fpc-devel mailing list