[fpc-pascal] headaches trying to create x86_64 to i386 cross-compile deb package

Jonas Maebe jonas.maebe at elis.ugent.be
Fri Jan 21 09:30:57 CET 2011


On 20 Jan 2011, at 19:52, Seth Grover wrote:

> However, I'm now trying to build a package for the x86_64 to i386
> cross compiler. The "usage" printout of create_fpc_deb.sh says to
> specify OS_TARGET, CPU_TARGET, and BINUTILSPREFIX as environment
> variables, which I am doing. The first time I tried it it griped about
> ppcross386 not being available, which I thought was strange (since
> isn't that what I'm building)

That indeed means that the script is buggy for building cross- 
compilers. Since it's in the Lazarus svn repository, you may want to  
report that on the Lazarus list (although they're probably maintained  
by Abou Al Montacir, and he may also be on this list).

> so I copied ppcross386 from another
> machine into my /usr/bin so it would be available. However, the "make"
> portion of the script is failing.

If you start a top level "make all" in the top level FPC dir using a  
cross-compiler as starting compiler, the makefile will fail because it  
will always first build the rtl/compiler for your OS' real  
architecture (i.e., in this case it is trying to build the x86-64 RTL  
using an i386 cross-compiler). In general, using a cross-compiler to  
start "make all" is not supported and the real fix has to be performed  
in that script, but you can work around the problem you are having by  
also explicitly setting CPU_SOURCE=i386 (although that's a hack).


Jonas



More information about the fpc-pascal mailing list