Recent

Author Topic: Unable to link Lazarus project under Debian 12 (32-bit)  (Read 2370 times)

fedkad

  • Full Member
  • ***
  • Posts: 176
Unable to link Lazarus project under Debian 12 (32-bit)
« on: August 27, 2023, 01:45:48 pm »
I am in the latest 32-bit version of Debian with a freshly installed latest FPC (3.2.2) and Lazarus (2.2.6).

I am getting the following errors during linking:

Warning: linker: /usr/bin/ld: /usr/lib/fpc/3.2.2/units/i386-linux/rtl/si_c21.o: in function `SI_C21_$$__FPC_LIBC21_START':
Error: si_c21.pp:(.text.n_si_c21_$$__fpc_libc21_start+0x27): undefined reference to `__libc_csu_fini'
Warning: linker: /usr/bin/ld: si_c21.pp:(.text.n_si_c21_$$__fpc_libc21_start+0x2c): undefined reference to `__libc_csu_init'


I think there is a version problem with the library. The currently installed gcc --version is gcc (Debian 12.2.0-14) 12.2.0  and libc-bin/stable,now 2.36-9+deb12u1 i386.

Lazarus 2.2.6 / FPC 3.2.2 on x86_64-linux-gtk2 (Ubuntu/GNOME) and x86_64-win64-win32/win64 (Windows 11)

myisjwj

  • Jr. Member
  • **
  • Posts: 70
Re: Unable to link Lazarus project under Debian 12 (32-bit)
« Reply #1 on: August 27, 2023, 02:26:48 pm »
What if the si_c21.so file is missing from a directory like LazarusFPC\cross\lib\x86_64-linux

fedkad

  • Full Member
  • ***
  • Posts: 176
Re: Unable to link Lazarus project under Debian 12 (32-bit)
« Reply #2 on: August 27, 2023, 02:39:37 pm »
What if the si_c21.so file is missing from a directory like LazarusFPC\cross\lib\x86_64-linux

This is a test VirtualBox system created specifically for compiling 32-bit Linux projects. So, I am not cross-compiling. I am just trying to create a native 32-bit (i386) executable.
« Last Edit: August 27, 2023, 02:41:22 pm by fedkad »
Lazarus 2.2.6 / FPC 3.2.2 on x86_64-linux-gtk2 (Ubuntu/GNOME) and x86_64-win64-win32/win64 (Windows 11)

zeljko

  • Hero Member
  • *****
  • Posts: 1602
    • http://wiki.lazarus.freepascal.org/User:Zeljan
Re: Unable to link Lazarus project under Debian 12 (32-bit)
« Reply #3 on: August 27, 2023, 03:15:03 pm »
You should try with fpc fixes_3_0 (if possible), there are some related changes.

fedkad

  • Full Member
  • ***
  • Posts: 176
Re: Unable to link Lazarus project under Debian 12 (32-bit)
« Reply #4 on: August 27, 2023, 05:03:13 pm »
I gave up and installed fpc and lazarus from debian's repository, instead of downloading and installing manually from Lazarus' web site. The problem seems to be fixed.
Lazarus 2.2.6 / FPC 3.2.2 on x86_64-linux-gtk2 (Ubuntu/GNOME) and x86_64-win64-win32/win64 (Windows 11)

esdonis

  • Jr. Member
  • **
  • Posts: 61
Unable to link Lazarus project under Debian 12 (32-bit)
« Reply #5 on: January 04, 2024, 10:24:59 pm »
But how did you do it because I have the same problem and when I install the fpc from the repository it uninstalls lazarus and in the repository I do not have version 3 of lazarus which is the one I want to install

PascalDragon

  • Hero Member
  • *****
  • Posts: 5526
  • Compiler Developer
Re: Unable to link Lazarus project under Debian 12 (32-bit)
« Reply #6 on: January 05, 2024, 07:33:10 am »
But how did you do it because I have the same problem and when I install the fpc from the repository it uninstalls lazarus and in the repository I do not have version 3 of lazarus which is the one I want to install

Just use FPC from the repository and build/install Lazarus manually. Though you might need to manually select the necessary subpackages of FPC from the package manager.

fedkad

  • Full Member
  • ***
  • Posts: 176
Re: Unable to link Lazarus project under Debian 12 (32-bit)
« Reply #7 on: January 05, 2024, 09:27:57 am »
But how did you do it because I have the same problem and when I install the fpc from the repository it uninstalls lazarus and in the repository I do not have version 3 of lazarus which is the one I want to install
As far as I remember (not 100% sure):
  • First, I removed fpc and Lazarus from the system.
  • Then, installed fpc from standard Debian repository.
  • Then, installed the downloaded package of Lazarus manually using: sudo dpkg -i --force-all ~/Downloads/lazarus-project_3.0.0-0_i386.deb
Can you try and post about your experience?
Lazarus 2.2.6 / FPC 3.2.2 on x86_64-linux-gtk2 (Ubuntu/GNOME) and x86_64-win64-win32/win64 (Windows 11)

esdonis

  • Jr. Member
  • **
  • Posts: 61
Re: Unable to link Lazarus project under Debian 12 (32-bit)
« Reply #8 on: January 05, 2024, 10:49:57 pm »
I used your suggestion, but it left my references broken, so I had to edit the .deb package. I consider this aspect to be a botch job, so I am going to leave the study of the fpc problem pending for another day.

 

TinyPortal © 2005-2018