Sign in Join

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

Mailing lists / lazarus / 2013-05

Cross compiler

25 messages · 8 people · –

Reply by email Subscribe to this list Your subscription

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

Antonio Fortuny

Hi Folks.

Because of my recent problems with Lazaus+FPC on win32, I'd like to try a cross-compilation of my project on a win64 platform targetting a win32 execution platform.
I've downloaded the FPC sources 2.6.2 from the svn file fpcbuild-2.6.2.zip I then copied folders "compiler", "ide" and "installer" from fpcsrc from the zip file into the folder "C:\lazarus\fpc\2.6.2\source" Didn't touch the "packages" and 'rtl" as they are up to date. open a command line console:

set path=C:\lazarus\fpc\2.6.2\bin\x86_64-win64;%path% cd C:\lazarus\fpc\2.6.2\source\compiler make all install OS_TARGET=win32 CPU_TARGET=i386

and :
/C:/lazarus/fpc/2.6.2/bin/x86_64-win64/gmkdir.exe -p i386/units/i386-win32// //make ./msg2inc.exe//
//make[1]: Entering directory `C:/lazarus/fpc/2.6.2/source/compiler'// //C:/lazarus/fpc/2.6.2/bin/x86_64-win64/fpc.exe -Twin32 -Pi386 -XPi386-win32- -Xr -Fui386 -Fusystems -Fu../rtl -Fii386 -FE. -FUi386/units/i386-win32 -di386 -dGDB -dBROWSERLOG -Fux86 -FE. utils/msg2inc.pp//
//Error: ppc386.exe can't be executed, error message: Failed to execute ""ppc386.exe" -Twin32 -XPi386-win32- -Xr -Fui386 -Fusystems -Fu../rtl -Fii386 -FE. -FUi386/units/i386-win32 -di386 -dGDB -dBROWSERLOG -Fux86 -FE. utils/msg2inc.pp ", error code: 2//
//make[1]: *** [msg2inc.exe] Error 1//
//make[1]: Leaving directory `C:/lazarus/fpc/2.6.2/source/compiler'// //make: *** [msgtxt.inc] Error 2//
/
I didn't find very much help on the Internet. Just some scattered words on a mass of web pages but nothing fully coherent and the Marco Van de Voort's document which is highly technical and looks tto advanced for me: I'm not an expert in FPC and Lazarus build.

Any help would be appreciated

Antonio.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20130527/ec0191c7/attachment.html>

Reinier Olislagers
to Antonio Fortuny
Antonio Fortuny wrote 5 lines
Hi Folks. Because of my recent problems with Lazaus+FPC on win32, I'd like to try a cross-compilation of my project on a win64 platform targetting a win32 execution platform.

As far as I remember, getting this cross compiler isn't possible because of missing floating point support or something.
I've asked about this before on the FPC mailing list and I think Jonas replied...

Regards,
Reinier

Joost van der Sluis
to Antonio Fortuny: Hi Folks. Because of my recent problems with Lazaus+FPC on win32, I'd like to try a…
Antonio Fortuny wrote
I then copied folders "compiler", "ide" and "installer" from fpcsrc from the zip file into the folder "C:\lazarus\fpc\2.6.2\source" Didn't touch the "packages" and 'rtl" as they are up to date. open a command line console:

You'll need to copy the complete fpcsrc folder. And I would use the two commands separately. 'make all OS_TARGET=win32 CPU_TARGET=i386' and 'make crossinstall OS_TARGET=win32 CPU_TARGET=i386'

But it could be that you'll encounter problems with the 10-bit floating point support.

In that case you can simply download a bootstrap compiler for win32 (ftp://ftp.freepascal.org/fpc/dist/2.6.2/bootstrap/) and do:

'make clean all PP=c:\path\to\bootstrap\compiler\ppc386.exe'

On win64 you can run 32 bit applications, after all, so cross-compilation is not strictly necessary. Just install a 32 bit compiler

Joost

Antonio Fortuny
to Joost van der Sluis

Le 27/05/2013 11:47, Joost van der Sluis a ?crit :

Show quoted text 16 lines
On Mon, 2013-05-27 at 11:18 +0200, Antonio Fortuny wrote: > I then copied folders "compiler", "ide" and "installer" from fpcsrc > from the zip file into the folder "C:\lazarus\fpc\2.6.2\source" > Didn't touch the "packages" and 'rtl" as they are up to date. > open a command line console: You'll need to copy the complete fpcsrc folder. And I would use the two commands separately. 'make all OS_TARGET=win32 CPU_TARGET=i386' and 'make crossinstall OS_TARGET=win32 CPU_TARGET=i386' But it could be that you'll encounter problems with the 10-bit floating point support. In that case you can simply download a bootstrap compiler for win32 (ftp://ftp.freepascal.org/fpc/dist/2.6.2/bootstrap/) and do: 'make clean all PP=c:\path\to\bootstrap\compiler\ppc386.exe'

this line compiles what ? In which directory should it be run ?

On win64 you can run 32 bit applications, after all, so cross-compilation is not strictly necessary. Just install a 32 bit compiler

I know, but the goal is to make win32 executables on a win64 build platform

Show quoted text 10 lines
Joost -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Joost van der Sluis
to Antonio Fortuny: Le 27/05/2013 11:47, Joost van der Sluis a ?crit : this line compiles what ? In which…
Antonio Fortuny wrote 18 lines
Le 27/05/2013 11:47, Joost van der Sluis a ?crit : > On Mon, 2013-05-27 at 11:18 +0200, Antonio Fortuny wrote: >> I then copied folders "compiler", "ide" and "installer" from fpcsrc >> from the zip file into the folder "C:\lazarus\fpc\2.6.2\source" >> Didn't touch the "packages" and 'rtl" as they are up to date. >> open a command line console: > You'll need to copy the complete fpcsrc folder. And I would use the two > commands separately. 'make all OS_TARGET=win32 CPU_TARGET=i386' and > 'make crossinstall OS_TARGET=win32 CPU_TARGET=i386' > > But it could be that you'll encounter problems with the 10-bit floating > point support. > > In that case you can simply download a bootstrap compiler for win32 > (ftp://ftp.freepascal.org/fpc/dist/2.6.2/bootstrap/) and do: > > 'make clean all PP=c:\path\to\bootstrap\compiler\ppc386.exe' this line compiles what ? In which directory should it be run ?

In fpcsrc. It does the same as above: compiling Free Pascal. The only difference is that you force the usage of the 32-bit compiler to compile the new compiler.

Joost.

Antonio Fortuny
to Antonio Fortuny: Hi Folks. Because of my recent problems with Lazaus+FPC on win32, I'd like to try a…

Well, it isn't straightforward and I will abandon the idea until I find a real full step-by-step method to install and a run a cross-compilation Lazarus system.
I'm not a compiler developper so make it to run is anything but easy. I don't care if the procedure needs a lot of operations on a command line console and to have a step by step installation guide would be greatly appreciated. This is what I write down for my users (support people in general).
The only combination wich works is the one Win32/WinCE: two install programs which run immediately out of the box: great !

From now on, I'll live with my previous problem in Win32 trying to find a workaround which apparently does not seems obvious. Because I develop for Win32, Win64, WinCE (win32 based) and Linux x86_64, to have one signle development platform would be a charm. I think this is still a dream and there is a long way. If anyone of the Lazarus/FPC developpers finds or sets up a straightforward procedure I can find some time to test it. I have as many VMs to test almost any combination.
For the time being I can run onto:
- Win32 Vista
- Win64 MS server 2003 R2 X86_64
- Linux OpenSuse 12.2 x86_64,
- WinCE (execute only)

Antonio.

patspiper
to Antonio Fortuny: Hi Folks. Because of my recent problems with Lazaus+FPC on win32, I'd like to try a…
Antonio Fortuny wrote 9 lines
Hi Folks. Because of my recent problems with Lazaus+FPC on win32, I'd like to try a cross-compilation of my project on a win64 platform targetting a win32 execution platform. I've downloaded the FPC sources 2.6.2 from the svn file fpcbuild-2.6.2.zip I then copied folders "compiler", "ide" and "installer" from fpcsrc from the zip file into the folder "C:\lazarus\fpc\2.6.2\source" Didn't touch the "packages" and 'rtl" as they are up to date.

Use the whole source folder. Don't mix and match.

open a command line console: > set path=C:\lazarus\fpc\2.6.2\bin\x86_64-win64;%path% > cd C:\lazarus\fpc\2.6.2\source\compiler

You should cd C:\lazarus\fpc\2.6.2\source instead

> make all install OS_TARGET=win32 CPU_TARGET=i386

As Joost mentioned, use 2 separate commands:
'make all OS_TARGET=win32 CPU_TARGET=i386' and
'make crossinstall OS_TARGET=win32 CPU_TARGET=i386' You might need to add to the crossinstall command
INSTALL_PREFIX=<installpath> if you want to control where the installation will reside.

Show quoted text 17 lines
and : /C:/lazarus/fpc/2.6.2/bin/x86_64-win64/gmkdir.exe -p i386/units/i386-win32// //make ./msg2inc.exe// //make[1]: Entering directory `C:/lazarus/fpc/2.6.2/source/compiler'// //C:/lazarus/fpc/2.6.2/bin/x86_64-win64/fpc.exe -Twin32 -Pi386 -XPi386-win32- -Xr -Fui386 -Fusystems -Fu../rtl -Fii386 -FE. -FUi386/units/i386-win32 -di386 -dGDB -dBROWSERLOG -Fux86 -FE. utils/msg2inc.pp// //Error: ppc386.exe can't be executed, error message: Failed to execute ""ppc386.exe" -Twin32 -XPi386-win32- -Xr -Fui386 -Fusystems -Fu../rtl -Fii386 -FE. -FUi386/units/i386-win32 -di386 -dGDB -dBROWSERLOG -Fux86 -FE. utils/msg2inc.pp ", error code: 2// //make[1]: *** [msg2inc.exe] Error 1// //make[1]: Leaving directory `C:/lazarus/fpc/2.6.2/source/compiler'// //make: *** [msgtxt.inc] Error 2// /

Where is ppc386.exe located? On Linux, I add the path to that as well.

Stephano
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20130527/241fffa9/attachment.html>

Paul Breneman
to Antonio Fortuny: Well, it isn't straightforward and I will abandon the idea until I find a real full…
Antonio Fortuny wrote 24 lines
Well, it isn't straightforward and I will abandon the idea until I find a real full step-by-step method to install and a run a cross-compilation Lazarus system. I'm not a compiler developper so make it to run is anything but easy. I don't care if the procedure needs a lot of operations on a command line console and to have a step by step installation guide would be greatly appreciated. This is what I write down for my users (support people in general). The only combination wich works is the one Win32/WinCE: two install programs which run immediately out of the box: great ! From now on, I'll live with my previous problem in Win32 trying to find a workaround which apparently does not seems obvious. Because I develop for Win32, Win64, WinCE (win32 based) and Linux x86_64, to have one signle development platform would be a charm. I think this is still a dream and there is a long way. If anyone of the Lazarus/FPC developpers finds or sets up a straightforward procedure I can find some time to test it. I have as many VMs to test almost any combination. For the time being I can run onto: - Win32 Vista - Win64 MS server 2003 R2 X86_64 - Linux OpenSuse 12.2 x86_64, - WinCE (execute only)

I agree with you about the need to make things easier!

The WinCE stuff needs to be updated but other than that I think this might cover what you want (but with fpGUI instead of Lazarus): http://www.turbocontrol.com/easyfpgui.htm

Similar new Synapse (simple) terminal program:
http://www.ctrlterm.com/

For easy Lazarus you might consider Code Typhon:
http://www.pilotlogic.com/

Regards, Paul Breneman www.TurboControl.com - Hardware and software development services - Educational programming project for environment monitoring - Information on using FreePascal for embedded systems
Sven Barth
to Antonio Fortuny: Le 27/05/2013 11:47, Joost van der Sluis a ?crit : this line compiles what ? In which…
"Antonio Fortuny" wrote 5 lines
> On win64 you can run 32 bit applications, after all, so > cross-compilation is not strictly necessary. Just install a 32 bit > compiler I know, but the goal is to make win32 executables on a win64 build

platform

Then use the native Win32 compiler. This makes absolutely no difference on Windows.
Compiling from Win64 to Win32 using a cross compiler is not supported, because of missing Extended support. Only when the softfloat unit is fully implemented support for this can be added.

Regards,
Sven

Sven Barth
to Antonio Fortuny: Well, it isn't straightforward and I will abandon the idea until I find a real full…
"Antonio Fortuny" wrote
Because I develop for Win32, Win64, WinCE (win32 based) and Linux

x86_64, to have one signle development platform would be a charm. I think this is still a dream and there is a long way.

In this situation the best solution would be to use Linux x86_64 as the base system. Win32 and Win64 cross compilers can be easily built using

make crossall crossinstall OS_TARGET=win32 CPU_TARGET=i386 INSTALL_PREFIX=/wherever/you/have/your/fpc/installed make crossall crossinstall OS_TARGET=win64 CPU_TARGET=x86_64 INSTALL_PREFIX=/wherever/you/have/your/fpc/installed

For WinCE you'll need cross binutils from Linux to WinCE and then you can build the cross compiler using this:

make crossall crossinstall OS_TARGET=wince CPU_TARGET=arm CROSSBINDIR=/path/to/binutils BINUTILSPREFIX=arm-wince- INSTALL_PREFIX=/wherever/you/have/your/fpc/installed

Whereby CROSSBINDIR is only necessary if the directory is not in PATH and BINUTILSPREFIX needs to be adjusted to whatever your binutils use. These settings need to be applied to the compiler configuration or command line when compiling as well... (as -FD/path/to/binutils and -XParm-wince- respectively)

Regards,
Sven

Antonio Fortuny
to Sven Barth

Le 27/05/2013 19:28, Sven Barth a ?crit :

Show quoted text 10 lines
Am 27.05.2013 14:51 schrieb "Antonio Fortuny" : > Because I develop for Win32, Win64, WinCE (win32 based) and Linux x86_64, to have one signle development platform would be a charm. I think this is still a dream and there is a long way. In this situation the best solution would be to use Linux x86_64 as the base system. Win32 and Win64 cross compilers can be easily built using

Assume FPC is installed in
/usr/lib64/fpc/2.6.2
sources are in
/usr/share/fpcsrc/2.6.2
and lazarus is in
/usr/lib64/lazarus with some other tings in ~/.lazarus

make crossall crossinstall OS_TARGET=win32 CPU_TARGET=i386 INSTALL_PREFIX=/wherever/you/have/your/fpc/installed make crossall crossinstall OS_TARGET=win64 CPU_TARGET=x86_64 INSTALL_PREFIX=/wherever/you/have/your/fpc/installed

fpc/installed : /usr/lib64/fpc/2.6.2 or /usr/share/fpcsrc/2.6.2 WHERE should I place the current directory to run these commands ? cd ???

Show quoted text 7 lines
For WinCE you'll need cross binutils from Linux to WinCE and then you can build the cross compiler using this: make crossall crossinstall OS_TARGET=wince CPU_TARGET=arm CROSSBINDIR=/path/to/binutils BINUTILSPREFIX=arm-wince- INSTALL_PREFIX=/wherever/you/have/your/fpc/installed

same question
cd ????

What will those commands produce ?
The cross-compiler only ?

This makes something for FPC. What about Lazarus ?

Show quoted text 16 lines
Whereby CROSSBINDIR is only necessary if the directory is not in PATH and BINUTILSPREFIX needs to be adjusted to whatever your binutils use. These settings need to be applied to the compiler configuration or command line when compiling as well... (as -FD/path/to/binutils and -XParm-wince- respectively) Regards, Sven -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Sven Barth
to Antonio Fortuny
Antonio Fortuny wrote 25 lines
Le 27/05/2013 19:28, Sven Barth a ?crit : > Am 27.05.2013 14:51 schrieb "Antonio Fortuny" > : > > Because I develop for Win32, Win64, WinCE (win32 based) and Linux > x86_64, to have one signle development platform would be a charm. I > think this is still a dream and there is a long way. > > In this situation the best solution would be to use Linux x86_64 as > the base system. Win32 and Win64 cross compilers can be easily built > using > Assume FPC is installed in /usr/lib64/fpc/2.6.2 sources are in /usr/share/fpcsrc/2.6.2 and lazarus is in /usr/lib64/lazarus with some other tings in ~/.lazarus > make crossall crossinstall OS_TARGET=win32 CPU_TARGET=i386 > INSTALL_PREFIX=/wherever/you/have/your/fpc/installed > make crossall crossinstall OS_TARGET=win64 CPU_TARGET=x86_64 > INSTALL_PREFIX=/wherever/you/have/your/fpc/installed fpc/installed : /usr/lib64/fpc/2.6.2 or /usr/share/fpcsrc/2.6.2 WHERE should I place the current directory to run these commands ? cd ???

How I love those directory problems with different Linux distributions -.- Ok, with that lib64 directory things are not so nice, but I have a solution for that as well.
To not interfere with your package manager I'd suggest you to install a complete freshly build compiler in /usr/local (ensure that the directory exists):

cd /usr/share/fpcsrc/2.6.2
make all
sudo make install INSTALL_PREFIX=/usr/local
make crossall OS_TARGET=win32 CPU_TARGET=i386
sudo make crossinstall OS_TARGET=win32 CPU_TARGET=i386 INSTALL_PREFIX=/usr/local
make crossall OS_TARGET=win64 CPU_TARGET=x86_64
sudo make crossinstall OS_TARGET=win64 CPU_TARGET=x86_64 INSTALL_PREFIX=/usr/local

To use the compiler you'll then need to modify your ~/.fpc.cfg and adjust all paths that previously pointed to /usr/lib64/fpc/2.6.2/... to the new directory.

Show quoted text 9 lines
> > For WinCE you'll need cross binutils from Linux to WinCE and then you > can build the cross compiler using this: > > make crossall crossinstall OS_TARGET=wince CPU_TARGET=arm > CROSSBINDIR=/path/to/binutils BINUTILSPREFIX=arm-wince- > INSTALL_PREFIX=/wherever/you/have/your/fpc/installed same question cd ????

Please split this one similar to above and set CROSSBINDIR and BINUTILSPREFIX accordingly.

What will those commands produce ? The cross-compiler only ?

The first command after the "cd" will produce a native Linux compiler (including RTL, FCL, etc) for your current platform (I assume x86_64), then the Win32 one (compiler, RTL, FCL, etc.) and the Win64 one (compiler, RTL, FCL, etc.)

This makes something for FPC. What about Lazarus ?

Simply point Lazarus to /usr/local/bin/fpc instead of /usr/bin/fpc and it *should* work. Then you just need to set your target options correctly and you should be good to go.

Regards,
Sven

Antonio Fortuny
to Sven Barth

Hi Sven.

Finally I've got a functional new cross compiler compiled.

Now I have two folders for fpc compiler: the one downloaded along with lazarus and the new cross compiler one build by me.

After Lazarus is installed, I launch it and it display the very first configuration screen for fpc compiler & sources;
For sources, no problem, but for the compiler le combobox shows three possibilities in the newly created directory:
ppcx64,
ppcross386
ppcrossx64

If I choose ppcx64 then when defining a new build mode for win32 with os-win32 and pocessor-i386 Lazarus complains about th compiler telling that it does not support the target i386-win32
What should be specified in the Lazarus options-->Environment-->Files to have the cross compilation capabilities ?
Maybe should I merge both fpc bin directories ?

Thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20130731/861421db/attachment.html>

Kostas Michalopoulos
to Sven Barth: platform Then use the native Win32 compiler. This makes absolutely no difference on…
Sven Barth wrote
Compiling from Win64 to Win32 using a cross compiler is not supported, because of missing Extended support. Only when the softfloat unit is fully implemented support for

I might be getting things wrong and misunderstood the topic, but i'm sure that you can compile Win32 programs from Win64 lazarus by settings the proper target CPU and arch in the project settings. In fact this is how i made the executable for this utility:
http://runtimelegend.com/rep/fullscreenizer/index (which i tried in a VM running 32bit Windows XP and it worked).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20130731/2f68d423/attachment.html>

Sven Barth
to Kostas Michalopoulos
Kostas Michalopoulos wrote 14 lines
On Mon, May 27, 2013 at 7:27 PM, Sven Barth < <mailto:>> wrote: Compiling from Win64 to Win32 using a cross compiler is not supported, because of missing Extended support. Only when the softfloat unit is fully implemented support for I might be getting things wrong and misunderstood the topic, but i'm sure that you can compile Win32 programs from Win64 lazarus by settings the proper target CPU and arch in the project settings. In fact this is how i made the executable for this utility: http://runtimelegend.com/rep/fullscreenizer/index (which i tried in a VM running 32bit Windows XP and it worked).

Compiling from Win64 to Win32 using a *cross compiler* is not supported. It's not only not supported, it's even disallowed in the makefiles...

Lazarus provides a native Win32 compiler as Win64 can run Win32 programs without problems.

Regards,
Sven

Sven Barth
to Antonio Fortuny: Hi Sven. Finally I've got a functional new cross compiler compiled. Now I have two…
Antonio Fortuny wrote 14 lines
Hi Sven. Finally I've got a functional new cross compiler compiled. Now I have two folders for fpc compiler: the one downloaded along with lazarus and the new cross compiler one build by me. After Lazarus is installed, I launch it and it display the very first configuration screen for fpc compiler & sources; For sources, no problem, but for the compiler le combobox shows three possibilities in the newly created directory: ppcx64, ppcross386 ppcrossx64

Did you do a "make install" in the end? If so that should have build a "fpc" binary as well which should be located in the "bin" (on *nix systems) or "i386-win32\bin" (on Win32) or "x86_64-win64\bin" (on Win64) directory. This "fpc" binary is the compiler driver which allows you (and Lazarus) to select a different target platform using the "-P" argument (which is utilized by Lazarus when you change the platform).

Regards,
Sven

Antonio Fortuny
to Sven Barth

Le 31/07/2013 18:05, Sven Barth a ?crit :

Show quoted text 23 lines
On 31.07.2013 16:05, Antonio Fortuny wrote: > Hi Sven. > > Finally I've got a functional new cross compiler compiled. > > Now I have two folders for fpc compiler: the one downloaded along with > lazarus and the new cross compiler one build by me. > > After Lazarus is installed, I launch it and it display the very first > configuration screen for fpc compiler & sources; > For sources, no problem, but for the compiler le combobox shows three > possibilities in the newly created directory: > ppcx64, > ppcross386 > ppcrossx64 Did you do a "make install" in the end? If so that should have build a "fpc" binary as well which should be located in the "bin" (on *nix systems) or "i386-win32\bin" (on Win32) or "x86_64-win64\bin" (on Win64) directory. This "fpc" binary is the compiler driver which allows you (and Lazarus) to select a different target platform using the "-P" argument (which is utilized by Lazarus when you change the platform).

Hi Sven.
These are the shell commands I launch:

install fpc compiler
rpm -ivh fpc-2.6.2-0.laz.x86_64.rpm
install fpc sources
rpm -ivh fpc-src-2.6.2-0.laz.x86_64.rpm
Install lazarus
rpm -ivh lazarus-1.0.10-0.x86_64.rpm
download fpc full sources from
http://svn.svn.freepascal.org/svn/fpc/tags/release_2_6_2_rc1 using: cd /usr/local/src
svn checkout
http://svn.freepascal.org/svn/fpc/tags/release_2_6_2_rc1 fpc cd fpc
make all
make install INSTALL_PREFIX=/usr/local
make crossall OS_TARGET=win32 CPU_TARGET=i386
make crossinstall OS_TARGET=win32 CPU_TARGET=i386
INSTALL_PREFIX=/usr/local
make crossall OS_TARGET=win64 CPU_TARGET=x86_64
make crossinstall OS_TARGET=win64 CPU_TARGET=x86_64 INSTALL_PREFIX=/usr/local
I noticed that new directories have been created or filled with new objects: /usr/local/bin
/usr/local/lib with a fpc directory

Did I miss something ?

Show quoted text 11 lines
Regards, Sven -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Antonio Fortuny
to Sven Barth: Compiling from Win64 to Win32 using a *cross compiler* is not supported. It's not only…

Le 31/07/2013 18:02, Sven Barth a ?crit :

Compiling from Win64 to Win32 using a *cross compiler* is not supported. It's not only not supported, it's even disallowed in the makefiles...

Hum. I have a *Win7 x64* with Lazarus 1.0.10 installed ready for cross compilation for
Win64
Win32
WinCE
and it works. What did I do ?

Install process

Install fpc-2.6.2.i386-win32.exe
- C:\fpc\2.6.2
- full install
- do not associate.pp, .inc etc

Install fpc-2.6.2.arm-wince.exe
- C:\fpc\2.6.2
- fpc folder exists: OK
- full install
- do not associate.pp, .inc etc

Install fpc-2.6.2.x86_64-win64.exe
- C:\fpc\2.6.2
- fpc folder exists: OK
- full install
- do not associate.pp, .inc etc

Download fpc 2.6.2 sources (fpcbuild-2.6.2.zip), decompress and move into C:\fpc\2.6.2\source

Install Lazarus lazarus-1.0.10-fpc-2.6.2-win64.exe as usual
- C:\Lazarus
- full install

LaunchLazarus
- adapt fpc compiler and fpc sources paths on first launch screen
- config IDE to your needs
- rename or delete C:\Lazarus\fpc as it bacame useless

Recompile packages and projects as needed
I've made a very little test program (main form, a close button) and it works on the three platforms
To be fully honest I've not yet tried to build complex projects. But I'll do it and let you know wkat happens

Antonio.

Show quoted text 13 lines
Lazarus provides a native Win32 compiler as Win64 can run Win32 programs without problems. Regards, Sven -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20130801/8d933342/attachment.html>

Sven Barth
to Antonio Fortuny: Le 31/07/2013 18:05, Sven Barth a ?crit : Hi Sven. These are the shell commands I launch:…
Antonio Fortuny wrote 39 lines
Le 31/07/2013 18:05, Sven Barth a ?crit : > On 31.07.2013 16:05, Antonio Fortuny wrote: >> Hi Sven. >> >> Finally I've got a functional new cross compiler compiled. >> >> Now I have two folders for fpc compiler: the one downloaded along with >> lazarus and the new cross compiler one build by me. >> >> After Lazarus is installed, I launch it and it display the very first >> configuration screen for fpc compiler & sources; >> For sources, no problem, but for the compiler le combobox shows three >> possibilities in the newly created directory: >> ppcx64, >> ppcross386 >> ppcrossx64 > > Did you do a "make install" in the end? If so that should have build > a "fpc" binary as well which should be located in the "bin" (on *nix > systems) or "i386-win32\bin" (on Win32) or "x86_64-win64\bin" (on > Win64) directory. This "fpc" binary is the compiler driver which > allows you (and Lazarus) to select a different target platform using > the "-P" argument (which is utilized by Lazarus when you change the > platform). Hi Sven. These are the shell commands I launch: install fpc compiler rpm -ivh fpc-2.6.2-0.laz.x86_64.rpm install fpc sources rpm -ivh fpc-src-2.6.2-0.laz.x86_64.rpm Install lazarus rpm -ivh lazarus-1.0.10-0.x86_64.rpm download fpc full sources from http://svn.svn.freepascal.org/svn/fpc/tags/release_2_6_2_rc1 using: cd /usr/local/src svn checkout http://svn.freepascal.org/svn/fpc/tags/release_2_6_2_rc1 fpc

Why are you doing a checkout of 2.6.2 RC1? The tag for 2.6.2 is called just "release_2_6_2".

Show quoted text 13 lines
cd fpc make all make install INSTALL_PREFIX=/usr/local make crossall OS_TARGET=win32 CPU_TARGET=i386 make crossinstall OS_TARGET=win32 CPU_TARGET=i386 INSTALL_PREFIX=/usr/local make crossall OS_TARGET=win64 CPU_TARGET=x86_64 make crossinstall OS_TARGET=win64 CPU_TARGET=x86_64 INSTALL_PREFIX=/usr/local I noticed that new directories have been created or filled with new objects: /usr/local/bin /usr/local/lib with a fpc directory

You should have a "fpc" binary in your "/usr/local/bin" then. You'll need to point Lazarus to that.

Regards,
Sven

Sven Barth
to Antonio Fortuny: Le 31/07/2013 18:02, Sven Barth a ?crit : Hum. I have a *Win7 x64* with Lazarus 1.0.10…
Antonio Fortuny wrote 20 lines
Le 31/07/2013 18:02, Sven Barth a ?crit : > > Compiling from Win64 to Win32 using a *cross compiler* is not > supported. It's not only not supported, it's even disallowed in the > makefiles... Hum. I have a *Win7 x64* with Lazarus 1.0.10 installed ready for cross compilation for Win64 Win32 WinCE and it works. What did I do ? Install process Install fpc-2.6.2.i386-win32.exe - C:\fpc\2.6.2 - full install - do not associate.pp, .inc etc

Which is a native i386 binary.

Show quoted text 6 lines
Install fpc-2.6.2.arm-wince.exe - C:\fpc\2.6.2 - fpc folder exists: OK - full install - do not associate.pp, .inc etc

Win32 -> WinCE cross compiler

Show quoted text 5 lines
Install fpc-2.6.2.x86_64-win64.exe - C:\fpc\2.6.2 - fpc folder exists: OK - full install - do not associate.pp, .inc etc

Win32 -> Win64 cross compiler

So everything as explained by me :)

Regards,
Sven
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20130801/24152d79/attachment.html>

Sven Barth
to Sven Barth
Sven Barth wrote 37 lines
Am 01.08.2013 09:56, schrieb Antonio Fortuny: > > Le 31/07/2013 18:02, Sven Barth a ?crit : >> >> Compiling from Win64 to Win32 using a *cross compiler* is not >> supported. It's not only not supported, it's even disallowed in the >> makefiles... > Hum. I have a *Win7 x64* with Lazarus 1.0.10 installed ready for > cross compilation for > Win64 > Win32 > WinCE > and it works. What did I do ? > > Install process > > Install fpc-2.6.2.i386-win32.exe > - C:\fpc\2.6.2 > - full install > - do not associate.pp, .inc etc > Which is a native i386 binary. > Install fpc-2.6.2.arm-wince.exe > - C:\fpc\2.6.2 > - fpc folder exists: OK > - full install > - do not associate.pp, .inc etc > Win32 -> WinCE cross compiler > Install fpc-2.6.2.x86_64-win64.exe > - C:\fpc\2.6.2 > - fpc folder exists: OK > - full install > - do not associate.pp, .inc etc Win32 -> Win64 cross compiler So everything as explained by me :)

And if you don't believe me, then look at the bottom of $fpcsrc/compiler/fpcdefs.inc, please (e.g. here:
http://svn.freepascal.org/cgi-bin/viewvc.cgi/trunk/compiler/fpcdefs.inc?view=markup ). This include file is used by each unit of the compiler.

Regards,
Sven
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20130801/58644985/attachment-0001.html>

Antonio Fortuny
to Sven Barth: Which is a native i386 binary. Win32 -> WinCE cross compiler Win32 -> Win64 cross compiler

Le 01/08/2013 10:05, Sven Barth a ?crit :

Show quoted text 37 lines
Am 01.08.2013 09:56, schrieb Antonio Fortuny: > > Le 31/07/2013 18:02, Sven Barth a ?crit : >> >> Compiling from Win64 to Win32 using a *cross compiler* is not >> supported. It's not only not supported, it's even disallowed in the >> makefiles... > Hum. I have a *Win7 x64* with Lazarus 1.0.10 installed ready for > cross compilation for > Win64 > Win32 > WinCE > and it works. What did I do ? > > Install process > > Install fpc-2.6.2.i386-win32.exe > - C:\fpc\2.6.2 > - full install > - do not associate.pp, .inc etc > Which is a native i386 binary. > Install fpc-2.6.2.arm-wince.exe > - C:\fpc\2.6.2 > - fpc folder exists: OK > - full install > - do not associate.pp, .inc etc > Win32 -> WinCE cross compiler > Install fpc-2.6.2.x86_64-win64.exe > - C:\fpc\2.6.2 > - fpc folder exists: OK > - full install > - do not associate.pp, .inc etc Win32 -> Win64 cross compiler So everything as explained by me :)

You are absolutely right for everything. 8-)

Antonio.

Show quoted text 10 lines
Regards, Sven -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20130801/6ac3f14a/attachment.html>

Antonio Fortuny
to Sven Barth: And if you don't believe me, then look at the bottom of $fpcsrc/compiler/fpcdefs.inc,…

Le 01/08/2013 10:12, Sven Barth a ?crit :

Show quoted text 42 lines
Am 01.08.2013 10:05, schrieb Sven Barth: > Am 01.08.2013 09:56, schrieb Antonio Fortuny: >> >> Le 31/07/2013 18:02, Sven Barth a ?crit : >>> >>> Compiling from Win64 to Win32 using a *cross compiler* is not >>> supported. It's not only not supported, it's even disallowed in the >>> makefiles... >> Hum. I have a *Win7 x64* with Lazarus 1.0.10 installed ready for >> cross compilation for >> Win64 >> Win32 >> WinCE >> and it works. What did I do ? >> >> Install process >> >> Install fpc-2.6.2.i386-win32.exe >> - C:\fpc\2.6.2 >> - full install >> - do not associate.pp, .inc etc >> > Which is a native i386 binary. >> Install fpc-2.6.2.arm-wince.exe >> - C:\fpc\2.6.2 >> - fpc folder exists: OK >> - full install >> - do not associate.pp, .inc etc >> > Win32 -> WinCE cross compiler >> Install fpc-2.6.2.x86_64-win64.exe >> - C:\fpc\2.6.2 >> - fpc folder exists: OK >> - full install >> - do not associate.pp, .inc etc > Win32 -> Win64 cross compiler > > So everything as explained by me :) And if you don't believe me, then look at the bottom of $fpcsrc/compiler/fpcdefs.inc, please (e.g. here: http://svn.freepascal.org/cgi-bin/viewvc.cgi/trunk/compiler/fpcdefs.inc?view=markup ). This include file is used by each unit of the compiler.

I confess that I do not read every .inc file your honor. Should I ? :-D

Antonio.

Show quoted text 10 lines
Regards, Sven -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20130801/c2ad2ef1/attachment.html>