Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2019-01

"crtbegin.o" not found

7 messages · 3 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Graeme Geldenhuys

What is that? I'm seeing that compiler warning in my fpGUI projects too? Since I upgraded to 3.0.4 using Linux 64-bit. It was not there in FPC 2.6.4.

Below is a sample output done by Joost, which shows the same warning in a simple One Form LCL based project.

-------- Forwarded Message --------
Subject: Re: [Lazarus] Can't start lazarus trunk
Date: Thu, 3 Jan 2019 14:03:15 +0100
From: Joost van der Sluis via lazarus
To:

....snip....

laztestpackage]$ ppcx64 project1.lpr
Free Pascal Compiler version 3.3.1 [2018/12/29] for x86_64 Copyright (c) 1993-2018 by Florian Klaempfl and others Target OS: Linux for x86-64
Compiling project1.lpr
Compiling unit1.pas
Compiling resource project1.or
Linking project1
project1.lpr(21,1) Warning: "crtbegin.o" not found, this will probably cause a linking failure
project1.lpr(21,1) Warning: "crtend.o" not found, this will probably cause a linking failure
48 lines compiled, 3.2 sec
2 warning(s) issued
laztestpackage]$

....snip....

Regards,

Joost.
-------- Forwarded Message End --------

Regards,
Graeme

Reply by email

Bart
to Graeme Geldenhuys
PM Graeme Geldenhuys wrote
What is that? I'm seeing that compiler warning in my fpGUI projects too? Since I upgraded to 3.0.4 using Linux 64-bit. It was not there in FPC 2.6.4.

That one has been around for some time now on *nix. The linker wants that file.
There's a commandline argument to gcc that will tell you where it is. Then add that path in the appropriate place in fpc.cfg (At least I did that on Mint 18.2 and Suse Tumbleweed)

Bart

Reply by email

Bart
to Bart
PM Bart wrote
There's a commandline argument to gcc that will tell you where it is.

~ $ gcc --print-file-name crtbeginS.o
/usr/lib/gcc/x86_64-linux-gnu/5/crtbeginS.o

from /etc/fpc.cfg:

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

Bart

Reply by email

Graeme Geldenhuys
to Bart: On Thu, Jan 3, 2019 at 3:13 PM Graeme Geldenhuys That one has been around for some time…
Bart wrote
Then add that path in the appropriate place in fpc.cfg (At least I did that on Mint 18.2 and Suse Tumbleweed)

Thanks for the reply and your second email. I normally code under FreeBSD (for the last 7 years), so maybe I already fixed it there, but forgot about it. Also, FreeBSD's userland and base OS directory layout is very different (more organised) to Linux. I only recently set up a new Ubuntu Linux development system with everything a fresh install, and that is where I see this compiler warning.

I just made the changes you suggested and the warnings are now gone. Awesome. Thanks again.

Regards,
Graeme

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/ My public PGP key: http://tinyurl.com/graeme-pgp

Reply by email