View Issue Details

IDProjectCategoryView StatusLast Update
0024518FPCCompilerpublic2013-11-14 16:49
Reporterpeter greenAssigned ToFlorian 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Platformarm, powerpc, sparcOSlinuxOS Version
Product Version2.6.0Product Build 
Target VersionFixed in Version3.0.0 
Summary0024518: fpc silently omits crti.o and crtn.o from linker script if it can't find them.
DescriptionWhen building a program that links against a C library if fpc can't find crti.o and crtn.o it silently leaves them out of the linker script. On i386 and x86-64 the program is linked sucessfully anyway. However on other platforms it causes link errors. For example.

Linking test
/usr/bin/ld.bfd.real: warning: link.res contains output sections; did you forget -T?
./usr/lib/fpc/2.6.0/units/arm-linux/rtl/cprt0.o: In function `_haltproc_eabi':
(.text+0x88): undefined reference to `_fini'
./usr/lib/fpc/2.6.0/units/arm-linux/rtl/cprt0.o: In function `_haltproc_eabi':
(.text+0x90): undefined reference to `_init'
test.dpr(4,4) Error: Error while linking
test.dpr(4,4) Fatal: There were 1 errors compiling module, stopping
Fatal: Compilation aborted

These errors do not make it at all obvious that the problem is that freepascal can't find files it needs.

This happens at least with 2.6.0 and 2.6.2 but i'm fairly sure it happens over a wider range of versions than that.
TagsNo tags attached.
Fixed in Revision23892
FPCOldBugId
FPCTarget
Attached Files

Activities

Jonas Maebe

2013-11-14 16:49

manager   ~0071316

FPC now warns when it cannot find one of these files.

Issue History

Date Modified Username Field Change
2013-05-30 21:47 peter green New Issue
2013-11-14 16:49 Jonas Maebe Fixed in Revision => 23892
2013-11-14 16:49 Jonas Maebe Note Added: 0071316
2013-11-14 16:49 Jonas Maebe Status new => resolved
2013-11-14 16:49 Jonas Maebe Fixed in Version => 2.7.1
2013-11-14 16:49 Jonas Maebe Resolution open => fixed
2013-11-14 16:49 Jonas Maebe Assigned To => Florian