Welcome, Guest
Username: Password: Remember me
CodeTyphon Web Development Pas2JS, WASM, etc, discussions and problems
  • Page:
  • 1

TOPIC:

linker error 5 months 4 weeks ago #18534

  • Michael
  • Michael's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 17
  • Thank you received: 0
Dear all...

finally I found some time to progress on my raspberry pi apache module project... at least it compiles now.
Though my problem is now the linker. When compiling the apache module I get the following errors:

Warning: linker: /usr/bin/ld: /home/pi/fronius/ApacheWebModule/FPC/lib/aarch64-linux/mod_fronius.o: relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol `fronius_module' which may bind externally can not be used when making a shared object; recompile with -fPIC
Error: /home/pi/fronius/ApacheWebModule/FPC/lib/aarch64-linux/mod_fronius.o: in function `P$MOD_FRONIUS_$$_main':
Error: /home/pi/fronius/ApacheWebModule/FPC//mod_fronius.ppr:37:(.text.n_p$mod_fronius_$$_main+0xa4): dangerous relocation: unsupported relocation
mod_fronius.ppr(42,0) Error: Error while linking

I have no idea what to do here... actually I also added the option -fPIC as suggested in the warning and did a complete rebuild with no effect.

Anyone has actually a clue what that error could mean?

kind regards

 Mike
 

Please Log in or Create an account to join the conversation.

linker error 5 months 4 weeks ago #18535

  • Matis A.
  • Matis A.'s Avatar
  • Away
  • Moderator
  • Moderator
  • Posts: 1132
  • Thank you received: 170
Please Sir
More info:
-Your CT version?
-Your PI hardware version?
-Your PI OS ?
-etc..
PilotLogic Core Programmer

Please Log in or Create an account to join the conversation.

linker error 5 months 4 weeks ago #18536

  • Michael
  • Michael's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 17
  • Thank you received: 0
Dear moderator.

I currently use 8.3 on a raspi 4B - I think it's the "bookworm" release I use...

I just stumbled over
forum.lazarus.freepascal.org/index.php?topic=24440.0
could that be a solution and if so how do I apply that on codetyphon?

 
 

Please Log in or Create an account to join the conversation.

linker error 5 months 3 weeks ago #18537

  • Matis A.
  • Matis A.'s Avatar
  • Away
  • Moderator
  • Moderator
  • Posts: 1132
  • Thank you received: 170
My suggestion
Use CT ver 8.4 or LAB ver 8.5
PilotLogic Core Programmer

Please Log in or Create an account to join the conversation.

Last edit: by Matis A..

linker error 5 months 3 weeks ago #18538

  • Michael
  • Michael's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 17
  • Thank you received: 0
I updated to 8.4 via the update manager... still the same problem.
Does this error ocure due to a third party shared module, a package or is this a general error when creating an apache shared module? I don't understand the source of the problem :/

I have the same problem if I create an empty fresh new apache module :/

Please Log in or Create an account to join the conversation.

Last edit: by Michael.

linker error 4 months 3 weeks ago #18557

  • Michael
  • Michael's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 17
  • Thank you received: 0
Finally - I think I found the reason why the linker is having troubles.
In the standard apache export there is the module record exported! If one accesses this record within
the shared module the linker starts to complain.

How can I circumvent this?

My idea would be to export a function that returns the content of the apache module but I'm not sure if apache allows that :(

Please Log in or Create an account to join the conversation.

  • Page:
  • 1