[fpc-devel] Hitting bug 4733

Michael Van Canneyt michael at freepascal.org
Fri Apr 7 09:06:05 CEST 2006



On Fri, 7 Apr 2006, Yves Glodt wrote:

> 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

-fPIC is for gcc, ld erroneously assumes that the code comes from gcc :-)

> 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...)

No.

I see that you have used version 2.0.0 of FPC. Can you try to use 2.0.2 ?

Michael.



More information about the fpc-devel mailing list