Sign in Join

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

Mailing lists / fpc-pascal / 2004-08

Running 32bit on 64bit suse

3 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

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

Unknown author

I tried running the 32bit fpc on my opteron suse 9.1 64bit, which should be possible, but I get linking problems:

Free Pascal Compiler version 1.9.4 [2004/05/30] for i386 Copyright (c) 1993-2004 by Florian Klaempfl
Target OS: Linux for i386
Compiling hello.pas
Linking hello
/usr/bin/ld: skipping incompatible
/usr/local/lib/fpc/1.9.4/units/linux/rtl/prt0.o when searching for /usr/local/lib/fpc/1.9.4/units/linux/rtl/prt0.o
/usr/bin/ld: cannot find
/usr/local/lib/fpc/1.9.4/units/linux/rtl/prt0.o hello.pas(4,1) Error: Error while linking Closing script ppas.sh

I get the same error whether I run it 'normally' or do: linux32 fpc hello.pas

I also tried 1.0.10 in the same way and got;
Free Pascal Compiler version 1.0.10 [2003/06/26] for i386 Copyright (c) 1993-2003 by Florian Klaempfl
Target OS: Linux for i386
Compiling hello.pas
Assembling hello
hello.s: Assembler messages:
hello.s:14: Error: suffix or operands invalid for `push' hello.s:20: Error: `-4(%ebp)' is not a valid 64 bit base/index expression hello.s:21: Error: suffix or operands invalid for `push' hello.s:22: Error: `-4(%ebp)' is not a valid 64 bit base/index expression hello.s:23: Error: suffix or operands invalid for `push' hello.s:25: Error: `-4(%ebp)' is not a valid 64 bit base/index expression hello.s:27: Error: suffix or operands invalid for `push' hello.pas(4,4) Error: Error while assembling exitcode 1 hello.pas(4,4) Fatal: There were 2 errors compiling module, stopping

I'd be grateful if anyone can tell me a way out of this, other than going back completely to i386 linux. I tried the suse amd64 list but got no answer.

Thanks,
- Richard.

Reply by email

Marco van de Voort
to Unknown author
Show quoted text 19 lines
I tried running the 32bit fpc on my opteron suse 9.1 64bit, which should be possible, but I get linking problems: Free Pascal Compiler version 1.9.4 [2004/05/30] for i386 Copyright (c) 1993-2004 by Florian Klaempfl Target OS: Linux for i386 Compiling hello.pas Linking hello /usr/bin/ld: skipping incompatible /usr/local/lib/fpc/1.9.4/units/linux/rtl/prt0.o when searching for /usr/local/lib/fpc/1.9.4/units/linux/rtl/prt0.o /usr/bin/ld: cannot find /usr/local/lib/fpc/1.9.4/units/linux/rtl/prt0.o hello.pas(4,1) Error: Error while linking Closing script ppas.sh I get the same error whether I run it 'normally' or do: linux32 fpc hello.pas I also tried 1.0.10 in the same way and got;

Use
fpc -FD/path/to/32bitbinutils <file>

Reply by email

Unknown author
to Marco van de Voort
Show quoted text 5 lines
> I tried running the 32bit fpc on my opteron suse 9.1 64bit, which > should be possible, but I get linking problems: Use fpc -FD/path/to/32bitbinutils <file>

It turns out that the suse linker does both 32 and 64 bit and that I needed wrapper scripts for as and ld
as:
exec as --32 "$@"
ld:
exec ld -m elf_i386 "$@"

Provided they are not in a directory that is in the PATH then it works fine using your solution

fpc -FD/path/to/wrapperscripts <file>

Many thanks.
- Richard.

Reply by email