Recent

Author Topic: [SOLVED] Error while linking during rebuilding the IDE Lazarus 1.6.4+FPC 3.0.2  (Read 22739 times)

cpicanco

  • Hero Member
  • *****
  • Posts: 618
  • Behavioral Scientist and Programmer
    • Portfolio
I am guessing this issue will be properly resolved when unstable debian becomes stable. It seems that official (from Lazarus) FPC 3.0.2 was compiled using unstable debian source. If you are someone from the official release team, please, could you confirm if this is the case? Also, can you imagine some alternative solution in order to avoid such problems for future releases? Newbies like me will appreciate. Thanks.

PS.: The fix is just a workaround. As noted by Marco van de Voort, there is no official release of FPC *.deb files. In other words, the Lazarus Team (not FPC Team) is redistributing a buggy .deb FPC file. 
« Last Edit: May 30, 2017, 06:32:15 pm by cpicanco »
Be mindful and excellent with each other.
https://github.com/cpicanco/

csukuangfj

  • Newbie
  • Posts: 1
The following fixed the issue for me.

Code: Bash  [Select][+][-]
  1. cd /usr/share/fpcsrc/3.0.3
  2. sudo make clean all OS_TARGET=linux CPU_TARGET=x86_64
  3. sudo make install OS_TARGET=linux CPU_TARGET=x86_64 INSTALL_PREFIX=/usr
  4.  


Thank you for the hint. It solves my problem.

fmolina

  • New Member
  • *
  • Posts: 40
Hi,

I found the same problem with Laz 1.8.0 + FPC 3.0.4 release (not with RCs!). The hint by cpicanco worked for me also. Lazarus 1.8.0 + FPC 3.0.4 fresh install on Mageia linux 6 x64.

dima

  • Newbie
  • Posts: 4
Hi,

Code: Pascal  [Select][+][-]
  1.  /usr/bin/ld: /usr/lib/fpc/3.0.2/units/x86_64-linux/rtl/cprt0.o: unrecognized relocation (0x2a) in section `.text'

when I removed/deleted cprt0.o the  problem have solved, fpc somehow can ignore and compile without that file. I agree that is bad way to fix. The chipanco's hint's unfortunately did not work on my system.
 
fpc_3.0.4.x86_64
Lazarus 1.8.2
CentOS-7

tintinux

  • Sr. Member
  • ****
  • Posts: 325
    • Gestinux
Hi

This is not solved, I have the same problem with 1.8.4-0_amd64.deb and FPC fpc_3.0.4-3_amd64 downloaded from SourceForge.

I tried this (replacing 3.0.3 by 3.0.4 the only one FPC version I have) :

Code: Text  [Select][+][-]
  1. cd /usr/share/fpcsrc/3.0.4
  2. sudo make clean all OS_TARGET=linux CPU_TARGET=x86_64

but it ends with :

Makefile:2790: *** The only supported starting compiler version is 3.0.2. You are trying to build with 3.0.4..

What should I do ?

Thanks

Initiator of gestinux, open-source, multi-database and multilingual accounting and billing software made with LAZARUS.

You can help to develop, to make and improve translations, and to provide examples of legal charts and reports from more countries.

TCH

  • Full Member
  • ***
  • Posts: 200
Hi

This is not solved, I have the same problem with 1.8.4-0_amd64.deb and FPC fpc_3.0.4-3_amd64 downloaded from SourceForge.

I tried this (replacing 3.0.3 by 3.0.4 the only one FPC version I have) :

Code: Text  [Select][+][-]
  1. cd /usr/share/fpcsrc/3.0.4
  2. sudo make clean all OS_TARGET=linux CPU_TARGET=x86_64

but it ends with :

Makefile:2790: *** The only supported starting compiler version is 3.0.2. You are trying to build with 3.0.4..

What should I do ?

Thanks

I've ran into the very same problem than you and solved it by this way:
Code: Bash  [Select][+][-]
  1. make clean all OS_TARGET=linux CPU_TARGET=x86_64 OVERRIDEVERSIONCHECK=1
« Last Edit: September 10, 2018, 12:18:11 pm by TCH »

tintinux

  • Sr. Member
  • ****
  • Posts: 325
    • Gestinux
Thanks, I can compile this way.

@othergeeks: why is this required ?  The Linux installation on a clean machine should be easier !

Regards
Initiator of gestinux, open-source, multi-database and multilingual accounting and billing software made with LAZARUS.

You can help to develop, to make and improve translations, and to provide examples of legal charts and reports from more countries.

Awesome Programmer

  • Sr. Member
  • ****
  • Posts: 451
  • Programming is FUN only when it works :)
    • Cool Technology
 :( :( :( :o :o :o

It looks like this bug is not fixed yet on the latest Lazarus 2.0.0 and FPC 3.0.4.
I just installed them both and simply started Lazarus. Then, clicked on RUN --> BUILD. And it is complaining: Error 1: Error While Linking.
I don't think this time it has to do with SQLite package.

And these commands DID NOT fix my problem. Well, if no one comes back with a helping hints or clues or solution, I will have to go back to 1.2.4 version.
Code: Pascal  [Select][+][-]
  1.     cd /usr/share/fpcsrc/3.0.3
  2.     sudo make clean all OS_TARGET=linux CPU_TARGET=x86_64
  3.     sudo make install OS_TARGET=linux CPU_TARGET=x86_64 INSTALL_PREFIX=/usr
  4.      

tintinux

  • Sr. Member
  • ****
  • Posts: 325
    • Gestinux
Hi

Yes, the issue is still there with Lazarus 2.0.0 downloaded from SourceForge

After installation, and before rebuilding to install packages we need to execute :
Code: Pascal  [Select][+][-]
  1.    
  2. cd /usr/share/fpcsrc/3.0.4
  3. sudo make clean all OS_TARGET=linux CPU_TARGET=x86_64 OVERRIDEVERSIONCHECK=1
  4. sudo make install OS_TARGET=linux CPU_TARGET=x86_64 INSTALL_PREFIX=/usr
  5. sudo rm -R /usr/share/lazarus/2.0.0/lcl/units/x86_64-linux
  6.  

The last line is necessary to avoid messages about duplicate units

But isn't it possible to fix this problem ?
« Last Edit: April 01, 2019, 05:58:00 pm by tintinux »
Initiator of gestinux, open-source, multi-database and multilingual accounting and billing software made with LAZARUS.

You can help to develop, to make and improve translations, and to provide examples of legal charts and reports from more countries.

svd71

  • New Member
  • *
  • Posts: 29
Hi,

I have follows problem with Lazarus 2.0.2, fpc 3.0.4 under LUbuntu 14.02 (x86_64).

Quote
Lazarus.pp(165,1) Error: Error while linking

howardpc

  • Hero Member
  • *****
  • Posts: 4144
Right-click on the Messages window and from the Copy menu choose "Copy All/Original Messages to Clipboard" and paste the full output here. It is quite likely to include details about why linking failed.

 

TinyPortal © 2005-2018