"crtbegin.o" not found

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

"crtbegin.o" not found

Graeme Geldenhuys-6
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 <[hidden email]>
To: [hidden email]

....snip....

[joost@fed4k 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
[joost@fed4k laztestpackage]$


....snip....

Regards,

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


Regards,
  Graeme

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: "crtbegin.o" not found

Bart-48
On Thu, Jan 3, 2019 at 3:13 PM Graeme Geldenhuys
<[hidden email]> 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
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: "crtbegin.o" not found

Bart-48
On Thu, Jan 3, 2019 at 5:34 PM Bart <[hidden email]> wrote:
> There's a commandline argument to gcc that will tell you where it is.

bart@simenon ~ $ 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
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: "crtbegin.o" not found

Graeme Geldenhuys-6
In reply to this post by Bart-48
On 03/01/2019 16:34, 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
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: "crtbegin.o" not found

Bart-48
I put it on my user page on the wiki:
http://wiki.lazarus.freepascal.org/User:Bart#Notes_for_myself

Maybe there's an appropriate page it can gi into.

Bart
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: "crtbegin.o" not found

Florian Klämpfl
Am 03.01.19 um 18:31 schrieb Bart:
> I put it on my user page on the wiki:
> http://wiki.lazarus.freepascal.org/User:Bart#Notes_for_myself
>
> Maybe there's an appropriate page it can gi into.

I added it to the explanation of the compiler error.

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: "crtbegin.o" not found

Bart-48
On Thu, Jan 3, 2019 at 6:34 PM Florian Klämpfl <[hidden email]> wrote:

> > Maybe there's an appropriate page it can gi into.
>
> I added it to the explanation of the compiler error.

I added it to the FAQ.

--
Bart
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal