Sign in Join

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

Mailing lists / fpc-pascal / 2015-12

Target Win32 missing

9 messages · 4 people · –

Reply by email Subscribe to this list Your subscription

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

Lukas Gradl

Hello!

Sorry to disturb anyone... Perhaps I just need a little bit more sleep, but I cant find a solution to my problem...

When calling fpc from linux command line -Twin32 is missing. -TWin64 works as expected.

Where did -Twin32 go?

I'm using Debian jessie x86_64 as main OS.

I compile fpc from the latest trunk sources with a script I wrote once. Basically it does (among a few other things and platforms):

make all FPC=/usr/lib/fpc/2.6.4/ppcx64
sudo make install PREFIX=/usr FPC=/usr/lib/fpc/2.6.4/ppcx64 make clean
make crossall CPU_TARGET=i386 OS_TARGET=win32
sudo make crossinstall CPU_TARGET=i386 OS_TARGET=win32 PREFIX=/usrmake clean make clean
make crossall OS_TARGET=win64
sudo make crossinstall OS_TARGET=win64 PREFIX=/usr

When calling fpc it shows under section -T
-T<x> Target operating system:
-Tdarwin Darwin/Mac OS X
-Tfreebsd FreeBSD
-Tiphonesim iPhoneSimulator
-Tlinux Linux
-Tnetbsd NetBSD
-Topenbsd OpenBSD
-Tsolaris Solaris
-Twin64 Win64 (64 bit Windows systems)

but no win32. And trying to compile results in "Error: Illegal parameter: -Twin32".

Any hint what I'm doing wrong?

regards
Lukas

Reply by email

Karoly Balogh (Charlie/SGR
to Lukas Gradl

Hi

Lukas Gradl wrote
When calling fpc from linux command line -Twin32 is missing. -TWin64 works as expected. Where did -Twin32 go?

Nowhere. Seems you are using a 64bit targeted compiler, which can only output x86_64 code, so Win64 only. You need an i386 compiler or crosscompiler, to produce Win32 (therefore x86/i386) code.

There was no single compiler binary ever, which could do Win32 and Win64 in one.

Yes, indeed, have a sleep. :)

Charlie

Reply by email

Tomas Hajny
to Lukas Gradl: Hello! Sorry to disturb anyone... Perhaps I just need a little bit more sleep, but I cant…

On Mon, December 7, 2015 00:04, Lukas Gradl wrote:

Hello,

.
.

Show quoted text 36 lines
When calling fpc from linux command line -Twin32 is missing. -TWin64 works as expected. Where did -Twin32 go? I'm using Debian jessie x86_64 as main OS. I compile fpc from the latest trunk sources with a script I wrote once. Basically it does (among a few other things and platforms): make all FPC=/usr/lib/fpc/2.6.4/ppcx64 sudo make install PREFIX=/usr FPC=/usr/lib/fpc/2.6.4/ppcx64 make clean make crossall CPU_TARGET=i386 OS_TARGET=win32 sudo make crossinstall CPU_TARGET=i386 OS_TARGET=win32 PREFIX=/usrmake clean make clean make crossall OS_TARGET=win64 sudo make crossinstall OS_TARGET=win64 PREFIX=/usr When calling fpc it shows under section -T -T<x> Target operating system: -Tdarwin Darwin/Mac OS X -Tfreebsd FreeBSD -Tiphonesim iPhoneSimulator -Tlinux Linux -Tnetbsd NetBSD -Topenbsd OpenBSD -Tsolaris Solaris -Twin64 Win64 (64 bit Windows systems) but no win32. And trying to compile results in "Error: Illegal parameter: -Twin32". Any hint what I'm doing wrong?

.
.

What does '`fpc -Pi386 -PB`' do (the outer quotes should be removed before copying it to the command line, the inner quotes are there on purpose)?

You need to tell fpc to call compiler for the respective CPU using the -Pi386 (if it is installed correctly). Then you would see all the targets supported for i386 listed under -T<x>.

Tomas

Reply by email

Lukas Gradl
to Tomas Hajny
What does '`fpc -Pi386 -PB`' do (the outer quotes should be removed before copying it to the command line, the inner quotes are there on purpose)?

it says:
/usr/bin/ppcross386

When I call that directly I get win32 under the -T section But not when calling through fpc.

You need to tell fpc to call compiler for the respective CPU using the -Pi386 (if it is installed correctly). Then you would see all the targets supported for i386 listed under -T<x>.

And how do I tell this to fpc? In the fpc.cfg?
I didn't touch win32 for some time - but it had been working. And I can't remember what I might have changed so it stopped working....

Thanks for the help

Lukas

Reply by email

Lukas Gradl
to Karoly Balogh (Charlie/SGR: Hi Nowhere. Seems you are using a 64bit targeted compiler, which can only output x86_64…

Zitat von "Karoly Balogh (Charlie/SGR)" :

Show quoted text 16 lines
Hi On Sun, 6 Dec 2015, Lukas Gradl wrote: > When calling fpc from linux command line -Twin32 is missing. > -TWin64 works as > expected. Where did -Twin32 go? Nowhere. Seems you are using a 64bit targeted compiler, which can only output x86_64 code, so Win64 only. You need an i386 compiler or crosscompiler, to produce Win32 (therefore x86/i386) code. There was no single compiler binary ever, which could do Win32 and Win64 in one. Yes, indeed, have a sleep. :)

but there was fpc as a wrapper for a long time calling the right compiler. I have ppcrossi386 and other crosscompilers in my path - as I had for a long time. (see my answer to Tomas answer btw...)

When calling ppcrossi386 directly the win32 Target ist there - but not when calling through the fpc wrapper....

Thanks for the help
Lukas

---------------------------- software security networks Lukas Gradl Eduard-Bodem-Gasse 6 A - 6020 Innsbruck Tel: +43-512-214040-0 Fax: +43-512-214040-21 ----------------------------

Reply by email

Tomas Hajny
to Lukas Gradl: it says: /usr/bin/ppcross386 When I call that directly I get win32 under the -T section…
Lukas Gradl wrote 19 lines
> > What does '`fpc -Pi386 -PB`' do (the outer quotes should be removed > before > copying it to the command line, the inner quotes are there on purpose)? it says: /usr/bin/ppcross386 When I call that directly I get win32 under the -T section But not when calling through fpc. > You need to tell fpc to call compiler for the respective CPU using the > -Pi386 (if it is installed correctly). Then you would see all the > targets > supported for i386 listed under -T<x>. And how do I tell this to fpc? In the fpc.cfg? I didn't touch win32 for some time - but it had been working. And I can't remember what I might have changed so it stopped working....

Quoting from my previous e-mail above: 'You need to tell fpc to call compiler for the respective CPU using the -Pi386'. I.e. add '-Pi386' to the command line options of 'fpc' (together with '-Twin32' and whatever else you'd need there) and it should work.

Adding the -Pi386 parameter to fpc.cfg would not work (it's ignored there); changing the default CPU to something different than the host CPU doesn't make much sense (it would be more reasonable to install the 32-bit compiler instead of the 64-bit compiler if you wanted to have i386 as the default CPU target).

Hope this helps

Tomas

Reply by email

Lukas Gradl
to Tomas Hajny
Show quoted text 11 lines
Quoting from my previous e-mail above: 'You need to tell fpc to call compiler for the respective CPU using the -Pi386'. I.e. add '-Pi386' to the command line options of 'fpc' (together with '-Twin32' and whatever else you'd need there) and it should work. Adding the -Pi386 parameter to fpc.cfg would not work (it's ignored there); changing the default CPU to something different than the host CPU doesn't make much sense (it would be more reasonable to install the 32-bit compiler instead of the 64-bit compiler if you wanted to have i386 as the default CPU target).

you mean calling through fpc -Twin32 -Pi386 ?

I tried that - got the "Error: Illegal parameter: -Twin32" again...

I'll do a make distclean;make all now for the whole thing... perhaps that will help.

And while the machine is working I'll get some sleep...

Thanks for your patient help,

Lukas

Reply by email

leledumbo
to Lukas Gradl
you mean calling through fpc -Twin32 -Pi386 ? I tried that - got the "Error: Illegal parameter: -Twin32" again...

Works fine here. Can you ensure that fpc, ppcx64 and ppcross386 (the latter two are symlinks) are in the same /usr/bin? fpc driver will process -P parameter to decide which ppc to call, the other parameters will be straightly passed to the called ppc.

Here's one from mine:
$ fpc -Pi386 -i
Free Pascal Compiler version 3.1.1

Compiler date : 2015/11/30
Compiler CPU target: i386

Supported targets (targets marked with '{*}' are under development): Go32v2: GO32 V2 DOS extender
Linux: Linux for i386
OS2: OS/2
Win32: Win32 for i386
FreeBSD: FreeBSD/ELF for i386
solaris: Solaris for i386 {*}
Beos: Beos for i386 {*}
NetBSD: NetBSD for i386 {*}
Netware: Netware for i386(clib)
WDOSX: WDOSX DOS extender
OpenBSD: OpenBSD for i386 {*}
EMX: OS/2 via EMX
WATCOM: Watcom compatible DOS extenders
Netwlibc: Netware for i386(libc)
WinCE: WinCE for i386
Darwin: Darwin for i386
embedded: Embedded
Symbian: Symbian OS for i386
Haiku: Haiku for i386 {*}
NativeNT: Native NT for i386 {*}
iPhoneSim: Darwin/iPhoneSim for i386
Android: Android for i386
AROS: AROS for i386

$ fpc -Px86_64 -i
Free Pascal Compiler version 3.1.1

Compiler date : 2015/11/30
Compiler CPU target: x86_64

Supported targets (targets marked with '{*}' are under development): Linux: Linux for x86-64
FreeBSD: FreeBSD for x86-64
Win64: Win64 for x64
Darwin: Darwin for x86_64
solaris: Solaris for x86-64 {*}
OpenBSD: OpenBSD for x86-64 {*}
NetBSD: NetBSD for x86-64 {*}
AROS: AROS for x86_64
DragonFly: DragonFly for x86-64
iPhoneSim: Darwin/iPhoneSim for x86_64

View this message in context: http://free-pascal-general.1045716.n5.nabble.com/Target-Win32-missing-tp5723272p5723279.html Sent from the Free Pascal - General mailing list .

Reply by email

Tomas Hajny
to Lukas Gradl: you mean calling through fpc -Twin32 -Pi386 ? I tried that - got the "Error: Illegal…

On Mon, December 7, 2015 01:31, Lukas Gradl wrote: .
.

you mean calling through fpc -Twin32 -Pi386 ? I tried that - got the "Error: Illegal parameter: -Twin32" again...

.
.

Yes, that's what I meant. Could you please check the timestamp of the fpc binary on your path to make sure that it isn't some very old version (it might be possible that some really old version required the -P parameter at the beginning or something like that)? Also, could you please run 'fpc -Pi386 -it' (it should list the supported targets for i386)?

Thanks

Tomas

Reply by email