[Lazarus] cross-compiler win32:i386 can't compile

2013-12-07 Thread FreeMan

I have some problem and need some help,
My system is Kubuntu 13.10 x64. and last svn fpc and lazarus.
My plan is, my project work on win32, win64 mac os too. I need cross 
compiler.

I readed this link and try cross compiling.
http://wiki.freepascal.org/Cross_compiling_for_Win32_under_Linux

this cmd line for fpc this is with out error and fpc is compiled
make clean all install INSTALL_PREFIX=/opt/freepascal/2.7.1 
OS_TARGET=win32 CPU_TARGET=i386

su -c make crossinstall OS_TARGET=win32 CPU_TARGET=i386

but lazarus has probelem
this line is for IDE
make PREFIX=/opt clean all LCL_PLATFORM=qt bigide OPT=-dUSE_QT_45

this line is for win32
make clean all OS_TARGET=win32 CPU_TARGET=i386
error is :
make -C packager/registration
make[1]:`/opt/lazarus/packager/registration' Entering directory
/bin/rm -f ../units/i386-win32/fcllaz.ppu
/bin/fpc -Twin32 -Pi386 -XPi386-win32- -Xr -MObjFPC -Scghi -O1 -g -gl 
-vewnhi -l -Fu. -Fu/usr/local/lib/fpc/2.7.1/units/i386-win32/rtl -FE. 
-FU../units/i386-win32 -dUSE_QT_45 -di386  fcllaz.pas
Error: ppc386 can't be executed, error message: Failed to execute 
ppc386, error code: 127

make[1]: *** [fcllaz.ppu] error 1


same lineS for OS_TARGET=win64 CPU_TARGET=x86_64 fpc and lazarus is okey 
builded.
where is my problem? or what is easy and right way for cross platform 
compiling?

thank you


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] cross-compiler win32:i386 can't compile

2013-12-07 Thread leledumbo
You get the cross compiler, that's all you need. Lazarus does NOT need to be
cross compiled.



--
View this message in context: 
http://free-pascal-lazarus.989080.n3.nabble.com/Lazarus-cross-compiler-win32-i386-can-t-compile-tp4034702p4034703.html
Sent from the Free Pascal - Lazarus mailing list archive at Nabble.com.

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] cross-compiler win32:i386 can't compile

2013-12-07 Thread FreeMan

Thank you for answer
but somethings wrong, when try project option - compiler option - 
config  target - Target platform

-T Win32
-P i386
Target processor (Default or any other)
click to ok button, then this error popup

Compiler /bin/fpc does not support target i386-win32

Click build project, in message window


Error: ppc386 can't be executed, error message: Failed to execute 
ppc386, error code: 127



But OS_TARGET=win64 CPU_TARGET=x86_64 everythink is okey and I test my 
project in w8:x64 without any error
maybe my system need some i386 linux packet(s), but I couldn't find any 
info about this.




and another test, in console
program test;
begin
  writeln('DATE ',{$i %DATE%});
  writeln('FPCTARGET ',{$i %FPCTARGET%});
  writeln('FPCTARGETCPU ',{$i %FPCTARGETCPU%});
  writeln('FPCTARGETOS ',{$i %FPCTARGETOS%});
  writeln('FPCVERSION ',{$i %FPCVERSION%});
end.


/tmp$ fpc -Twin32 -Pi386 test.pas
Error: ppc386 can't be executed, error message: Failed to execute 
ppc386, error code: 127



/tmp$ fpc -Twin64 -Px86_64 test.pas
Free Pascal Compiler version 2.7.1 [2013/12/07] for x86_64
Copyright (c) 1993-2013 by Florian Klaempfl and others
Target OS: Win64 for x64
Compiling test.pas
Linking test.exe
8 lines compiled, 0.1 sec, 31440 bytes code, 1300 bytes data



07-12-2013 15:24 tarihinde, leledumbo yazdı:

You get the cross compiler, that's all you need. Lazarus does NOT need to be
cross compiled.



--
View this message in context: 
http://free-pascal-lazarus.989080.n3.nabble.com/Lazarus-cross-compiler-win32-i386-can-t-compile-tp4034702p4034703.html
Sent from the Free Pascal - Lazarus mailing list archive at Nabble.com.

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus



--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Cross compiler

2013-08-01 Thread Antonio Fortuny


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

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 ?


Regards,
Sven


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus






--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Cross compiler

2013-08-01 Thread 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

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.



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


Regards,
Sven

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus



--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Cross compiler

2013-08-01 Thread Sven Barth

Am 01.08.2013 09:01, schrieb Antonio Fortuny:


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.

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

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Cross compiler

2013-08-01 Thread 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 :)

Regards,
Sven
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Cross compiler

2013-08-01 Thread Sven Barth

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.


Regards,
Sven
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Cross compiler

2013-08-01 Thread Antonio Fortuny


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

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.


Regards,
Sven


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Cross compiler

2013-08-01 Thread Antonio Fortuny


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

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.


Regards,
Sven


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Cross compiler

2013-07-31 Thread Antonio Fortuny

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
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Cross compiler

2013-07-31 Thread Kostas Michalopoulos
On Mon, May 27, 2013 at 7:27 PM, Sven Barth pascaldra...@googlemail.comwrote:

 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).
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Cross compiler

2013-07-31 Thread Sven Barth

On 31.07.2013 16:57, Kostas Michalopoulos wrote:

On Mon, May 27, 2013 at 7:27 PM, Sven Barth pascaldra...@googlemail.com
mailto:pascaldra...@googlemail.com 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

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Cross compiler

2013-07-31 Thread Sven Barth

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).


Regards,
Sven


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Cross compiler

2013-06-12 Thread Antonio Fortuny


Le 27/05/2013 19:28, Sven Barth a écrit :
Am 27.05.2013 14:51 schrieb Antonio Fortuny 
a.fort...@sitasoftware.lu:
 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 ???


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 ?


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
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus






--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Cross compiler

2013-06-12 Thread Sven Barth

Am 12.06.2013 15:22, schrieb Antonio Fortuny:


Le 27/05/2013 19:28, Sven Barth a écrit :
Am 27.05.2013 14:51 schrieb Antonio Fortuny 
a.fort...@sitasoftware.lu:
 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.




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

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


[Lazarus] Cross compiler

2013-05-27 Thread 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.
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Cross compiler

2013-05-27 Thread Reinier Olislagers
On 27-5-2013 11:18, Antonio Fortuny wrote:
 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


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Cross compiler

2013-05-27 Thread Joost van der Sluis
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'

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

Joost


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Cross compiler

2013-05-27 Thread Antonio Fortuny


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 ?


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


Joost


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus






--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Cross compiler

2013-05-27 Thread Mattias Gaertner

 Joost van der Sluis jo...@cnoc.nl hat am 27. Mai 2013 um 11:47 geschrieben:
[...]
 But it could be that you'll encounter problems with the 10-bit floating
 point support.

10-bit FP?

Mattias

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Cross compiler

2013-05-27 Thread Joost van der Sluis
On Mon, 2013-05-27 at 12:01 +0200, Antonio Fortuny wrote:
 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.


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Cross compiler

2013-05-27 Thread Joost van der Sluis
On Mon, 2013-05-27 at 12:05 +0200, Mattias Gaertner wrote:
  Joost van der Sluis jo...@cnoc.nl hat am 27. Mai 2013 um 11:47 
  geschrieben:
 [...]
  But it could be that you'll encounter problems with the 10-bit floating
  point support.
 
 10-bit FP?

Byte (Extended)

Joost.



--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Cross compiler

2013-05-27 Thread Antonio Fortuny
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.



--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Cross compiler

2013-05-27 Thread patspiper

On 27/05/13 12:18, Antonio Fortuny wrote:

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.

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
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Cross compiler

2013-05-27 Thread Paul Breneman

Antonio Fortuny wrote:
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

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Cross compiler

2013-05-27 Thread Sven Barth

Am 27.05.2013 12:02 schrieb Antonio Fortuny a.fort...@sitasoftware.lu:
 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


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Cross compiler

2013-05-27 Thread Sven Barth

Am 27.05.2013 14:51 schrieb Antonio Fortuny a.fort...@sitasoftware.lu:
 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

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


[Lazarus] Cross-compiler installation

2013-02-22 Thread silvioprog
Hello,

What is cross-compiler installation mentioned in this article?:

http://wiki.freepascal.org/Android

And where do I download it?

Thank you!

-- 
Silvio Clécio
My public projects - github.com/silvioprog
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Cross-compiler installation

2013-02-22 Thread Sven Barth

On 22.02.2013 13:24, silvioprog wrote:

Hello,

What is cross-compiler installation mentioned in this article?:

http://wiki.freepascal.org/Android

And where do I download it?


I don't see a cross-compiler installation mentioned on that side.

Nevertheless the arm-android or i386-android cross compiler needs to be 
build from source which is described in that article. For further 
questions please ask them on the fpc-pascal list.


Regards,
Sven


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Cross-compiler installation

2013-02-22 Thread silvioprog
2013/2/22 Sven Barth pascaldra...@googlemail.com

 On 22.02.2013 13:24, silvioprog wrote:

 Hello,

 What is cross-compiler installation mentioned in this article?:

 http://wiki.freepascal.org/**Android http://wiki.freepascal.org/Android

 And where do I download it?


 I don't see a cross-compiler installation mentioned on that side.


See:

http://imagebin.org/247728


 Nevertheless the arm-android or i386-android cross compiler needs to be
 build from source which is described in that article. For further questions
 please ask them on the fpc-pascal list.

 Regards,
 Sven


Thank you, I'll do it. ;)

-- 
Silvio Clécio
My public projects - github.com/silvioprog
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Cross-compiler installation

2013-02-22 Thread Sven Barth

On 22.02.2013 14:51, silvioprog wrote:

2013/2/22 Sven Barth pascaldra...@googlemail.com
mailto:pascaldra...@googlemail.com

On 22.02.2013 13:24, silvioprog wrote:

Hello,

What is cross-compiler installation mentioned in this article?:

http://wiki.freepascal.org/__Android
http://wiki.freepascal.org/Android

And where do I download it?


I don't see a cross-compiler installation mentioned on that side.


See:

http://imagebin.org/247728


Ah! I wonder why Ctrl+F didn't help me there... this is the path where 
you want to install the newly created compiler (e.g. the dir you provide 
to INSTALL_PREFIX).


Regards,
Sven


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Cross-compiler installation

2013-02-22 Thread Michael Schnell

On 02/22/2013 01:24 PM, silvioprog wrote:

Hello,

What is cross-compiler installation mentioned in this article?:


Regarding Android on ARM, I understand that there are two ways you can 
go: (1) have the compiler creates ARM native code or (2) have the 
compiler create java byte code. When compiling on a PC both are cross 
compiling.


-Michael

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus