Sign in Join

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

Mailing lists / fpc-pascal / 2009-01

Library Project raises Linker Error Hints at -fPIC option

4 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

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

Andrew Brunner

I'm looking for a reason why I get this error while linking a compile of a Shared Object I'm building under x64 (Ubuntu).

BinUtils 2.19 (Started with 2.18) but 2.19 did not fix problem. FPC 2.2.3 (1/6/2009)
Lazarus SVN RVN :17967 0.9.27 beta

Error while building.

/usr/local/bin/ld:
libpuMatrixMemoryThread.a(uMatrixMemoryThread0s8.o): relocation R_X86_64_32S against `TC_UMATRIXMEMORYTHREAD_EVENT_ITEM_NUMBER' can not be used when making a shared object; recompile with -fPIC

-------------------------------------

The assignable typed constant is declared inside the localized unit file. It's not global but it's right after the implementation declaration

implementation
Const
  Event_Item_Number              : DWORD   = 1;

-------------------------------------

Can anyone tell me why this would be a problem or what I need to do to get FPC to build or LD to link properly? I've added the -fPIC option to pass to the linker in Lazarus but to no avail.... Please help...

Thanks.

Reply by email

Jonas Maebe
to Andrew Brunner
Andrew Brunner wrote
Can anyone tell me why this would be a problem or what I need to do to get FPC to build or LD to link properly?

It sounds like a bug in the code generator. Please submit a bug report with a compilable library that demonstrates the program.

Jonas

Reply by email

Andrew Brunner
to Jonas Maebe

Hi Jonas,

I posted bug with source. Here is a link
http://bugs.freepascal.org/view.php?id=12940

Thanks, -Andy

Jonas Maebe wrote 15 lines
On 07 Jan 2009, at 03:46, Andrew Brunner wrote: > Can anyone tell me why this would be a problem or what I need to do to > get FPC to build or LD to link properly? It sounds like a bug in the code generator. Please submit a bug report with a compilable library that demonstrates the program. Jonas _______________________________________________ fpc-pascal maillist - http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply by email

Andrew Brunner
to Andrew Brunner: I'm looking for a reason why I get this error while linking a compile of a Shared Object…

I'm still unable to build my libraries. Can I get anyone to help? :-)

Andrew Brunner wrote 35 lines
I'm looking for a reason why I get this error while linking a compile of a Shared Object I'm building under x64 (Ubuntu). BinUtils 2.19 (Started with 2.18) but 2.19 did not fix problem. FPC 2.2.3 (1/6/2009) Lazarus SVN RVN :17967 0.9.27 beta Error while building. /usr/local/bin/ld: libpuMatrixMemoryThread.a(uMatrixMemoryThread0s8.o): relocation R_X86_64_32S against `TC_UMATRIXMEMORYTHREAD_EVENT_ITEM_NUMBER' can not be used when making a shared object; recompile with -fPIC ------------------------------------- The assignable typed constant is declared inside the localized unit file. It's not global but it's right after the implementation declaration implementation Const Event_Item_Number : DWORD = 1; ------------------------------------- Can anyone tell me why this would be a problem or what I need to do to get FPC to build or LD to link properly? I've added the -fPIC option to pass to the linker in Lazarus but to no avail.... Please help... Thanks.

Reply by email