I'm having the crtbegin.o issue too.
It's been a while but I had laz and fpc working nicely on fedora 40. Since I've just updated to Fed42 and wanted to pick up some laz project I had worked on before.
Of course, some things don't work any more

My project compiles but uos sound library does not load. In digging into this I noticed crtbegin warning.
My /etc/fpc,cfg looks a little different to some posted above in that it does not have hardcoded version numbers (thankfully).
# searchpath for libraries
#IFDEF CPU64
#-Fl/usr/lib64/fpc/$fpcversion/lib
#-Fl/lib64;/usr/lib64
-Fl/usr/lib64/fpc/$fpcversion/lib/$FPCTARGET
#ELSE
#-Fl/usr/lib/fpc/$fpcversion/lib
#-Fl/lib;/usr/lib
-Fl/usr/lib/fpc/$fpcversion/lib/$FPCTARGET
#ENDIF
# searchpath for tools
#IFDEF CPU64
-FD/usr/lib64/fpc/$fpcversion/bin/$FPCTARGET
#ELSE
-FD/usr/lib/fpc/$fpcversion/bin/$FPCTARGET
#ENDIF
Now, using distro's fpc
$ fpc -v
Free Pascal Compiler version 3.2.2 [2025/05/10] for x86_64
I do find /usr/lib64/fpc/$fpcversion/ but there is no lib or bin.
$ ls /usr/lib64/fpc/3.2.2
fpmkinst msg ppcx64 samplecfg units
I don't know where lib and bin went but lazarus seems to build and run my program without any problem except for the missing sound.
this is where it is failing:
//function uos_loadlib(PortAudioFileName, SndFileFileName, Mpg123FileName, Mp4ffFileName, FaadFileName, opusfilefilename: PChar) : LongInt;
res:=0;
res := uos_LoadLib(PChar(PA_FileName), PChar(SF_FileName), nil, Nil, Nil, Nil);
if res <> 0 then
errdisp('sound libraries did not load.',strNotxt,mb_excl) // add to translated strings in pack.pas ???
else
begin
Is that related to the crtbegin.o warning or am I running around in circles here?
TIA.