Sign in Join

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

Mailing lists / fpc-devel / 2017-11

Cross compiling with FPC 3.1.1 for win32+64

1 message · 1 person ·

Reply by email Subscribe to this list Your subscription

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

kardan

Hi,

Today I tried to crosscompile FPC on debian stretch following this manual:
http://wiki.lazarus.freepascal.org/Cross_compiling_for_Win32_under_Linux

These are my first steps with FreePascal, so I welcome any help.

I used the zip for trunk which seems to be version 3.1.1 (rev 37618) ftp.freepascal.org/pub/fpc/snapshot/trunk/source/fpc.zip (are there signatures available?)

# 32bit
export INSTALL_PREFIX=/usr
export OS_TARGET=win32
export CPU_TARGET=i386
export fpcoptions="INSTALL_PREFIX=$INSTALL_PREFIX OS_TARGET=$OS_TARGET CPU_TARGET=$CPU_TARGET" make all $fpcoptions
sudo make crossinstall $fpcoptions
# This fails with: Compiler /home/user/src/fpc/compiler/ppcross386 not found. Stop.
# FIX: `cd compiler; ln -s ppc386 ppcross386`
# Link the cross-compiler and place the link where Lazarus can see it. sudo ln -sf /usr/lib/fpc/$fpcversion/ppcross386 /usr/bin/ppcross386

This seems to fix it, but using this compiling on our project i get the following error:
Free Pascal Compiler version 3.0.4rc1 [2017/08/07] for i386 Copyright (c) 1993-2017 by Florian Klaempfl and others (1002) Target OS: Win32 for
i386 (3104) Compiling
fcllaz.pas Fatal: (10022) Can't find unit system used by fcllaz Fatal: (1018) Compilation
aborted Error: /usr/bin/ppc386 returned an error
exitcode Error: (lazarus) Compile package FCL 1.0.1: stopped with exit code 256 Error: (lazarus) [TLazPackageGraph.CompileRequiredPackages] "Exit code 256" Error: (lazbuild) Project dependencies of /home/hitchwiki/src/tomboy/src/tomboy-ng/Tomboy_NG.lpi

So in fact it uses the older 3.0.4rc1 version. When I try to build FPC 3.1.1 for my system, it fails:

$ make all
Makefile:2918: *** The only supported starting compiler version is 3.0.2. You are trying to build with 3.0.4.. Stop.

It went well without problems to compile FPC for win64 and create an .exe for our project.

# 64bit
export OS_TARGET=win64
export CPU_TARGET=x86_64
export fpcoptions="INSTALL_PREFIX=$INSTALL_PREFIX OS_TARGET=$OS_TARGET CPU_TARGET=$CPU_TARGET"
make all $fpcoptions
sudo make crossinstall $fpcoptions
sudo ln -sf /usr/lib/fpc/$fpcversion/ppcrossx64 /usr/bin/ppcrossx64

I documented my steps here:
https://github.com/traumschule/tomboy/issues/2

Next i will try with trunk.

Thanks for any hint.
Kardan

Reply by email