Sign in Join

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

Mailing lists / lazarus / 2015-10

Built Lazarus on RPi2, warning on every project build

7 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

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

Bo Berglund

I have successfully compiled and installed fpc and lazarus from trunk sources retrieved by svn on a Raspberry Pi2 unit.
Versions are 3.1.1 and 1.5 respectively
I can run Lazarus in the RPi2 and simple programs that I have tested work as expected.
But nevertheless on every single compile there are two warnings shown:

Warning: "crtbegin.o" not found, this will probably cause a linking failure
Warning: "crtend.o" not found, this will probably cause a linking failure

Why does this happen? And what can be done about it?

Bo Berglund Developer in Sweden

Reply by email

Unknown author
to Bo Berglund
Bo Berglund wrote 13 lines
I have successfully compiled and installed fpc and lazarus from trunk sources retrieved by svn on a Raspberry Pi2 unit. Versions are 3.1.1 and 1.5 respectively I can run Lazarus in the RPi2 and simple programs that I have tested work as expected. But nevertheless on every single compile there are two warnings shown: Warning: "crtbegin.o" not found, this will probably cause a linking failure Warning: "crtend.o" not found, this will probably cause a linking failure Why does this happen? And what can be done about it?

i cannot help with the problem but i wanted to point out that those two are "C Run Time" and not "CRT" items... many mistake those types of names as CRT related and go looking in that direction instead of in the "C" direction...

a possible help is that you have to tell the system where to find the C runtime developer's library code... i don't know how this is done but the topic has been spoken of numerous times in either the FPC or Lazarus lists... i'm sure that others will have the real info if they haven't answered you already...

NOTE: No off-list assistance is given without prior approval. *Please keep mailing list traffic on the list* unless private contact is specifically requested and granted.

Reply by email

Mark Morgan Lloyd
to Unknown author
Show quoted text 25 lines
On 10/10/2015 03:13 PM, Bo Berglund wrote: > I have successfully compiled and installed fpc and lazarus from trunk > sources retrieved by svn on a Raspberry Pi2 unit. > Versions are 3.1.1 and 1.5 respectively > I can run Lazarus in the RPi2 and simple programs that I have tested > work as expected. > But nevertheless on every single compile there are two warnings shown: > > Warning: "crtbegin.o" not found, this will probably cause a linking > failure > Warning: "crtend.o" not found, this will probably cause a linking > failure > > Why does this happen? And what can be done about it? i cannot help with the problem but i wanted to point out that those two are "C Run Time" and not "CRT" items... many mistake those types of names as CRT related and go looking in that direction instead of in the "C" direction... a possible help is that you have to tell the system where to find the C runtime developer's library code... i don't know how this is done but the topic has been spoken of numerous times in either the FPC or Lazarus lists... i'm sure that others will have the real info if they haven't answered you already...

I /think/ that somebody pointed out elsewhere that those were spurious, but I'd need to check.

Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues]

Reply by email

Mark Morgan Lloyd
to Mark Morgan Lloyd
Mark Morgan Lloyd wrote 11 lines
wrote: >> Warning: "crtbegin.o" not found, this will probably cause a linking >> failure >> Warning: "crtend.o" not found, this will probably cause a linking >> failure >> >> Why does this happen? And what can be done about it? I /think/ that somebody pointed out elsewhere that those were spurious, but I'd need to check.

If it causes issues then for Wheezy 2015 try adding

-Fl/usr/lib/gcc/arm-linux-gnueabihf/4.6

to your /etc/fpc.cfg, or for Jessie add

-Fl/usr/lib/gcc/arm-linux-gnueabihf/4.9

Note there's no space in there. Remember that for configuration files like this you'll usually need to use a unix/Linux editor, since the line-ending convention is different for DOS.

Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues]

Reply by email

Bo Berglund
to Mark Morgan Lloyd
Mark Morgan Lloyd wrote 14 lines
> I /think/ that somebody pointed out elsewhere that those were spurious, > but I'd need to check. If it causes issues then for Wheezy 2015 try adding -Fl/usr/lib/gcc/arm-linux-gnueabihf/4.6 to your /etc/fpc.cfg, or for Jessie add -Fl/usr/lib/gcc/arm-linux-gnueabihf/4.9 Note there's no space in there. Remember that for configuration files like this you'll usually need to use a unix/Linux editor, since the line-ending convention is different for DOS.

Where in the file do I add this line?
Or does it not matter?

Bo Berglund Developer in Sweden

Reply by email

Mark Morgan Lloyd
to Bo Berglund
Bo Berglund wrote 20 lines
On Sun, 11 Oct 2015 11:48:55 +0000, Mark Morgan Lloyd wrote: >> I /think/ that somebody pointed out elsewhere that those were spurious, >> but I'd need to check. > If it causes issues then for Wheezy 2015 try adding > > -Fl/usr/lib/gcc/arm-linux-gnueabihf/4.6 > > to your /etc/fpc.cfg, or for Jessie add > > -Fl/usr/lib/gcc/arm-linux-gnueabihf/4.9 > > Note there's no space in there. Remember that for configuration files > like this you'll usually need to use a unix/Linux editor, since the > line-ending convention is different for DOS. Where in the file do I add this line? Or does it not matter?

If it mattered, I'd have said :-) That file is basically just a list of options that are appended most of the times FPC is run.

I'd suggest you either tack it in like this (this is a slightly older Raspbian, but you should get the idea):

..
# searchpath for fppkg user-specific packages
-Fu~/.fppkg/lib/fpc/$fpcversion/units/$FPCTARGET/*

# path to the gcclib
# This for Raspbian 2014 -Fl/usr/lib/gcc/arm-linux-gnueabi/4.6.3 # This for Raspbian 2014 -Fl/usr/lib/arm-linux-gnueabi -Fl/usr/lib/gcc/arm-linux-gnueabihf/4.6

# searchpath for libraries
#-Fl/usr/local/lib/fpc/$fpcversion/lib
#-Fl/lib;/usr/lib
-Fl/usr/local/lib/fpc/$fpcversion/lib/$FPCTARGET

# searchpath for tools
-FD/usr/local/lib/fpc/$fpcversion/bin/$FPCTARGET

# This for Raspbian 2014
# -FL/lib/ld-linux.so.3

#DEFINE NEEDCROSSBINUTILS
..

or alternatively put it at the end and put your initials in a comment. In either case, treat this as part of your system documentation.

Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues]

Reply by email

Bo Berglund
to Mark Morgan Lloyd
Mark Morgan Lloyd wrote
>> to your /etc/fpc.cfg, or for Jessie add >> >> -Fl/usr/lib/gcc/arm-linux-gnueabihf/4.9

...

Show quoted text 6 lines
> Where in the file do I add this line? > Or does it not matter? If it mattered, I'd have said :-) That file is basically just a list of options that are appended most of the times FPC is run.

I ended up putting the second line in at the end of the file since I am on Jessie.
Worked fine! Warnings are now gone.
Thanks!

Bo Berglund Developer in Sweden

Reply by email