[Pkg-pascal-devel] Bug#978040: Warning: (9034) "crtbeginS.o" not found (on non-intel architectures)

Matija Nalis mnalis-debianbug at voyager.hr
Thu Dec 24 22:58:33 GMT 2020

Package: fpc
Version: 3.2.0+dfsg-8
Severity: normal
X-Debbugs-Cc: mnalis-debianbug at voyager.hr

Dear Maintainer,

   * What led up to the situation?

trying to compile my source throws warnings (which subsequently causes failure to build due to "-Sewnh". 
I can of course remove that option and continue build even in presence of warnings, but would like to fix 
the  problem at the source, as it is simple fix):

fpc -Mtp -g -gl -gv -fPIC -C3 -Ci -Co -CO  -O1 -gw -godwarfsets  -gt -vewnhiq   -Sa -Sy  -vm4049 -Sewnh -k-lSDL_mixer -k-lSDL -k-lm -k'-z relro' -k'-z now' -k-pie is.pas
Hint: (11030) Start of reading config file /etc/fpc.cfg
Hint: (11031) End of reading config file /etc/fpc.cfg
Free Pascal Compiler version 3.2.0+dfsg-8 [2020/08/22] for arm
Copyright (c) 1993-2020 by Florian Klaempfl and others
(1002) Target OS: Linux for ARMHF
(3104) Compiling is.pas
(3104) Compiling _paths_.pas
(9015) Linking is
is.pas(86,1) Warning: (9034) "crtbeginS.o" not found, this will probably cause a linking failure
is.pas(86,1) Warning: (9034) "crtendS.o" not found, this will probably cause a linking failure
is.pas(86,1) Fatal: (10026) There were 2 errors compiling module, stopping
Fatal: (1018) Compilation aborted
Error: /usr/bin/ppcarm returned an error exitcode
make: *** [Makefile:83: is] Error 1

   * What exactly did you do (or not do) that was effective (or

it seems that required /usr/lib/gcc/XXXXX/YYYY library path is not included on fpc.cfg on ARM architectures
(https://buildd.debian.org/status/package.php?p=ironseed shows that warnings at least for arm64, armel, armhf)

It is mentioned in FAQ at https://wiki.lazarus.freepascal.org/Lazarus_Faq#I_receive_a_warning_during_the_linking_that_states:_Warning:_.22crtbeginS.o.22_.28or_.22crtendS.o.22.29_not_found
and manually adding "-Fl/usr/lib/gcc/arm-linux-gnueabihf/10" to /etc/fpc-3.2.0.cfg fixes the problem.
Similar library path is already present for amd64/i386 inside ifdef marked with "# path to the gcclib".
It should be simple to add it to non-intel architectures too.

   * What was the outcome of this action?

The two warnings show above appear (and so build fails due to '-Sewnh')

   * What outcome did you expect instead?

No warnings, and sucessful build on ARM.

-- System Information:
Debian Release: bullseye/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: armhf (armv7l)

Kernel: Linux 5.2.0-0.bpo.2-amd64 (SMP w/2 CPU threads)
Locale: LANG=C, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: unable to detect

Versions of packages fpc depends on:
ii  fp-docs-3.2.0   3.2.0+dfsg-8
ii  fp-utils-3.2.0  3.2.0+dfsg-8
ii  fpc-3.2.0       3.2.0+dfsg-8

fpc recommends no packages.

fpc suggests no packages.

-- no debconf information

More information about the Pkg-pascal-devel mailing list