Recent

Author Topic: Dependencies issue  (Read 2608 times)

backprop

  • Full Member
  • ***
  • Posts: 119
Dependencies issue
« on: December 15, 2024, 01:51:56 pm »
Latest installation of clean KDE Neon and "official" deb files for FPC and Lazarus

Installation passed fine, however  run default empty app, this is shown:

Code: [Select]
Compile Project, Target: /home/test/project1: Success, Warnings: 2
project1.lpr(24,1) Warning: "crtbeginS.o" not found, this will probably cause a linking failure
project1.lpr(24,1) Warning: "crtendS.o" not found, this will probably cause a linking failure

Somewhere at this forum Is wrote  build-essential need to be installed in order to fix this issue. And it is, however this warning is still shown. Probably some other devel libraries need to be installed now.

Whoever making these deb files always missing to add all required dependencies inside installation process in order to work correctly with basic installation.
Is it ever this will be handled properly which should allow installation, compilation and running without any issues?
« Last Edit: December 15, 2024, 01:53:37 pm by backprop »

cdbc

  • Hero Member
  • *****
  • Posts: 1808
    • http://www.cdbc.dk
Re: Dependencies issue
« Reply #1 on: December 15, 2024, 02:33:09 pm »
Hi
PCLinuxOS here and that shows the same 2 warnings, but I've never had any problems with it...
Regards Benny
If it ain't broke, don't fix it ;)
PCLinuxOS(rolling release) 64bit -> KDE5 -> FPC 3.2.2 -> Lazarus 2.2.6 up until Jan 2024 from then on it's: KDE5/QT5 -> FPC 3.3.1 -> Lazarus 3.0

lainz

  • Hero Member
  • *****
  • Posts: 4684
  • Web, Desktop & Android developer
    • https://lainz.github.io/
Re: Dependencies issue
« Reply #2 on: December 15, 2024, 03:28:30 pm »
Latest installation of clean KDE Neon and "official" deb files for FPC and Lazarus

Installation passed fine, however  run default empty app, this is shown:

Code: [Select]
Compile Project, Target: /home/test/project1: Success, Warnings: 2
project1.lpr(24,1) Warning: "crtbeginS.o" not found, this will probably cause a linking failure
project1.lpr(24,1) Warning: "crtendS.o" not found, this will probably cause a linking failure

Somewhere at this forum Is wrote  build-essential need to be installed in order to fix this issue. And it is, however this warning is still shown. Probably some other devel libraries need to be installed now.

Whoever making these deb files always missing to add all required dependencies inside installation process in order to work correctly with basic installation.
Is it ever this will be handled properly which should allow installation, compilation and running without any issues?

In Project Options, Paths, add the path where the libraries are located in your system.

Fred vS

  • Hero Member
  • *****
  • Posts: 3475
    • StrumPract is the musicians best friend
Re: Dependencies issue
« Reply #3 on: December 15, 2024, 03:44:56 pm »
Installation passed fine, however  run default empty app, this is shown:
Code: [Select]
Compile Project, Target: /home/test/project1: Success, Warnings: 2
project1.lpr(24,1) Warning: "crtbeginS.o" not found, this will probably cause a linking failure
project1.lpr(24,1) Warning: "crtendS.o" not found, this will probably cause a linking failure

The problem comes because the linker does not find those files.

The most easy is to find where are those files with this:
Code: Bash  [Select][+][-]
  1. $ find /usr/ -name crtbeginS.o

I get this:
Code: Pascal  [Select][+][-]
  1. /usr/lib/gcc/x86_64-linux-gnu/12/crtbeginS.o

And then, add this fpc parameter for compilation:

-Fu/usr/lib/gcc/x86_64-linux-gnu/12 or (works also) -Fl/usr/lib/gcc/x86_64-linux-gnu/12
 
[EDIT] @Lainz: oops, sorry you did it faster...
« Last Edit: December 15, 2024, 03:48:42 pm by Fred vS »
I use Lazarus 2.2.0 32/64 and FPC 3.2.2 32/64 on Debian 11 64 bit, Windows 10, Windows 7 32/64, Windows XP 32,  FreeBSD 64.
Widgetset: fpGUI, MSEgui, Win32, GTK2, Qt.

https://github.com/fredvs
https://gitlab.com/fredvs
https://codeberg.org/fredvs

backprop

  • Full Member
  • ***
  • Posts: 119
Re: Dependencies issue
« Reply #4 on: December 16, 2024, 06:00:58 am »
Current version of GNU C++ with new distro is 13. And during initial configuration, Lazarus do not search for these files, but probably use predefined paths. That is not quite intuitive.

zamronypj

  • Full Member
  • ***
  • Posts: 139
    • Fano Framework, Free Pascal web application framework
Re: Dependencies issue
« Reply #5 on: December 16, 2024, 07:31:32 am »
Latest installation of clean KDE Neon and "official" deb files for FPC and Lazarus

Installation passed fine, however  run default empty app, this is shown:

Code: [Select]
Compile Project, Target: /home/test/project1: Success, Warnings: 2
project1.lpr(24,1) Warning: "crtbeginS.o" not found, this will probably cause a linking failure
project1.lpr(24,1) Warning: "crtendS.o" not found, this will probably cause a linking failure

Somewhere at this forum Is wrote  build-essential need to be installed in order to fix this issue. And it is, however this warning is still shown. Probably some other devel libraries need to be installed now.

Whoever making these deb files always missing to add all required dependencies inside installation process in order to work correctly with basic installation.
Is it ever this will be handled properly which should allow installation, compilation and running without any issues?

This happens if you install FPC before you install build-essentials. Try reinstall FPC after you install build-essentials, otherwise you need to set library search path as explain by other answers.
Fano Framework, Free Pascal web application framework https://fanoframework.github.io
Apache module executes Pascal program like scripting language https://zamronypj.github.io/mod_pascal/
Github https://github.com/zamronypj

backprop

  • Full Member
  • ***
  • Posts: 119
Re: Dependencies issue
« Reply #6 on: December 18, 2024, 11:29:39 am »
This happens if you install FPC before you install build-essentials. Try reinstall FPC after you install build-essentials, otherwise you need to set library search path as explain by other answers.

If that s the case, that should be handled by installation process as I mentioned. I have installed only deb packages for FPC and Lazarus and compiling should work correctly from that.

But seems it is still real mess...

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 12025
  • FPC developer.
Re: Dependencies issue
« Reply #7 on: December 18, 2024, 11:48:03 am »
If that s the case, that should be handled by installation process as I mentioned. I have installed only deb packages for FPC and Lazarus and compiling should work correctly from that.

But seems it is still real mess...

The FPC provided debs are generic for all debian alike distributions. So that kind of distro specific dependencies are not possible there. For that you need the distro depended (apt-get) packages.

backprop

  • Full Member
  • ***
  • Posts: 119
Re: Dependencies issue
« Reply #8 on: December 18, 2024, 01:25:24 pm »
Is there somewhere available "official" scripts to generate deb files?
I would like to look in it...

Otherwise, you should write additionally guide "How to properly install and why that is important in order to works as expected "....

It is quite a disappointment to work with broken "official" releases and wasting time here for something should never happens. If you "can't control" installation ordering process (which I doubt), you should suggest solution and fix problem during first starting of IDE.
« Last Edit: December 18, 2024, 01:34:21 pm by backprop »

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 12025
  • FPC developer.
Re: Dependencies issue
« Reply #9 on: December 18, 2024, 01:54:40 pm »
Is there somewhere available "official" scripts to generate deb files?
I would like to look in it...

There are spec files in the "fpcbuild"  repository.

Quote
Otherwise, you should write additionally guide "How to properly install and why that is important in order to works as expected "....

https://wiki.freepascal.org/Installing_Lazarus_on_Linux mentions build-essentials.

Quote
It is quite a disappointment to work with broken "official" releases and wasting time here for something should never happens. If you "can't control" installation ordering process (which I doubt), you should suggest solution and fix problem during first starting of IDE.

That is the Linux distribution's work. Projects like FPC,Lazarus make general programs, and distributions adapt them to their distributions.  Because of FPC's bootstrapping nature we go a bit further than the average program, but that doesn't change the basic fact.

If you want full distro integration, use the packages compiled and packaged with (your version of ) your distribution.

cdbc

  • Hero Member
  • *****
  • Posts: 1808
    • http://www.cdbc.dk
Re: Dependencies issue
« Reply #10 on: December 18, 2024, 02:30:18 pm »
Hi
<spoiler>
  In PCLinuxOS we've got the latest FPC & Lazarus release versions in our repo.
  Easy to install via 'Synaptic'. Current repo version: fpc 3.2.2 laz 3.6
</spoiler>
Regards Benny
If it ain't broke, don't fix it ;)
PCLinuxOS(rolling release) 64bit -> KDE5 -> FPC 3.2.2 -> Lazarus 2.2.6 up until Jan 2024 from then on it's: KDE5/QT5 -> FPC 3.3.1 -> Lazarus 3.0

TRon

  • Hero Member
  • *****
  • Posts: 3928
Re: Dependencies issue
« Reply #11 on: December 18, 2024, 05:36:47 pm »
There isn't a fixed location for *nix for this path therefor it depends on the distro's package (manager).

And it will (still) fall apart when cross-compiling. No distro/package(manager) automagicially configures FPC for you in that case (but proof me wrong and please do mention the distribution that does)  :)
I do not have to remember anything anymore thanks to total-recall.

 

TinyPortal © 2005-2018