LazPaint compilation error on sid / and64 lazarus / 32-Linux ---------------------------------------------------------------------- circular · 2022-12-23 13:04 Hello, Apparently, my app doesn't compile on Debian due to a linking problem. https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1026718 Code: [Select](9015) Linking /<>/lazpaint/release/bin/lazpaint /usr/bin/ld.bfd: cannot find -lgdk-x11-2.0: No such file or directory /usr/bin/ld.bfd: cannot find -lgtk-x11-2.0: No such file or directory /usr/bin/ld.bfd: cannot find -lX11: No such file or directory /usr/bin/ld.bfd: cannot find -lgdk_pixbuf-2.0: No such file or directory /usr/bin/ld.bfd: cannot find -lgobject-2.0: No such file or directory /usr/bin/ld.bfd: cannot find -lglib-2.0: No such file or directory /usr/bin/ld.bfd: cannot find -lgthread-2.0: No such file or directory /usr/bin/ld.bfd: cannot find -lgmodule-2.0: No such file or directory /usr/bin/ld.bfd: cannot find -lpango-1.0: No such file or directory /usr/bin/ld.bfd: cannot find -lcairo: No such file or directory /usr/bin/ld.bfd: cannot find -latk-1.0: No such file or directory /usr/bin/ld.bfd: cannot find -lpangocairo-1.0: No such file or directory /<>/lazpaint/lazpaint.lpr(229,1) Error: (9013) Error while linking Does anyone have an idea why this would happen? Regards ---------------------------------------------------------------------- marcov · 2022-12-23 13:10 Do you have gtk2 development packages installed ? ---------------------------------------------------------------------- balazsszekely · 2022-12-23 13:49 @circular See point 3: https://wiki.lazarus.freepascal.org/BGRA_Installation_on_Linux , install every package, except subversion, zip and rar, you probably don't need those. ---------------------------------------------------------------------- circular · 2022-12-31 00:18 Hello @marcov and @GetMem Thanks for the feedback. I am not installing it myself, it is built on a Debian system. Probably using an automated tool which installs all necessary packages, but to be sure I asked on the bug thread (see link below). Due to the compilation problem, the package is marked for removal on the Debian distribution: Quotelazpaint 7.2.2-1 is marked for autoremoval from testing on 2023-01-18 It is affected by these RC bugs: 1026718: lazpaint: FTBFS: /usr/bin/ld.bfd: cannot find -lpangocairo-1.0: No such file or directory  https://bugs.debian.org/1026718 It (build-)depends on packages with these RC bugs: 1026719: lazarus: vmg: FTBFS: /usr/bin/ld.bfd: cannot find -latk-1.0: No such file or directory  https://bugs.debian.org/1026719 ---------------------------------------------------------------------- circular · 2023-01-03 05:23 Apparently, the problem is related to gtk2 dependency: Quote from: Paul Gevers After this discussion (thanks for having it), I think it's best to reopen bug 967348, have fp-units-gtk2-x.y.z depend on libgtk2.0-dev again and *stop shipping* fp-units-gtk2-x.y.z once libgtk2.0-dev needs to be removed. ---------------------------------------------------------------------- MarkMLl · 2023-01-17 21:01 I'm running Debian Bookworm/Sid on x86_64. What version of Lazarus and FPC do you have? MarkMLl ---------------------------------------------------------------------- circular · 2023-01-21 02:57 It was using the current version on sid of fpc. The problem has been reassigned to fpc and it seems it has been fixed. ---------------------------------------------------------------------- MarkMLl · 2023-01-21 07:34 Quote from: circular on January 21, 2023, 03:57:00 amIt was using the current version on sid of fpc. The problem has been reassigned to fpc and it seems it has been fixed. So a Debian packaging problem. It's important to distinguish this from other potential linking problems: Bookworm/Sid requires FPC 3.2.2. MarkMLl ---------------------------------------------------------------------- TRon · 2023-01-21 08:14 Quote from: MarkMLl on January 21, 2023, 08:34:45 amIt's important to distinguish this from other potential linking problems: Bookworm/Sid requires FPC 3.2.2. Upfront apologies as I've read this without using context. Do you mean the official FPC distro package, the combination with Lazarus or should I take that as a challenge to get a FPC < 3.2.2 working on bookworm ? ---------------------------------------------------------------------- Thaddy · 2023-01-21 08:20 If it is fixed it  may be in backports, so add that. Btw I have 3.2.2 and 3.2.0 running on Debian x86_64-linux, but I installed from source. ---------------------------------------------------------------------- MarkMLl · 2023-01-21 08:27 Quote from: TRon on January 21, 2023, 09:14:10 ama challenge to get a FPC < 3.2.2 working on bookworm ? That one. I'll try to fill in a bit more detail later, but from memory it's a problem that won't raise its head unless importing C libraries (i.e. cthreads etc.) and is something to do with a symbol which should be marked optional. Also you won't be able to progress from 3.0.4 on x86_64 "Bookworm" to 3.2.2. Usual developer response: "we only support the current version". Slightly later: https://forum.lazarus.freepascal.org/index.php/topic,6 1001.msg457935.html#msg457935 Also looking at a moderately-large app which I was hoping to continue to be able to build using a slightly-older version of Lazarus (because of stuff on the console window screen which was subsequently disabled): Code: Text  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i ...(9015) Linking /usr/local/src/b5500-emulator/trunk/B5k5-x86_64-linuxWarning: (9034) "crtbeginS.o" not found, this will probably cause a linking failureWarning: (9034) "crtendS.o" not found, this will probably cause a linking failure/usr/bin/ld: warning: /usr/local/src/b5500-emulator/trunk/link.res contains output sections; did you forget -T?/usr/bin/ld: /usr/local/lib/fpc/3.0.4/units/x86_64-linux/rtl/cprt0.o: in function `_start':(.text+0x3c): undefined reference to `__libc_csu_init'/usr/bin/ld: (.text+0x43): undefined reference to `__libc_csu_fini'Error: (9013) Error while linkingFatal: (10026) There were 1 errors compiling module, stoppingFatal: (1018) Compilation abortedError: (lazarus) Compile Project, Target: B5k5-x86_64-linux: stopped with exit code 1Error: (lazbuild) failed compiling of project /usr/local/src/b5500-emulator/trunk/B5k5.lpi  That was FPC 3.0.4 with Lazarus 2.0.6, multithreaded app but apart from that nothing particularly fancy. MarkMLl ---------------------------------------------------------------------- TRon · 2023-01-21 08:50 Thank you for the additional information MarkMLI. I'll have a look at it but unfortunately a bit later as currently the ftp mirrors of FPC are down for me (this let my current build-script fail as it is not suited for SF). PS: should we transfer the conversation over to the link you posted or open up another thread in order not to pollute this one ? ---------------------------------------------------------------------- MarkMLl · 2023-01-21 09:04 New thread I'd suggest. However my suspicion is that the C library issue is fixed in the development version- albeit with no plans to backport to 3.2- and the other one is a "won't fix". MarkMLl