Sign in Join

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

Mailing lists / fpc-devel / 2008-09

Help on building crosscompiler with fpc 2.3.1

15 messages · 6 people · –

Reply by email Subscribe to this list Your subscription

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

Lukas Gradl

At the moment, I'm developing on a i386 Linux machine. For some servers I need x86_64 binaries, so I have a second machine with x86_64 linux I use just for compiling.

It would be great to compile everything on one machine, so I tried to build a crosscompiler for x86_64 on my i386 machine. The Wikipage on http://wiki.lazarus.freepascal.org/Cross_compiling doesn't work anymore
- make is complaining about a missing ppcrossx86_64 almost immediatly.

Could anyone point me to the right direction on how to build a crosscompiler myself? (either on my x64_86 machine or on my i386 machine...)

regards
Lukas

-------------------------- software security networks Lukas Gradl <fpc#ssn.at> Eduard-Bodem-Gasse 9 A - 6020 Innsbruck Tel: +43-512-214040-0 Fax: +43-512-214040-21 --------------------------

Reply by email

Marco van de Voort
to Lukas Gradl

In our previous episode, Lukas Gradl said:

Show quoted text 8 lines
At the moment, I'm developing on a i386 Linux machine. For some servers I need x86_64 binaries, so I have a second machine with x86_64 linux I use just for compiling. It would be great to compile everything on one machine, so I tried to build a crosscompiler for x86_64 on my i386 machine. The Wikipage on http://wiki.lazarus.freepascal.org/Cross_compiling doesn't work anymore - make is complaining about a missing ppcrossx86_64 almost immediatly.

Please be more detailed. What command do you run in which directory, with what version as starting compiler?

Could anyone point me to the right direction on how to build a crosscompiler myself? (either on my x64_86 machine or on my i386 machine...)

It should work more or less, I crosscompiled from linux/x86 to FreeBSD/x86_64 not that long ago. I did remember a slight deviation (IIRC something like having to pass the crosscompiler to both FPC and PP variables).

See also http://www.stack.nl/~marcov/buildfaq.pdf for some background info.

I suspected some of the (albeit minor, but potential confusing) differences come from the biarch support that was added some time ago (-32 and -64).

Reply by email

Lukas Gradl
to Marco van de Voort
Show quoted text 12 lines
In our previous episode, Lukas Gradl said: > At the moment, I'm developing on a i386 Linux machine. For some servers > I need x86_64 binaries, so I have a second machine with x86_64 linux I > use just for compiling. > > It would be great to compile everything on one machine, so I tried to > build a crosscompiler for x86_64 on my i386 machine. The Wikipage on > http://wiki.lazarus.freepascal.org/Cross_compiling doesn't work anymore > - make is complaining about a missing ppcrossx86_64 almost immediatly. Please be more detailed. What command do you run in which directory, with what version as starting compiler?

I have (for simplifying I use X86_64 to compile i386 as described in the wiki):
fpc 2.3.1 built from svn running on a Kubuntu X86_64 machine (Source got via svn checkout http://svn.freepascal.org/svn/fpc/trunk fpc)

I want:
compiling i386 binaries on that machine

I did (according to http://wiki.lazarus.freepascal.org/Cross_compiling):

created i386-linux-ld and i386-linux-as as described in the Wiki

cd /path-to-fpc-source-root/

make all CPU_TARGET=i386

I get:
Makefile:129: *** Compiler ppcross386 not found.

What I could not find was, how to create that ppcross386. I remember it worked with a previous 2.2.0 install, but since I switched to 2.3.1 I couldn't get it to work.

regards
Lukas

-------------------------- software security networks Lukas Gradl <fpc#ssn.at> Eduard-Bodem-Gasse 9 A - 6020 Innsbruck Tel: +43-512-214040-0 Fax: +43-512-214040-21 --------------------------

Reply by email

Terry Kemp
to Lukas Gradl
Lukas Gradl wrote 40 lines
Marco van de Voort schrieb: > In our previous episode, Lukas Gradl said: >> At the moment, I'm developing on a i386 Linux machine. For some servers >> I need x86_64 binaries, so I have a second machine with x86_64 linux I >> use just for compiling. >> >> It would be great to compile everything on one machine, so I tried to >> build a crosscompiler for x86_64 on my i386 machine. The Wikipage on >> http://wiki.lazarus.freepascal.org/Cross_compiling doesn't work anymore >> - make is complaining about a missing ppcrossx86_64 almost immediatly. > > Please be more detailed. What command do you run in which directory, with > what version as starting compiler? I have (for simplifying I use X86_64 to compile i386 as described in the wiki): fpc 2.3.1 built from svn running on a Kubuntu X86_64 machine (Source got via svn checkout http://svn.freepascal.org/svn/fpc/trunk fpc) I want: compiling i386 binaries on that machine I did (according to http://wiki.lazarus.freepascal.org/Cross_compiling): created i386-linux-ld and i386-linux-as as described in the Wiki cd /path-to-fpc-source-root/ make all CPU_TARGET=i386 I get: Makefile:129: *** Compiler ppcross386 not found. What I could not find was, how to create that ppcross386. I remember it worked with a previous 2.2.0 install, but since I switched to 2.3.1 I couldn't get it to work. regards Lukas

For arm I needed to add FPC=fpc at end of command.

make all CPU_TARGET=i386 FPC=[path to fpc executable] (if not in path).

Seems it looks for the crosscompiler to exist first? because if it does you dont need this - but it will make a new one. go figure.

Terry

Reply by email

German Gentile
to Lukas Gradl: I have (for simplifying I use X86_64 to compile i386 as described in the wiki): fpc 2.3.1…

I have the same proble, ubuntu 64 and need to compiler for i386 and x86_64. Theres some tutorial or somebody doing that to give us a litle help?

Thanks

Donald shimoda

http://donaldshimoda.blogspot.com

2008/9/26 Lukas Gradl :

Show quoted text 56 lines
Marco van de Voort schrieb: > > In our previous episode, Lukas Gradl said: >> >> At the moment, I'm developing on a i386 Linux machine. For some servers I >> need x86_64 binaries, so I have a second machine with x86_64 linux I use >> just for compiling. >> >> It would be great to compile everything on one machine, so I tried to >> build a crosscompiler for x86_64 on my i386 machine. The Wikipage on >> http://wiki.lazarus.freepascal.org/Cross_compiling doesn't work anymore - >> make is complaining about a missing ppcrossx86_64 almost immediatly. > > Please be more detailed. What command do you run in which directory, with > what version as starting compiler? I have (for simplifying I use X86_64 to compile i386 as described in the wiki): fpc 2.3.1 built from svn running on a Kubuntu X86_64 machine (Source got via svn checkout http://svn.freepascal.org/svn/fpc/trunk fpc) I want: compiling i386 binaries on that machine I did (according to http://wiki.lazarus.freepascal.org/Cross_compiling): created i386-linux-ld and i386-linux-as as described in the Wiki cd /path-to-fpc-source-root/ make all CPU_TARGET=i386 I get: Makefile:129: *** Compiler ppcross386 not found. What I could not find was, how to create that ppcross386. I remember it worked with a previous 2.2.0 install, but since I switched to 2.3.1 I couldn't get it to work. regards Lukas -- -------------------------- software security networks Lukas Gradl <fpc#ssn.at> Eduard-Bodem-Gasse 9 A - 6020 Innsbruck Tel: +43-512-214040-0 Fax: +43-512-214040-21 -------------------------- _______________________________________________ fpc-devel maillist - http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply by email

Florian Klaempfl
to Lukas Gradl: I have (for simplifying I use X86_64 to compile i386 as described in the wiki): fpc 2.3.1…
Show quoted text 37 lines
Marco van de Voort schrieb: > In our previous episode, Lukas Gradl said: >> At the moment, I'm developing on a i386 Linux machine. For some >> servers I need x86_64 binaries, so I have a second machine with >> x86_64 linux I use just for compiling. >> >> It would be great to compile everything on one machine, so I tried to >> build a crosscompiler for x86_64 on my i386 machine. The Wikipage on >> http://wiki.lazarus.freepascal.org/Cross_compiling doesn't work >> anymore - make is complaining about a missing ppcrossx86_64 almost >> immediatly. > > Please be more detailed. What command do you run in which directory, with > what version as starting compiler? I have (for simplifying I use X86_64 to compile i386 as described in the wiki): fpc 2.3.1 built from svn running on a Kubuntu X86_64 machine (Source got via svn checkout http://svn.freepascal.org/svn/fpc/trunk fpc) I want: compiling i386 binaries on that machine I did (according to http://wiki.lazarus.freepascal.org/Cross_compiling): created i386-linux-ld and i386-linux-as as described in the Wiki cd /path-to-fpc-source-root/ make all CPU_TARGET=i386 I get: Makefile:129: *** Compiler ppcross386 not found. What I could not find was, how to create that ppcross386. I remember it worked with a previous 2.2.0 install, but since I switched to 2.3.1 I couldn't get it to work.
I'am working on a patch to fix this. For now do
make all CPU_TARGET=i386 FPC=fpc

Reply by email

Florian Klaempfl
to Florian Klaempfl
Show quoted text 6 lines
> What I could not find was, how to create that ppcross386. I remember > it worked with a previous 2.2.0 install, but since I switched to 2.3.1 > I couldn't get it to work. I'am working on a patch to fix this. For now do make all CPU_TARGET=i386 FPC=fpc

Should be fixed in rev. 11827

Reply by email

German Gentile
to Florian Klaempfl

Thanks a lot Florian.

I just wondering if theres any easy way to create cross compile deb packages. I mantain a i386 and x86_64 repositories with latest FPC and LAZARUS, using the scripts provided in lazarus/tools/install

Must be great if ew can configure a few more deb packages, allowing

LINUX HOST = i386 LINUX TARGET = x86_64 and viceversa. LINUX HOST = i386 WINDOWS TARGET = i386 and viceversa. WINDOS HOST = i386 LINUX TARGET = x86_64
LINUX HOST = x86_64 WINDOWS TARGET = i386

Any help on how to start with these scripts?

TIA

Donald Shimoda

http://donaldshimoda.blogspot.com

2008/9/27 Florian Klaempfl :

Show quoted text 14 lines
Florian Klaempfl schrieb: >> >> What I could not find was, how to create that ppcross386. I remember it >> worked with a previous 2.2.0 install, but since I switched to 2.3.1 I >> couldn't get it to work. > > I'am working on a patch to fix this. For now do > make all CPU_TARGET=i386 FPC=fpc Should be fixed in rev. 11827 _______________________________________________ fpc-devel maillist - http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply by email

German Gentile
to Florian Klaempfl: Should be fixed in rev. 11827

revision 11832

HOST = linux x86_64

want to build a cross compiler to make i386 binaries on linux

make all CPU_TARGET=i386 FPC=fpc

exit with error code:

fpcdefs.inc(136,2) Error: User defined: Cross-compiling from non-i386
to i386 is not yet supported at this time

Wich im doing wrong?

Best regards.

Donald.

2008/9/27 Florian Klaempfl :

Show quoted text 14 lines
Florian Klaempfl schrieb: >> >> What I could not find was, how to create that ppcross386. I remember it >> worked with a previous 2.2.0 install, but since I switched to 2.3.1 I >> couldn't get it to work. > > I'am working on a patch to fix this. For now do > make all CPU_TARGET=i386 FPC=fpc Should be fixed in rev. 11827 _______________________________________________ fpc-devel maillist - http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply by email

Jonas Maebe
to German Gentile
German Gentile wrote 14 lines
revision 11832 HOST = linux x86_64 want to build a cross compiler to make i386 binaries on linux make all CPU_TARGET=i386 FPC=fpc exit with error code: fpcdefs.inc(136,2) Error: User defined: Cross-compiling from non-i386 to i386 is not yet supported at this time Wich im doing wrong?

Trying to cross-compiling from a non-i386 platform to i386, as the error message says (although on some x86_64 platforms like Linux it may actually work if the check were relaxed, because they support the 80 bits extended type).

Jonas

Reply by email

German Gentile
to Jonas Maebe

Thanks for traduce the message for me ;)

I mind, is not supposed to be supported crosscompiling from x86_64 to i386?

If dont, how i can produce binaries for i386 and x86_64 from a x86_64 box?

TIA

Donald.

2008/9/28 Jonas Maebe :

Show quoted text 29 lines
On 28 Sep 2008, at 07:46, German Gentile wrote: > revision 11832 > > HOST = linux x86_64 > > want to build a cross compiler to make i386 binaries on linux > > make all CPU_TARGET=i386 FPC=fpc > > exit with error code: > > fpcdefs.inc(136,2) Error: User defined: Cross-compiling from non-i386 > to i386 is not yet supported at this time > > Wich im doing wrong? Trying to cross-compiling from a non-i386 platform to i386, as the error message says (although on some x86_64 platforms like Linux it may actually work if the check were relaxed, because they support the 80 bits extended type). Jonas _______________________________________________ fpc-devel maillist - http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply by email

Jonas Maebe
to German Gentile
German Gentile wrote
Thanks for traduce the message for me ;) I mind, is not supposed to be supported crosscompiling from x86_64 to i386?

1) we do not support the 80 bit extended floating point type on platforms that do not support it natively
2) support for this type is required to (cross-)compile to i386
3) this type is not supported on all x86-64 platforms

If dont, how i can produce binaries for i386 and x86_64 from a x86_64 box?

Using an i386->i386 and an i386->X86_64 compiler.

Jonas

Reply by email

Lukas Gradl
to Florian Klaempfl: I'am working on a patch to fix this. For now do make all CPU_TARGET=i386 FPC=fpc
Show quoted text 7 lines
I'am working on a patch to fix this. For now do make all CPU_TARGET=i386 FPC=fpc _______________________________________________ fpc-devel maillist - http://lists.freepascal.org/mailman/listinfo/fpc-devel

Thanks for the help!

I'll try that immediatly with the current install and with your fix later on....

regards
Lukas

-------------------------- software security networks Lukas Gradl <fpc#ssn.at> Eduard-Bodem-Gasse 9 A - 6020 Innsbruck Tel: +43-512-214040-0 Fax: +43-512-214040-21 --------------------------

Reply by email

German Gentile
to Jonas Maebe: 1) we do not support the 80 bit extended floating point type on platforms that do not…

2008/9/28 Jonas Maebe :

> If dont, how i can produce binaries for i386 and x86_64 from a x86_64 box? Using an i386->i386 and an i386->X86_64 compiler.

Then i must install in my x86_64 linux system a lazarus ide x86 + fpc compiler x86?

One time i have working on my x86_64 system the i386 compiler, how to produce a crosscompiler allowing produce binary for i386 and x86_64 binaries?

Thanks a lot for your wonderfoul support.

Donald Shimoda

Reply by email

Jonas Maebe
to German Gentile
German Gentile wrote 8 lines
2008/9/28 Jonas Maebe : >> If dont, how i can produce binaries for i386 and x86_64 from a >> x86_64 box? > > Using an i386->i386 and an i386->X86_64 compiler. Then i must install in my x86_64 linux system a lazarus ide x86 + fpc compiler x86?

An fpc i386 compiler should be enough.

One time i have working on my x86_64 system the i386 compiler, how to produce a crosscompiler allowing produce binary for i386 and x86_64 binaries?

You have to create two separate compilers: one to create i386 binaries and one to create x86_64. In this case you don't even need any cross compilers, actually: you can simply use an i386->i386 and an x86_64-

x86_64 compiler.

See the previous messages in this thread for how to compile FPC for a particular target platform.

Jonas

Reply by email