Re: [fpc-pascal] 64 bit cross binutils on a 32 bit OS

2013-04-11 Thread Marcos Douglas
On Thu, Apr 11, 2013 at 12:53 PM, Pierre Free Pascal
 wrote:
>
> > On Windows, using FPC 2.7.1, I use:
> >  make crossinstall OS_TARGET=win64 CPU_TARGET=x86_64
> >
> > But this not works. I always got the error:
> > 
> > W:/md/dev/freepascal/compiler/2.7.1/compiler/ppc.exe fpmake.pp  -
> > FuW:/md/dev/fre
> > epascal/compiler/2.7.1/packages/fpmkunit/units_bs/i386-win32 -
> > FuW:/md/dev/freepa
> > scal/compiler/2.7.1/rtl/units/i386-win32
> > Fatal: Can't find unit process used by fpmkunit
> > Fatal: Compilation aborted
> > make[3]: *** [fpmake] Error 1
> > make[3]: Leaving directory `W:/md/dev/freepascal/compiler/2.7.1/packages'
> > make[2]: *** [packages_all] Error 2
> > make[2]: Leaving directory `W:/md/dev/freepascal/compiler/2.7.1'
> > make[1]: *** [build-stamp.x86_64-win64] Error 2
> > make[1]: Leaving directory `W:/md/dev/freepascal/compiler/2.7.1'
> > make: *** [crossinstall] Error 2
> > 
>
> Starting with fpc-2.6.2 release,
> this completes successfully for me:
> make distclean crossinstall OS_TARGET=win64 CPU_TARGET=x86_64 
> PREFIX=e:/pas/fpc-2.7.1
>
> Stating with a 2.7.1 win32 binary:
> E:\pas>fpc -iVDW
> 2.7.1 2013/03/28 2.7.1-r1:24029M
> (Meaning that I do have some local modifications, but I doubt those interfere 
> with your problem...)
> I get the same success...
>
> Did you use a distclean before the crossinstall?
> win32 fpmake.exe generated for native win32 target might be a problem...
> I checked, and indeed, if you just do a native install
> followed by a crossinstall without a distclean in between,
> you do get
> E:/pas/trunk/fpcsrc/compiler/ppc.exe src/fpmkunit.pp  
> -FuE:/pas/trunk/fpcsrc/rtl/units/i386-win32 -FuE:/pas/trunk/fpcsrc
> /packages/paszlib/units/i386-win32 
> -FuE:/pas/trunk/fpcsrc/packages/fcl-process/units/i386-win32 
> -FuE:/pas/trunk/fpcsrc/p
> ackages/hash/units/i386-win32 -FUunits_bs/i386-win32 -Fu../paszlib/src 
> -Fu../hash/src -Fi../paszlib/src  -Fi../fcl-proce
> ss/src/win -Fu../fcl-process/src -Fi../fcl-process/src/win32 
> -Fi../fcl-process/src/dummy
> make[4]: Leaving directory `E:/pas/trunk/fpcsrc/packages/fpmkunit'
> E:/pas/trunk/fpcsrc/compiler/ppc.exe fpmake.pp  
> -FuE:/pas/trunk/fpcsrc/packages/fpmkunit/units_bs/i386-win32 -FuE:/pas/t
> runk/fpcsrc/rtl/units/i386-win32
> Fatal: Can't find unit process used by fpmkunit
> Fatal: Compilation aborted
> make[3]: *** [fpmake] Error 1
>
>
> So the solution to your problem really is
> to run a 'distclean' make target before the 'crossinstall' target.

Thank you very much, worked!
I used "distclean" before, but I don't remember why I remove from my script.

Do you know if 'make clean' and 'make distclean' is the same?

Regards,
Marcos Douglas
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


RE: [fpc-pascal] 64 bit cross binutils on a 32 bit OS

2013-04-11 Thread Pierre Free Pascal
> On Windows, using FPC 2.7.1, I use:
>  make crossinstall OS_TARGET=win64 CPU_TARGET=x86_64
> 
> But this not works. I always got the error:
> 
> W:/md/dev/freepascal/compiler/2.7.1/compiler/ppc.exe fpmake.pp  -
> FuW:/md/dev/fre
> epascal/compiler/2.7.1/packages/fpmkunit/units_bs/i386-win32 -
> FuW:/md/dev/freepa
> scal/compiler/2.7.1/rtl/units/i386-win32
> Fatal: Can't find unit process used by fpmkunit
> Fatal: Compilation aborted
> make[3]: *** [fpmake] Error 1
> make[3]: Leaving directory `W:/md/dev/freepascal/compiler/2.7.1/packages'
> make[2]: *** [packages_all] Error 2
> make[2]: Leaving directory `W:/md/dev/freepascal/compiler/2.7.1'
> make[1]: *** [build-stamp.x86_64-win64] Error 2
> make[1]: Leaving directory `W:/md/dev/freepascal/compiler/2.7.1'
> make: *** [crossinstall] Error 2
> 

Starting with fpc-2.6.2 release, 
this completes successfully for me:
make distclean crossinstall OS_TARGET=win64 CPU_TARGET=x86_64 
PREFIX=e:/pas/fpc-2.7.1

Stating with a 2.7.1 win32 binary:
E:\pas>fpc -iVDW
2.7.1 2013/03/28 2.7.1-r1:24029M
(Meaning that I do have some local modifications, but I doubt those interfere 
with your problem...)
I get the same success...

Did you use a distclean before the crossinstall?
win32 fpmake.exe generated for native win32 target might be a problem...
I checked, and indeed, if you just do a native install
followed by a crossinstall without a distclean in between, 
you do get
E:/pas/trunk/fpcsrc/compiler/ppc.exe src/fpmkunit.pp  
-FuE:/pas/trunk/fpcsrc/rtl/units/i386-win32 -FuE:/pas/trunk/fpcsrc
/packages/paszlib/units/i386-win32 
-FuE:/pas/trunk/fpcsrc/packages/fcl-process/units/i386-win32 
-FuE:/pas/trunk/fpcsrc/p
ackages/hash/units/i386-win32 -FUunits_bs/i386-win32 -Fu../paszlib/src 
-Fu../hash/src -Fi../paszlib/src  -Fi../fcl-proce
ss/src/win -Fu../fcl-process/src -Fi../fcl-process/src/win32 
-Fi../fcl-process/src/dummy
make[4]: Leaving directory `E:/pas/trunk/fpcsrc/packages/fpmkunit'
E:/pas/trunk/fpcsrc/compiler/ppc.exe fpmake.pp  
-FuE:/pas/trunk/fpcsrc/packages/fpmkunit/units_bs/i386-win32 -FuE:/pas/t
runk/fpcsrc/rtl/units/i386-win32
Fatal: Can't find unit process used by fpmkunit
Fatal: Compilation aborted
make[3]: *** [fpmake] Error 1


So the solution to your problem really is
to run a 'distclean' make target before the 'crossinstall' target.

Pierre Muller

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] 64 bit cross binutils on a 32 bit OS

2013-04-11 Thread Marcos Douglas
On Thu, Apr 11, 2013 at 8:15 AM, Pierre Free Pascal
 wrote:
>
>
>
> > -Message d'origine-
> > De : fpc-pascal-boun...@lists.freepascal.org [mailto:fpc-pascal-
> > boun...@lists.freepascal.org] De la part de patspiper
> > Envoyé : jeudi 11 avril 2013 13:01
> > À : FPC-Pascal users discussions
> > Objet : Re: [fpc-pascal] 64 bit cross binutils on a 32 bit OS
> >
> > On 11/04/13 11:33, Sven Barth wrote:
> > > Am 11.04.2013 10:16, schrieb patspiper:
> > >> Hi,
> > >>
> > >> Is it possible to build cross binutils to produce win 64 bit files on
> > >> a 32 bit Linux OS (Ubuntu 32 bit)?
> > >>
> > >> If I set target=x86_64-cygwin, the error is:
> > >> 'BFD does not support target x86_64-pc-cygwin'
> > >>
> > > Why don't you install binutils-mingw-w64 package? [Note: I don't have
> > > Ubuntu, so I don't know whether it exists for your specific version of
> > > Ubuntu]
> > binutils-mingw-w64 package does not exist for Ubuntu 11.04 (my OS),
> > although it is available in Ubuntu 12.10.
> >
> > In any case, I have built myself cross binutils for i386/Win32 (cygwin
> > and mingw32), x86_64/Linux, arm/WinCE, and arm/Linux. As an exercise, I
> > would like to do the same for Win64.
>
> The i386-win32 to x86_64-win64 cross-tools give this information:
>
> E:\pas>x86_64-win64-as --version
> GNU assembler (GNU Binutils) 2.22
> Copyright 2011 Free Software Foundation, Inc.
> This program is free software; you may redistribute it under the terms of
> the GNU General Public License version 3 or later.
> This program has absolutely no warranty.
> This assembler was configured for a target of `x86_64-w64-mingw32'.
>
> So building Binutils with --target=x86_64-w64-mingw32
> should work for you.
>
> Pierre Muller

On Windows, using FPC 2.7.1, I use:
 make crossinstall OS_TARGET=win64 CPU_TARGET=x86_64

But this not works. I always got the error:

W:/md/dev/freepascal/compiler/2.7.1/compiler/ppc.exe fpmake.pp  -FuW:/md/dev/fre
epascal/compiler/2.7.1/packages/fpmkunit/units_bs/i386-win32 -FuW:/md/dev/freepa
scal/compiler/2.7.1/rtl/units/i386-win32
Fatal: Can't find unit process used by fpmkunit
Fatal: Compilation aborted
make[3]: *** [fpmake] Error 1
make[3]: Leaving directory `W:/md/dev/freepascal/compiler/2.7.1/packages'
make[2]: *** [packages_all] Error 2
make[2]: Leaving directory `W:/md/dev/freepascal/compiler/2.7.1'
make[1]: *** [build-stamp.x86_64-win64] Error 2
make[1]: Leaving directory `W:/md/dev/freepascal/compiler/2.7.1'
make: *** [crossinstall] Error 2


Using FPC 2.6.2 works perfectly.

Best regards,
Marcos Douglas
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] 64 bit cross binutils on a 32 bit OS

2013-04-11 Thread patspiper

On 11/04/13 14:48, Pierre Free Pascal wrote:

So building Binutils with --target=x86_64-w64-mingw32
should work for you.

It does indeed!

As for cygwin 64 bits, it seems that a patch for cygwin 64 support was
applied on 4.3.2013
(http://cygwin.cybermirror.org/64bit/x86_64-pc-cygwin-binutils-
20130304.patch),
but it seems it is still not included in binutils 2.23.2

   Anyhow, there is no cygwin target for Free Pascal,
neither win32 nor win64.

My Linux->Win32 cross compilation uses cygwin cross binutils.

i686-cygwin-as --version:
GNU assembler (GNU Binutils) 2.23.1
Copyright 2012 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or later.
This program has absolutely no warranty.
This assembler was configured for a target of `i686-cygwin'.

However, I have been recently plagued with a snag when creating cross 
compilers (from Ubuntu 32 bits):

i386-win32 / FPC 2.6.3: success
x86_64-win64 / FPC 2.6.3: success
x86_64-linux / FPC 2.6.3: fail
arm-winCE / FPC 2.6.3: success
arm-linux / FPC 2.6.3: fail

i386-win32 / FPC 2.7.1: fail
x86_64-win64 / FPC 2.7.1: fail
x86_64-linux / FPC 2.7.1: fail
arm-winCE / FPC 2.7.1: fail
arm-linux / FPC 2.7.1: fail

The failure message is always similar to:
.../fpc/crossbinutils/bin/x86_64-linux-ld: warning: ./link.res contains 
output sections; did you forget -T?

.../fpc/crossbinutils/bin/x86_64-linux-ld: cannot find -lgcc
.../fpc/crossbinutils/bin/x86_64-linux-ld: cannot find -lc
fpdoc.pp(382,1) Error: Error while linking

I am clueless at this stage.

Stephano

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


RE: [fpc-pascal] 64 bit cross binutils on a 32 bit OS

2013-04-11 Thread Pierre Free Pascal
> > So building Binutils with --target=x86_64-w64-mingw32
> > should work for you.
> It does indeed!
> 
> As for cygwin 64 bits, it seems that a patch for cygwin 64 support was
> applied on 4.3.2013
> (http://cygwin.cybermirror.org/64bit/x86_64-pc-cygwin-binutils-
> 20130304.patch),
> but it seems it is still not included in binutils 2.23.2

  Anyhow, there is no cygwin target for Free Pascal,
neither win32 nor win64.

  It wouldn't be impossible to create...
but someone would have to volunteer!


Pierre Muller 

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] 64 bit cross binutils on a 32 bit OS

2013-04-11 Thread patspiper

On 11/04/13 14:15, Pierre Free Pascal wrote:


binutils-mingw-w64 package does not exist for Ubuntu 11.04 (my OS),
although it is available in Ubuntu 12.10.

In any case, I have built myself cross binutils for i386/Win32 (cygwin
and mingw32), x86_64/Linux, arm/WinCE, and arm/Linux. As an exercise, I
would like to do the same for Win64.

The i386-win32 to x86_64-win64 cross-tools give this information:

E:\pas>x86_64-win64-as --version
GNU assembler (GNU Binutils) 2.22
Copyright 2011 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or later.
This program has absolutely no warranty.
This assembler was configured for a target of `x86_64-w64-mingw32'.

So building Binutils with --target=x86_64-w64-mingw32
should work for you.

It does indeed!

As for cygwin 64 bits, it seems that a patch for cygwin 64 support was 
applied on 4.3.2013 
(http://cygwin.cybermirror.org/64bit/x86_64-pc-cygwin-binutils-20130304.patch), 
but it seems it is still not included in binutils 2.23.2


Thanks!

Stephano
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


RE: [fpc-pascal] 64 bit cross binutils on a 32 bit OS

2013-04-11 Thread Pierre Free Pascal


> -Message d'origine-
> De : fpc-pascal-boun...@lists.freepascal.org [mailto:fpc-pascal-
> boun...@lists.freepascal.org] De la part de patspiper
> Envoyé : jeudi 11 avril 2013 13:01
> À : FPC-Pascal users discussions
> Objet : Re: [fpc-pascal] 64 bit cross binutils on a 32 bit OS
> 
> On 11/04/13 11:33, Sven Barth wrote:
> > Am 11.04.2013 10:16, schrieb patspiper:
> >> Hi,
> >>
> >> Is it possible to build cross binutils to produce win 64 bit files on
> >> a 32 bit Linux OS (Ubuntu 32 bit)?
> >>
> >> If I set target=x86_64-cygwin, the error is:
> >> 'BFD does not support target x86_64-pc-cygwin'
> >>
> > Why don't you install binutils-mingw-w64 package? [Note: I don't have
> > Ubuntu, so I don't know whether it exists for your specific version of
> > Ubuntu]
> binutils-mingw-w64 package does not exist for Ubuntu 11.04 (my OS),
> although it is available in Ubuntu 12.10.
> 
> In any case, I have built myself cross binutils for i386/Win32 (cygwin
> and mingw32), x86_64/Linux, arm/WinCE, and arm/Linux. As an exercise, I
> would like to do the same for Win64.

The i386-win32 to x86_64-win64 cross-tools give this information:

E:\pas>x86_64-win64-as --version
GNU assembler (GNU Binutils) 2.22
Copyright 2011 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or later.
This program has absolutely no warranty.
This assembler was configured for a target of `x86_64-w64-mingw32'.

So building Binutils with --target=x86_64-w64-mingw32
should work for you.

Pierre Muller

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] 64 bit cross binutils on a 32 bit OS

2013-04-11 Thread patspiper

On 11/04/13 11:33, Sven Barth wrote:

Am 11.04.2013 10:16, schrieb patspiper:

Hi,

Is it possible to build cross binutils to produce win 64 bit files on 
a 32 bit Linux OS (Ubuntu 32 bit)?


If I set target=x86_64-cygwin, the error is:
'BFD does not support target x86_64-pc-cygwin'

Why don't you install binutils-mingw-w64 package? [Note: I don't have 
Ubuntu, so I don't know whether it exists for your specific version of 
Ubuntu]
binutils-mingw-w64 package does not exist for Ubuntu 11.04 (my OS), 
although it is available in Ubuntu 12.10.


In any case, I have built myself cross binutils for i386/Win32 (cygwin 
and mingw32), x86_64/Linux, arm/WinCE, and arm/Linux. As an exercise, I 
would like to do the same for Win64.


Any tips?

Stephano
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] 64 bit cross binutils on a 32 bit OS

2013-04-11 Thread zeljko

On 04/11/2013 10:33 AM, Sven Barth wrote:

Am 11.04.2013 10:16, schrieb patspiper:

Hi,

Is it possible to build cross binutils to produce win 64 bit files on
a 32 bit Linux OS (Ubuntu 32 bit)?

If I set target=x86_64-cygwin, the error is:
'BFD does not support target x86_64-pc-cygwin'


Why don't you install binutils-mingw-w64 package? [Note: I don't have
Ubuntu, so I don't know whether it exists for your specific version of
Ubuntu]


New fedora's also have complete binutils for 32/64 bit.

zeljko

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] 64 bit cross binutils on a 32 bit OS

2013-04-11 Thread Sven Barth

Am 11.04.2013 10:16, schrieb patspiper:

Hi,

Is it possible to build cross binutils to produce win 64 bit files on 
a 32 bit Linux OS (Ubuntu 32 bit)?


If I set target=x86_64-cygwin, the error is:
'BFD does not support target x86_64-pc-cygwin'

Why don't you install binutils-mingw-w64 package? [Note: I don't have 
Ubuntu, so I don't know whether it exists for your specific version of 
Ubuntu]


Regards,
Sven
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


[fpc-pascal] 64 bit cross binutils on a 32 bit OS

2013-04-11 Thread patspiper

Hi,

Is it possible to build cross binutils to produce win 64 bit files on a 
32 bit Linux OS (Ubuntu 32 bit)?


If I set target=x86_64-cygwin, the error is:
'BFD does not support target x86_64-pc-cygwin'

Stephano
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal