Discussion:
[fpc-pascal] Is there some reason why the linker cannot find crti.o, crtn.o etc?
vfclists .
2015-06-29 09:43:07 UTC
Permalink
These messages come up almost always when I compile a project:

Warning: "crti.o" not found, this will probably cause a linking failure
templateSys.lpr(39,1) Warning: "crtn.o" not found, this will probably cause
a linking failure.

On a 32bit system the files are located in /usr/lib/i386-gnu and
/usr/lib/gcc/i686-linux-gnu

find /usr/lib -type f -name crt*

/usr/lib/i386-linux-gnu/crti.o
/usr/lib/i386-linux-gnu/crtn.o
/usr/lib/gcc/i686-linux-gnu/4.X/crtbegin.o
/usr/lib/gcc/i686-linux-gnu/4.X/crtend.o

I don't know if some of them are debug builds which may have other
attributes which make them undetectable by the linker.

Some of the errors may also be related to the gnu tools and not be
FPC/Lazarus related.

This issue bit me when I was trying to cross compile some synopse libraries
(I have forgotten how I fixed it) and I want to know how it can be fixed
permanently in my installations.
--
Frank Church

=======================
http://devblog.brahmancreations.com
Marco van de Voort
2015-06-29 13:29:56 UTC
Permalink
Post by vfclists .
Warning: "crti.o" not found, this will probably cause a linking failure
templateSys.lpr(39,1) Warning: "crtn.o" not found, this will probably cause
a linking failure.
Under Linux, the directory for those files is passed to FPC by a -Fl line in
the fpc.cfg which is setup by the installer script (standalone pkg) or the
distribution (in the case of a distribution package)

Usually that installer calls fpcmkcfg which calls gcc with
--print-libgcc-file-name to determine the location.

This assumes everything is configured correctly when FPC was installed, if
not, try rerunning fpcmkcfg or manually fixing fpc.cfg

_______________________________________________
fpc-pascal maillist - fpc-***@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Loading...