linking C fails on amd64 fc3 w/32-bit compat libs installed
Original Reporter info from Mantis: FPCCore
-
Reporter name: FPC core team
Original Reporter info from Mantis: FPCCore
- Reporter name: FPC core team
Description:
Linking the C library fails on amd64 fedora core 3 with 32-bit compatibility libs installed.
The problem seems to be that FPC looks for libraries in /lib, /usr/lib and /usr/X11R6/lib instead of /lib64, /usr/lib64 and /usr/X11R6/lib64. Adding these to fpc.cfg doesn't help since the compiler always searches /lib, /usr/lib and /usr/X11R6/lib first.
[nickysn@milkokalaydjiev test]$ cat test.pp
{$linklib c}
Begin
End.
[nickysn@milkokalaydjiev test]$ fpc test.pp
Free Pascal Compiler version 1.9.8 [2005/02/20] for x86_64
Copyright (c) 1993-2005 by Florian Klaempfl
Target OS: Linux for x86-64
Compiling test.pp
Assembling program
Linking test
/usr/bin/ld: skipping incompatible /usr/lib/crti.o when searching for /usr/lib/crti.o
/usr/bin/ld: cannot find /usr/lib/crti.o
test.pp(5) Error: Error while linking
Error: /usr/bin/ppcx64 returned an error exitcode (normal if you did not specifiy a source file to be compiled)
[nickysn@milkokalaydjiev test]$ file /usr/lib/crti.o
/usr/lib/crti.o: ELF 32-bit LSB relocatable, Intel 80386, version 1 (SYSV), not stripped
[nickysn@milkokalaydjiev test]$ file /usr/lib64/crti.o
/usr/lib64/crti.o: ELF 64-bit LSB relocatable, AMD x86-64, version 1 (SYSV), not stripped
[nickysn@milkokalaydjiev test]$
Additional information:
Reporter: Nikolay Nikolov
EMail: nickysn at bigfoot dot com
Mantis conversion info:
- Mantis ID: 5718
- OS: Linux
- Version: 1.9.8
- Fixed in version: 1.9.9