<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Hello,<br>
<br>
I am trying to compile a Firebird UDF library with fpc 2.0.0 under on<br>
the amd64 architecture (precisely: ubuntu dapper preview release),<br>
but unfortunately I hit bug 4733...<br>
That is: The code compiles fine, but fails to link, here below the<br>
complete error:<br>
<br>
<br>
yves@dapper64:~/subversion/linux/UdfLib$ make<br>
fpc -Sd UdfLib.dpr<br>
Free Pascal Compiler version 2.0.0 [2005/05/15] for x86_64<br>
Copyright (c) 1993-2005 by Florian Klaempfl<br>
Target OS: Linux for x86-64<br>
Compiling UdfLib.dpr<br>
Assembling udflib<br>
Linking libUdfLib.so<br>
/usr/bin/ld: /usr/lib/fpc/2.0.0/units/x86
<div style="direction: ltr;"><wbr>_64-linux/rtl/system.o:<br>
relocation R_X86_64_32S against `TC_SYSTEM_ISMULTITHREAD' can not be<br>
used when making a shared object; recompile with -fPIC<br>
/usr/lib/fpc/2.0.0/units/x86<wbr>_64-linux/rtl/system.o: could not read<br>
symbols: Bad value<br>
UdfLib.dpr(86) Error: Error while linking<br>
Error: /usr/bin/ppcx64 returned an error exitcode (normal if you did<br>
not specifiy a source file to be compiled)<br>
make: *** [all] Error 1<br>
yves@dapper64:~/subversion/linux/UdfLib$<br>
<br>
<br>
Now, brave as I am I checked out svn and tried to build the beast,<br>
with the -fPIC directive, but I failed miserably<br>
because I could simply not figure out where to set that flag. I tried<br>
different makefiles but none seemed to<br>
make it for me...<br>
(Generally, I am not even sure compiling with -fPIC will resolve my
problem...)<br>
<br>
I would be very thankful for any hint on how to get the code to link :-)<br>
<br>
Best regards,<br>
Yves<br>
<br>
<br>
p.s.<br>
I should mention that the mentioned UDF library builds, links and runs<br>
fine one the i386 platform (Tested on debian sarge and sid)<br>
The debs I used to install fpc are these:<br>
<a onclick="return top.js.OpenExtLink(window,event,this)"
href="ftp://ftp.freepascal.org/pub/fpc/dist/i386-linux-2.0.0/deb/"
target="_blank">ftp://ftp.freepascal.org/pub<wbr>/fpc/dist/i386-linux-2.0.0/deb<wbr>/</a><br>
<br>
</div>
</body>
</html>