[fpc-devel] Cross-compiling Linux x86_64 -> Win32

Maxim Ganetsky ganmax at narod.ru
Tue Aug 9 02:49:02 CEST 2022


I am trying to set up cross-compilation from Linux x86_64 to Win32 and 
have the following problems:

Case 1. Using FPC 3.2.0.

I installed the following:

Installation process finished successfully without warnings.

And with this setup I get the following result:

$ make bigide OPT="-V3.2.0 -vut" OS_TARGET=win32 CPU_TARGET=i386 
make -C packager/registration
make[1]: Entering directory 
/bin/rm -f ../units/i386-win32/fcllaz.ppu
/bin/mkdir -p ../units/i386-win32
/usr/bin/ppc386 -Twin32 -XPi386-win32- -MObjFPC -Scghi -O1 -g -gl -l 
-vewnhibq -Fu. -FE. -FU../units/i386-win32 -V3.2.0 -vut -di386 fcllaz.pas
Configfile search: /root/.fpc.cfg
Configfile search: /usr/lib/fpc/etc/fpc.cfg
Configfile search: /etc/fpc.cfg
(11026) Reading options from file /etc/fpc.cfg
Hint: (11030) Start of reading config file /etc/fpc.cfg
Path "/usr/lib/fpc/3.2.0/units/i386-win32/rtl/" not found
Path "/root/.fppkg/lib/fpc/3.2.0/units/i386-win32/*/" not found
Path "/usr/lib/fpc/3.2.0/lib/i386-win32/" not found
Hint: (11031) End of reading config file /etc/fpc.cfg
Free Pascal Compiler version 3.2.0 [2020/06/09] for i386
Copyright (c) 1993-2020 by Florian Klaempfl and others
Path "/usr/lib/fpc/3.2.0/units/i386-win32/rtl/" not found
(1000) Compiler: /usr/lib/fpc/3.2.0/ppc386
(1002) Target OS: Win32 for i386
(1003) Using executable path: /usr/lib/fpc/3.2.0/
(1004) Using unit path: ./
(1004) Using unit path: /usr/lib/fpc/3.2.0/units/i386-win32/httpd22/
(1004) Using unit path: /usr/lib/fpc/3.2.0/units/i386-win32/libtar/
(1004) Using unit path: /usr/lib/fpc/3.2.0/units/i386-win32/httpd24/
(1004) Using unit path: /usr/lib/fpc/3.2.0/units/i386-win32/fcl-process/

Note the warning "Path "/usr/lib/fpc/3.2.0/units/i386-win32/rtl/" not 

Indeed there should have been system.ppu which is missing and therefore 
compilation fails. Why is this directory was not installed?

Case 2. Using FPC 3.2.2.

I don't see i386-win32.cross.x86_64-linux for FPC 3.2.2.

What is the recommended way to cross-compile with it?

Best regards,
  Maxim Ganetsky                  mailto:ganmax at narod.ru

More information about the fpc-devel mailing list