Recent

Author Topic: Old problem returns...  (Read 575 times)

Curt Carpenter

  • Hero Member
  • *****
  • Posts: 728
Old problem returns...
« on: February 12, 2026, 01:35:33 am »
Using FPC3.2.2, Lazarus 4.4 with Ubuntu 24.04, all newly installed.

I am back to having the following warning messages when I try to compile a program:

project1.lpr(21,1) Warning: "crtbeginS.o" not found, this will probably cause a linking failure
project1.lpr(21,1) Warning: "crtendS.o" not found, this will probably cause a linking failure


This is an old problem and the cure used to involve modifying "# path to the gcclib" in /etc/fpc.cfg.  On opening fpc.cfg, I found the "# path to the gcclib" section, but there was nothing in it.  I changed it to read

# path to the gcclib
#ifdef cpux86_64
-Fl/usr/lib/gcc/x86_64-pc-linux-gnu/13
#endif

but this has no effect, although crtbeginS.o and crtendS.o are indeed in the indicated directory. 

This isn't a critical problem, but I would like to understand it and clean it up.  Any guidance would be appreciated.  In process of trying to recover from a lost drive.  I probably don't understand exactly what is happening in fpc.cfg here.

Thanks!

Curt Carpenter

  • Hero Member
  • *****
  • Posts: 728
Re: Old problem returns...
« Reply #1 on: February 12, 2026, 05:17:23 am »
Adding BOTH of the following lines to fpc.cfg seems to fix the problem for me:  the trailing "13" may vary for others.

#ifdef cpui386
-Fl/usr/lib/gcc/x86_64-linux-gnu/13
#endif
#ifdef cpux86_64
-Fl/usr/lib/gcc/x86_64-linux-gnu/13
#endif

dbannon

  • Hero Member
  • *****
  • Posts: 3719
    • tomboy-ng, a rewrite of the classic Tomboy
Re: Old problem returns...
« Reply #2 on: February 12, 2026, 05:39:25 am »

Are you running a 32bit system or cross compiling ?

Curt, the problem is that the number "13" (in your case) varies with your Linux version. fpc322 is not good at spotting that. Later versions such as fpc324rc1 are much better.

I have a raspi box running a logger that needs '8' ! (yes, I now, hopelessly out of date, I'm updating...). My current laptop says "12".

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

Lutz Mändle

  • Jr. Member
  • **
  • Posts: 87
Re: Old problem returns...
« Reply #3 on: February 12, 2026, 06:56:53 am »

Curt Carpenter

  • Hero Member
  • *****
  • Posts: 728
Re: Old problem returns...
« Reply #4 on: February 12, 2026, 04:53:31 pm »
Yes, the crtbegin issue is an old one, and I rediscover it every time I crash my system and have to start over (which I do about once every three years give or take).  I thought it was interesting that fpc.cfg had a

# path to the gcclib

section, but nothing at all under it.

 

TinyPortal © 2005-2018