Forum > FPC development

Cross compilation in Debian 64 to 32

(1/1)

benohb:




--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---...../bin/rm -f i386/ppcppc64 i386/ppcarm i386/ppcmips i386/ppcmipsel i386/ppcjvm i386/ppc8086 i386/ppca64 i386/ppc386/bin/rm -f ppc386/bin/mkdir -p i386/units/i386-linux/usr/share/fpcsrc/3.1.1/compiler/ppcross386 -Pi386 -XPi386-linux- -Xr -Ur -Xs -O2 -n -Fui386 -Fusystems -Fu/usr/share/fpcsrc/3.1.1/rtl/units/i386-linux -Fii386 -FE. -FUi386/units/i386-linux -dRELEASE -di386 -dGDB -dBROWSERLOG -Fux86 -Sew    -di386 -dGDB -dBROWSERLOG -Fux86 -Sew pp.pasld: no input filespp.pas(228,1) Error: Error while linkingpp.pas(228,1) Fatal: There were 1 errors compiling module, stoppingFatal: Compilation abortedMakefile:4073: recipe for target 'ppc386' failedmake[3]: *** [ppc386] Error 1make[3]: Leaving directory '/usr/share/fpcsrc/3.1.1/compiler'Makefile:4154: recipe for target 'cycle' failedmake[2]: *** [cycle] Error 2make[2]: Leaving directory '/usr/share/fpcsrc/3.1.1/compiler'Makefile:2861: recipe for target 'compiler_cycle' failedmake[1]: *** [compiler_cycle] Error 2make[1]: Leaving directory '/usr/share/fpcsrc/3.1.1'Makefile:2893: recipe for target 'build-stamp.i386-linux' failedmake: *** [build-stamp.i386-linux] Error 2





--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} --- which i386-linux-ld/usr/bin/i386-linux-ld   which i386-linux-as/usr/bin/i386-linux-a 

Thaddy:
I am missing -FD/usr/bin/
The rest looks pretty ok to me.
Since it is a cross-compiler I seem to remember somehow that /usr/bin is not a default perse.
So give that a try.

The other option is that you point to real 32bit linker and assembler( instead of 64bit compiled versions that link and assemble 32 bit) , which will ONLY work on a dual 32/64 system, which you need to install.
That's called multiarch. You also have to install binutils-multiarch.

benohb:
Thank you Thaddy  :)
I have found the solution , There is a difference between
 this
http://rpdev.net/home/book/export/html/33
and this
http://wiki.freepascal.org/Cross_compiling




The information in the fpc.wiki. Wrong


..the correct



/usr/bin/i386-linux-ld

--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---#!/bin/bashld -melf_i386 "$@" /usr/bin/i386-linux-as

--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---#!/bin/bashas --32 "$@" 

Navigation

[0] Message Index

Go to full version