How to crosscompile i386-linux from X86_64-win64

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

How to crosscompile i386-linux from X86_64-win64

ulrich
Hi,

what parameter(s) need to cross-compiling i386-Linux from X86_64-win64 ?

When I am trying to compile from "win32" with win32 compiler:

c:\Lazarus16\fpc\3.0.0\bin\x86_64-win64\make.exe CROSSCOMPILE=1
CPU_TARGET=i386 OS_TARGET=linux all
CROSSBINUTILS=c:\lazarus16\fpc\3.0.0\bin\i386-linux
BINUTILSPREFIX=i386-linux- CPU_SOURCE=i386 OS_SOURCE=win32
FPC=c:\lazarus16\fpc\3.0.0\bin\i386-win32\fpc.exe

the result is:

make[4]: Entering directory `C:/lazarus16/fpc/3.0.0/rtl'
c:/lazarus16/fpc/3.0.0/bin/x86_64-win64/make -C win32 all
make[5]: Entering directory `C:/lazarus16/fpc/3.0.0/rtl/win32'
c:/lazarus16/fpc/3.0.0/bin/i386-win32/fpc.exe -Ur -Xs -O2 -n -Fi../inc
-Fi../i386 -Fi../win -FE. -FUC:/lazarus16/fpc/3.0.0/rtl/units/i386-win32
-di386 -dRELEASE -Us -Sg system.pp -Fi../win
systemh.inc(138,16) Error: Duplicate identifier "FarPointer"
systemh.inc(138,29) Error: Identifier not found "NearFsPointer"
systemh.inc(138,29) Error: Error in type definition
systemh.inc(1059,75) Error: Type "FarPointer" is not completely defined
system.pp(107,34) Fatal: There were 4 errors compiling module, stopping
Fatal: Compilation aborted
Error: c:\lazarus16\fpc\3.0.0\bin\i386-win32\ppc386.exe returned an
error exitcode
make[5]: *** [system.ppu] Error 1
make[5]: Leaving directory `C:/lazarus16/fpc/3.0.0/rtl/win32'
make[4]: *** [win32_all] Error 2
make[4]: Leaving directory `C:/lazarus16/fpc/3.0.0/rtl'
make[3]: *** [rtl] Error 2
make[3]: Leaving directory `C:/lazarus16/fpc/3.0.0/compiler'
make[2]: *** [cycle] Error 2
make[2]: Leaving directory `C:/lazarus16/fpc/3.0.0/compiler'
make[1]: *** [compiler_cycle] Error 2
make[1]: Leaving directory `C:/lazarus16/fpc/3.0.0'
make: *** [build-stamp.i386-linux] Error 2

When I am trying to compile from "win64" with win64 compiler (X86_64):

c:\lazarus16\fpc\3.0.0\bin\x86_64-win64\make.exe CROSSCOMPILE=1
CPU_TARGET=i386 OS_TARGET=linux all
CROSSBINUTILS=c:\lazarus16\fpc\3.0.0\bin\i386-linux
BINUTILSPREFIX=i386-linux-

the result is:

C:/lazarus16/fpc/3.0.0/compiler/ppc.exe -Ur -Xs -O2 -n -Fui386
-Fusystems -FuC:/lazarus16/fpc/3.0.0/rtl/units/x86_64-win64 -Fii386 -FE.
-FUi386/units/x86_64-win64 -dRELEASE     -di386 -dGDB -dBROWSERLOG
-Fux86 -Sew pp.pas
fpcdefs.inc(259,2) Error: User defined: Cross-compiling from systems
without support for an 80 bit extended floating point type to i386 is
not yet supported at this time
fpcdefs.inc(259,2) Error: User defined: Cross-compiling from systems
without support for an 80 bit extended floating point type to i386 is
not yet supported at this time
fpcdefs.inc(259,2) Error: User defined: Cross-compiling from systems
without support for an 80 bit extended floating point type to i386 is
not yet supported at this time
fpcdefs.inc(259,2) Error: User defined: Cross-compiling from systems
without support for an 80 bit extended floating point type to i386 is
not yet supported at this time
constexp.pas(87,1) Fatal: There were 4 errors compiling module, stopping
Fatal: Compilation aborted
make[3]: *** [ppcross386.exe] Error 1
make[3]: Leaving directory `C:/lazarus16/fpc/3.0.0/compiler'
make[2]: *** [cycle] Error 2
make[2]: Leaving directory `C:/lazarus16/fpc/3.0.0/compiler'
make[1]: *** [compiler_cycle] Error 2
make[1]: Leaving directory `C:/lazarus16/fpc/3.0.0'
make: *** [build-stamp.i386-linux] Error 2


Thanks

Ulrich


_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: How to crosscompile i386-linux from X86_64-win64

Jonas Maebe-2
On 29/03/16 09:58, ulrich wrote:
> what parameter(s) need to cross-compiling i386-Linux from X86_64-win64 ?

It is not possible, because the needed 80 bits extended type is not
supported on Win64, and we don't have emulation for this type yet in the
compiler. You can follow http://bugs.freepascal.org/view.php?id=9262 if
you wish to be notified in case this ever gets implemented.


Jonas
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: How to crosscompile i386-linux from X86_64-win64

Sven Barth-2

Am 29.03.2016 10:30 schrieb "Jonas Maebe" <[hidden email]>:
>
> On 29/03/16 09:58, ulrich wrote:
>>
>> what parameter(s) need to cross-compiling i386-Linux from X86_64-win64 ?
>
>
> It is not possible, because the needed 80 bits extended type is not supported on Win64, and we don't have emulation for this type yet in the compiler. You can follow http://bugs.freepascal.org/view.php?id=9262 if you wish to be notified in case this ever gets implemented.
>

However on Windows there's no real penalty in using the i386-win32 release for this instead of the x86_64-win64 one.

Regards,
Sven


_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: How to crosscompile i386-linux from X86_64-win64

ulrich
Dne 29.3.2016 v 12:19 Sven Barth napsal(a):

> Am 29.03.2016 10:30 schrieb "Jonas Maebe"
> <[hidden email]
> <mailto:[hidden email]>>:
>  >
>  > On 29/03/16 09:58, ulrich wrote:
>  >>
>  >> what parameter(s) need to cross-compiling i386-Linux from X86_64-win64 ?
>  >
>  >
>  > It is not possible, because the needed 80 bits extended type is not
> supported on Win64, and we don't have emulation for this type yet in the
> compiler. You can follow http://bugs.freepascal.org/view.php?id=9262 if
> you wish to be notified in case this ever gets implemented.
>  >
>
> However on Windows there's no real penalty in using the i386-win32
> release for this instead of the x86_64-win64 one.

Thanks,

c:\lazarus16\fpc\3.0.0\bin\i386-win32\make.exe CROSSCOMPILE=1
CPU_TARGET=i386 OS_TARGET=linux all
CROSSBINUTILS=c:\lazarus16\fpc\3.0.0\bin\i386-linux
BINUTILSPREFIX=i386-linux-

I do not know what I'm doing wrong, but this is the result:

c:/lazarus16/fpc/3.0.0/bin/i386-win32/make -C C:/lazarus16/fpc/3.0.0/rtl
'OPT=  ' all
make[4]: Entering directory `C:/lazarus16/fpc/3.0.0/rtl'
c:/lazarus16/fpc/3.0.0/bin/i386-win32/make -C win32 all
make[5]: Entering directory `C:/lazarus16/fpc/3.0.0/rtl/win32'
c:/lazarus16/fpc/3.0.0/bin/i386-win32/ppc386.exe -Ur -Xs -O2 -n
-Fi../inc -Fi../i386 -Fi../win -FE.
-FUC:/lazarus16/fpc/3.0.0/rtl/units/i386-win32 -di386 -dRELEASE -Us -Sg
system.pp -Fi../win
systemh.inc(138,16) Error: Duplicate identifier "FarPointer"
systemh.inc(138,29) Error: Identifier not found "NearFsPointer"
systemh.inc(138,29) Error: Error in type definition
systemh.inc(1059,75) Error: Type "FarPointer" is not completely defined
system.pp(107,34) Fatal: There were 4 errors compiling module, stopping
Fatal: Compilation aborted
make[5]: *** [system.ppu] Error 1
make[5]: Leaving directory `C:/lazarus16/fpc/3.0.0/rtl/win32'
make[4]: *** [win32_all] Error 2
make[4]: Leaving directory `C:/lazarus16/fpc/3.0.0/rtl'
make[3]: *** [rtl] Error 2
make[3]: Leaving directory `C:/lazarus16/fpc/3.0.0/compiler'
make[2]: *** [cycle] Error 2
make[2]: Leaving directory `C:/lazarus16/fpc/3.0.0/compiler'
make[1]: *** [compiler_cycle] Error 2
make[1]: Leaving directory `C:/lazarus16/fpc/3.0.0'
make: *** [build-stamp.i386-linux] Error 2

Ulrich

>
> Regards,
> Sven
>
>
>
> _______________________________________________
> fpc-pascal maillist  -  [hidden email]
> http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
>


_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: How to crosscompile i386-linux from X86_64-win64

Sven Barth-2

Am 30.03.2016 10:39 schrieb "ulrich" <[hidden email]>:
>
> Dne 29.3.2016 v 12:19 Sven Barth napsal(a):
>>
>> Am 29.03.2016 10:30 schrieb "Jonas Maebe"
>> <[hidden email]
>> <mailto:[hidden email]>>:
>>
>>  >
>>  > On 29/03/16 09:58, ulrich wrote:
>>  >>
>>  >> what parameter(s) need to cross-compiling i386-Linux from X86_64-win64 ?
>>  >
>>  >
>>  > It is not possible, because the needed 80 bits extended type is not
>> supported on Win64, and we don't have emulation for this type yet in the
>> compiler. You can follow http://bugs.freepascal.org/view.php?id=9262 if
>> you wish to be notified in case this ever gets implemented.
>>  >
>>
>> However on Windows there's no real penalty in using the i386-win32
>> release for this instead of the x86_64-win64 one.
>
>
> Thanks,
>
> c:\lazarus16\fpc\3.0.0\bin\i386-win32\make.exe CROSSCOMPILE=1 CPU_TARGET=i386 OS_TARGET=linux all CROSSBINUTILS=c:\lazarus16\fpc\3.0.0\bin\i386-linux BINUTILSPREFIX=i386-linux-
>
> I do not know what I'm doing wrong, but this is the result:
>
> c:/lazarus16/fpc/3.0.0/bin/i386-win32/make -C C:/lazarus16/fpc/3.0.0/rtl 'OPT=  ' all

Is this really a full source of FPC and not just the one provided with Lazarus? Better download a source zip of FPC 3.0.0, extract that in a different directory and try there again to avoid any potential problems in that regard (as a test you can first do a simple "make all" to ensure that building a normal win32 system works).

Regards,
Sven


_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal