Recent

Author Topic: Lazarus Release 3.0  (Read 135439 times)

dbannon

  • Hero Member
  • *****
  • Posts: 3556
    • tomboy-ng, a rewrite of the classic Tomboy
Re: [solved] Cannot install, missing fpc-laz
« Reply #150 on: February 20, 2024, 12:53:25 pm »


.....I am trying to follow the instructions at the wiki: https://wiki.freepascal.org/Installing_Lazarus_on_Linux

...... I think I need to install some gtk libraries for it to work correctly in my debian 12 / regolith3 desktop, but which ones?

The required libraries are listed on that page were on earlier, https://wiki.freepascal.org/Installing_Lazarus_on_Linux. All the libraries themselves will probably be present but you need the -dev libraries at link time. (Hmm, wild idea, when you say "gtk libraries, you mean gtk2 don't you ?  gtk3 is not ready for prime time yet. Qt5 is good ...)

Or, a variation of Juha's suggestion, add Debian Backports to your Bullseye repo and you will get the current release.

Davo
Lazarus 3, Linux (and reluctantly Win10/11, OSX Monterey)
My Project - https://github.com/tomboy-notes/tomboy-ng and my github - https://github.com/davidbannon

99Percent

  • Full Member
  • ***
  • Posts: 160
Re: Lazarus Release 3.0
« Reply #151 on: February 20, 2024, 08:27:44 pm »
I think my debian 12/Regolith3 is not playing nice. I am going instead to try install a QEMU VM with plain Ubuntu 22.04 and just use that for lazarus development. I did that once and it worked ok.

dbannon

  • Hero Member
  • *****
  • Posts: 3556
    • tomboy-ng, a rewrite of the classic Tomboy
Re: Lazarus Release 3.0
« Reply #152 on: February 21, 2024, 12:28:42 am »
Can I suggest you use U20.04, it has almost no SNAPs (smaller and faster) and binaries you make there will run on (almost) all OS. If you use U22.04, you get the new glibc and binaries it makes will not run on (eg) U20.04, Buster etc.

I am still running U20.04 on my day to day machine, have to update sooner or later but I keep a Virtual Box VM with an untouched U20.04 as my release build machine anyway.

Davo

Lazarus 3, Linux (and reluctantly Win10/11, OSX Monterey)
My Project - https://github.com/tomboy-notes/tomboy-ng and my github - https://github.com/davidbannon

matthius

  • Full Member
  • ***
  • Posts: 175
  • Creating VRAD...
    • LIBERLOG - Développement rapide
Re: Lazarus Release 3.0 - virtualtrees
« Reply #153 on: February 23, 2024, 11:45:27 am »
Lazarus recompile virtualtrees package on linux.

So i cannot build lazarus with last deb installer.
M. GIROUX
13 rue Tanguy PRIGENT
35000 RENNES - France
http://liberlog.fr

Thaddy

  • Hero Member
  • *****
  • Posts: 18321
  • Here stood a man who saw the Elbe and jumped it.
Re: Lazarus Release 3.0
« Reply #154 on: February 23, 2024, 01:04:59 pm »
Davo gave you already the answer, to which I might add: also on bookworm Debians like Ubuntu you should add Backports.
That will give you FPC 3.2.2 + Lazarus 3.0. And those are current releases.
« Last Edit: February 23, 2024, 01:06:48 pm by Thaddy »
Due to censorship, I changed this to "Nelly the Elephant". Keeps the message clear.

cdbc

  • Hero Member
  • *****
  • Posts: 2464
    • http://www.cdbc.dk
Re: Lazarus Release 3.0
« Reply #155 on: February 23, 2024, 09:49:29 pm »
Hi
Upon compiling an old project in laz 3.0 - fpc 3.3.1, I get these errors:
Quote
maskedit.pp(563,0) Error: linker: undefined reference to `LAZUTF8_$$_UTF8CODEPOINTSIZEFULL$PCHAR$$LONGINT'
and
laz2_xmlutils.pas(616,0) Error: linker: undefined reference to `LAZUTF8_$$_UTF8CODEPOINTSIZEFULL$PCHAR$$LONGINT'
Funny thing is, I don't use either 'MaskEdit' or any kind of xml...
Has anybody seen this before ...and (fingers crossed) have a solution?!?
It compiles without errors in laz 2.2.6 - fpc 3.2.2
I have required 'LazUtils' package in project inspector.
Regards Benny
If it ain't broke, don't fix it ;)
PCLinuxOS(rolling release) 64bit -> KDE6 -> FPC 3.2.2 -> Lazarus 4.0 up until Jan 2025 from then on it's both above &: KDE6/QT6 -> FPC 3.3.1 -> Lazarus 4.99

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4631
  • I like bugs.
Re: Lazarus Release 3.0
« Reply #156 on: February 24, 2024, 08:55:10 am »
Upon compiling an old project in laz 3.0 - fpc 3.3.1, I get these errors:  ...
You have old versions of LazUtils .ppus somewhere in your system.
« Last Edit: February 24, 2024, 08:58:37 am by JuhaManninen »
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.

cdbc

  • Hero Member
  • *****
  • Posts: 2464
    • http://www.cdbc.dk
Re: Lazarus Release 3.0
« Reply #157 on: February 24, 2024, 12:09:45 pm »
Hi
@JuhaManninen: Thanks mate, That hit the 'Head on the Nail'  :D
I looked, before I deleted all the files in "project-dir/lib/x86_64-linux/*"
and the only files not updated were lazutf8* etc...
Regards Benny
If it ain't broke, don't fix it ;)
PCLinuxOS(rolling release) 64bit -> KDE6 -> FPC 3.2.2 -> Lazarus 4.0 up until Jan 2025 from then on it's both above &: KDE6/QT6 -> FPC 3.3.1 -> Lazarus 4.99

czaerlag

  • Newbie
  • Posts: 2
Re: Lazarus Release 3.0
« Reply #158 on: February 27, 2024, 10:26:07 pm »
A few hours ago I tried to download Lazarus 3.0 using the "Download Now" button in the upper right corner at lazarus-ide.org
I got the old RC1 .deb package.
Next, I went to the https://sourceforge.net/projects/lazarus/files/Lazarus%20Linux%20amd64%20DEB/Lazarus%203.0/ page and clicked the link https://sourceforge.net/projects/lazarus/files/Lazarus%20Linux%20amd64%20DEB/Lazarus%203.0/lazarus-project_3.0.0-0_amd64.deb/download
In that case it was OK -- now I've got the correct version.

P.S. Thank you, boys and girls! You're doing a great job!

theo

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1933
Re: Lazarus Release 3.0
« Reply #159 on: February 28, 2024, 12:54:16 pm »

neuro

  • Jr. Member
  • **
  • Posts: 93
Re: Lazarus Release 3.0
« Reply #160 on: October 08, 2025, 09:58:08 am »
download latest debian 12 iso 32bits. Installed on vm, apt updated all.
installed al prerequisites sugested on fpcupdeluxe page
then downloaded latest fpcupdeluxe 32 bit linux executable (currently 2.4.0c).
checked gitlab check, selefcted fpc 3.2.2 and stable lazarus
clicked on "install/update fpc+lazarus" button, process started and then this error again
Code: Pascal  [Select][+][-]
  1. Linking fpmake
  2. /bin/ld: /home/usuario/fpcupdeluxe/322stable/fpcsrc/rtl/units/i386-linux/si_c21.o: en la función `SI_C21_$$__FPC_LIBC21_START':
  3. si_c21.pp:(.text.n_si_c21_$$__fpc_libc21_start+0x27): referencia a `__libc_csu_fini' sin definir
  4. /bin/ld: si_c21.pp:(.text.n_si_c21_$$__fpc_libc21_start+0x2c): referencia a `__libc_csu_init' sin definir
  5.  

I found a way to install Lazarus 3.4 on Debian 12 (i386):
1) Run fpcupdeluxe v2.4.0f.
2) Click the "Setup+" button.
3) Click the "Add FPC patch" button.
4) Select the “fpc-3.2.0--glibc-2.34.patch” file and click “Ok”.
5) Click the “Install/update FPC+Lazarus” button.

Source code of file “fpc-3.2.0--glibc-2.34.patch”:
Quote
From a6c82b6642871e1c68f3839e090b055bee4254b0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Dan=20Hor=C3=A1k?= <dan@danny.cz>
Date: Tue, 21 Sep 2021 12:47:28 +0200
Subject: [PATCH] update startup data structs for glibc >= 2.34

Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2005910
Fixes: https://gitlab.com/freepascal.org/fpc/source/-/issues/39295
---
 rtl/linux/aarch64/cprt0.as   | 6 ++----
 rtl/linux/i386/si_c21.inc    | 7 +++----
 rtl/linux/powerpc64/cprt0.as | 4 ++--
 rtl/linux/powerpc64/gprt0.as | 4 ++--
 rtl/linux/powerpc64/si_c.inc | 7 ++-----
 rtl/linux/powerpc64/si_g.inc | 7 ++-----
 6 files changed, 13 insertions(+), 22 deletions(-)

diff --git a/rtl/linux/aarch64/cprt0.as b/rtl/linux/aarch64/cprt0.as
index fd83610fbc..c8f2ca4baa 100644
--- a/rtl/linux/aarch64/cprt0.as
+++ b/rtl/linux/aarch64/cprt0.as
@@ -41,10 +41,8 @@ _start:
                         init, fini, rtld_fini, stack_end) */
    adrp   x0,:got:PASCALMAIN
    ldr   x0,[x0,#:got_lo12:PASCALMAIN]
-   adrp   x3,:got:__libc_csu_init
-   ldr   x3,[x3,#:got_lo12:__libc_csu_init]
-   adrp   x4,:got:__libc_csu_fini
-   ldr   x4,[x4,#:got_lo12:__libc_csu_fini]
+   mov   x3, #0      /* Used to be init.  */
+   mov   x4, #0      /* Used to be fini.  */
    bl   __libc_start_main
 
    /* This should never happen */
diff --git a/rtl/linux/i386/si_c21.inc b/rtl/linux/i386/si_c21.inc
index 71df29b6ef..084cdcf3ce 100644
--- a/rtl/linux/i386/si_c21.inc
+++ b/rtl/linux/i386/si_c21.inc
@@ -35,8 +35,6 @@
 
 {$asmmode att}
 
-procedure __libc_csu_init; cdecl; external;
-procedure __libc_csu_fini; cdecl; external;
 procedure libc_start_main; external name '__libc_start_main';
 procedure libc_exit(code: longint); cdecl; external name 'exit';
 
@@ -93,8 +91,9 @@ procedure _FPC_libc21_start; assembler; nostackframe; public name '_start';
         pushl %esp            { stack_end }
         pushl %edx            { function to be registered with
                                  atexit(), passed by loader }
-        pushl $__libc_csu_fini
-        pushl $__libc_csu_init
+        { This used to be the addresses of .fini and .init.  }
+        pushl $0
+        pushl $0
         pushl %esi                      { Push second argument: argv.  }
         pushl %ecx                      { Push first argument: argc.  }
 
diff --git a/rtl/linux/powerpc64/cprt0.as b/rtl/linux/powerpc64/cprt0.as
index 2b8309d4bf..3eace2813d 100644
--- a/rtl/linux/powerpc64/cprt0.as
+++ b/rtl/linux/powerpc64/cprt0.as
@@ -351,8 +351,8 @@ _restvr_31: addi r12,r0,-16
 start_addresses:
     .quad   0 /* was _SDA_BASE_  but not in 64-bit ABI*/
     .quad   main_stub
-    .quad   __libc_csu_init
-    .quad   __libc_csu_fini
+    .quad   0 /* Used to be init. */
+    .quad   0 /* Used to be fini. */
     .size   start_adresses, .-start_addresses
 
 /*
diff --git a/rtl/linux/powerpc64/gprt0.as b/rtl/linux/powerpc64/gprt0.as
index de31b6b08d..6b6fc9011b 100644
--- a/rtl/linux/powerpc64/gprt0.as
+++ b/rtl/linux/powerpc64/gprt0.as
@@ -351,8 +351,8 @@ _restvr_31: addi r12,r0,-16
 start_addresses:
     .quad   0 /* was _SDA_BASE_  but not in 64-bit ABI*/
     .quad   main_stub
-    .quad   __libc_csu_init
-    .quad   __libc_csu_fini
+    .quad   0 /* Used to be init. */
+    .quad   0 /* Used to be fini. */
     .size   start_adresses, .-start_addresses
 
 /*
diff --git a/rtl/linux/powerpc64/si_c.inc b/rtl/linux/powerpc64/si_c.inc
index c7e5e353a0..2833258c93 100644
--- a/rtl/linux/powerpc64/si_c.inc
+++ b/rtl/linux/powerpc64/si_c.inc
@@ -657,9 +657,6 @@ procedure _restfpr_30; cdecl; public; assembler; nostackframe;
                           Process start/halt
  ******************************************************************************}
 
-procedure __libc_csu_init; cdecl; external;
-procedure __libc_csu_fini; cdecl; external;
-
 procedure __libc_start_main(r3,r4,r5,r6,r7,r8,r9: pointer); cdecl; external;
 
 var
@@ -724,8 +721,8 @@ procedure main_stub(argc: longint; argv, envp: ppchar); cdecl; assembler; nostac
   end
   = (sda_base: nil; {* was _SDA_BASE_  but not in 64-bit ABI }
      main: @main_stub;
-     libc_csu_init: @__libc_csu_init;
-     libc_csu_fini: @__libc_csu_fini
+     libc_csu_init: nil;
+     libc_csu_fini: nil
     );
 
 
diff --git a/rtl/linux/powerpc64/si_g.inc b/rtl/linux/powerpc64/si_g.inc
index 8c99a39bc6..58cdf19f9c 100644
--- a/rtl/linux/powerpc64/si_g.inc
+++ b/rtl/linux/powerpc64/si_g.inc
@@ -657,9 +657,6 @@ procedure _restfpr_30; cdecl; public; assembler; nostackframe;
                           Process start/halt
  ******************************************************************************}
 
-procedure __libc_csu_init; cdecl; external;
-procedure __libc_csu_fini; cdecl; external;
-
 procedure __libc_start_main(r3,r4,r5,r6,r7,r8,r9: pointer); cdecl; external;
 
 type
@@ -745,8 +742,8 @@ procedure main_stub(argc: longint; argv, envp: ppchar); cdecl; assembler; nostac
   end
   = (sda_base: nil; {* was _SDA_BASE_  but not in 64-bit ABI }
      main: @main_stub;
-     libc_csu_init: @__libc_csu_init;
-     libc_csu_fini: @__libc_csu_fini
+     libc_csu_init: nil;
+     libc_csu_fini: nil
     );
 
 procedure call_libc_start_main(r3,r4,r5,r6,r7,r8,r9: pointer); cdecl;
--
2.31.1
« Last Edit: October 11, 2025, 12:45:45 am by neuro »

dbannon

  • Hero Member
  • *****
  • Posts: 3556
    • tomboy-ng, a rewrite of the classic Tomboy
Re: Lazarus Release 3.0
« Reply #161 on: October 08, 2025, 01:31:42 pm »
neuro, you have dropped into a pretty old thread here.

Not wanting to sound critical but FPC 3.2.0 and Lazarus 3.4 are pretty old too.

Debian 12, Bookworm has the FPC322 compiler in its repo, easier and better to install that, download the Lazarus 4.2 source and build it.

An even better approach is to install that repo FPC322, use it to build a FPC324rc1 from source and build Lazarus 4.2 with that. And then continue to work with that FPC234rc1 ...

You are welcome to use my Lazarus build script, https://github.com/davidbannon/FPC_Laz_Install/blob/main/make-lazarus.bash if you like.

I am pretty sure that fpcupdeluxe can build and install current versions too.

Davo
Lazarus 3, Linux (and reluctantly Win10/11, OSX Monterey)
My Project - https://github.com/tomboy-notes/tomboy-ng and my github - https://github.com/davidbannon

neuro

  • Jr. Member
  • **
  • Posts: 93
Re: Lazarus Release 3.0
« Reply #162 on: October 08, 2025, 10:43:49 pm »
Debian 12, Bookworm has the FPC322 compiler in its repo, easier and better to install that

On Debian 12 (i386) following commands do install FPC and Lazarus, however they install old version 2.2.6 of Lazarus:
sudo apt-get install fpc
sudo apt-get install lazarus

I am pretty sure that fpcupdeluxe can build and install current versions too.

The latest version fpcupdeluxe v2.4.0f. fails to build the latest “trunk” versions of FPC/Lazarus on Debian 12 (i386) throwing errors in source code.
That is the reason why I used installation of “stable” versions of FPC/Lazarus, which however needs a patch for Debian 12 (i386), which was describe in post above.

dbannon

  • Hero Member
  • *****
  • Posts: 3556
    • tomboy-ng, a rewrite of the classic Tomboy
Re: Lazarus Release 3.0
« Reply #163 on: October 09, 2025, 01:51:31 am »
....
On Debian 12 (i386) following commands do install FPC and Lazarus, however they install old version 2.2.6 of Lazarus:
sudo apt-get install fpc
sudo apt-get install lazarus
No, I suggested installing FPC322 from the repo, but building Lazarus from source. You can get Lazarus in any release, Fixes or main as source and it should build fine. I just tested 4.2 and main. And, honestly, a source build of Lazarus on Linux is far more practical that a repo supplied version.

https://wiki.freepascal.org/Installing_Lazarus_on_Linux#Build_Lazarus_from_Source

Davo
Lazarus 3, Linux (and reluctantly Win10/11, OSX Monterey)
My Project - https://github.com/tomboy-notes/tomboy-ng and my github - https://github.com/davidbannon

 

TinyPortal © 2005-2018