Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2006-04

Hitting bug 4733

8 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Yves Glodt

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:

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

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/

Reply by email

Yves Glodt

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:

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

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/

Reply by email

Michael Van Canneyt
to Yves Glodt
Yves Glodt wrote 31 lines
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: 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 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.

Reply by email

Yves Glodt
to Michael Van Canneyt

On 07/04/06, Michael Van Canneyt wrote:

<snip>

Show quoted text 13 lines
> 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 ?

I can try this out this evening, I'll keep you informed !

Show quoted text 5 lines
Michael. _______________________________________________ fpc-devel maillist - http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply by email

Peter Vreman
to Yves Glodt
Show quoted text 22 lines
On 07/04/06, Michael Van Canneyt wrote: <snip> > > 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 > ? I can try this out this evening, I'll keep you informed !

Forget 2.0.x. The PIC support is only in 2.1.1 with the -Cp switch.

Reply by email

Yves Glodt
to Peter Vreman
Peter Vreman wrote
> On 07/04/06, Michael Van Canneyt wrote:

<snip>

Show quoted text 11 lines
>> > (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 >> ? > > I can try this out this evening, I'll keep you informed ! Forget 2.0.x. The PIC support is only in 2.1.1 with the -Cp switch.

ok, then I'll just have to update my svn copy.

In which makefile do I have to set the -Cp switch ?

Reply by email

Yves Glodt
to Yves Glodt
Yves Glodt wrote 20 lines
On 07/04/06, Peter Vreman wrote: > > On 07/04/06, Michael Van Canneyt wrote: <snip> > >> > (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 > >> ? > > > > I can try this out this evening, I'll keep you informed ! > > Forget 2.0.x. The PIC support is only in 2.1.1 with the -Cp switch. ok, then I'll just have to update my svn copy. In which makefile do I have to set the -Cp switch ?

Sorry for self-replying, but I tried to set -Cp in the toplevel Makefile, with no result...
Where can I set it that it applies globally? And also the install_prefix I need to
change (to /opt/fpc)

Best regards,
Yves

Reply by email