[fpc-pascal] Wine + Unsupported ioctl
Karoly Balogh (Charlie/SGR)
charlie at scenergy.dfmk.hu
Sat Apr 4 22:42:17 CEST 2020
On Sat, 4 Apr 2020, Juha Manninen via fpc-pascal wrote:
> I installed FPC 3.2RC1 Win32 version under Wine in Linux Manjaro 64-bit.
> Wine version is a recent 5.5-1. Compiling a hello.lpr program works.
> Has anybody built Lazarus under Wine? Should I test with FPC 3.0.4? Is
> this somehow related to the new version? Or is it about 32 / 64 bits? I
> remember building Lazarus under Wine some years ago but then I installed
> from Lazarus installer and later created a symlink for trunk sources.
Sorry for my ignorance, but why do you add an extra emulation layer?
If you want a compiler under Linux, which can produce Win32 executables,
you can just use a normal Linux native ppc386 compiler. With FPC, the
compiler binaries are only target CPU specific but not target OS specific,
therefore all OSes for the given CPU target target are supported by all
compilers, regardless of which OS they run on.
So you can tell the Linux ppc386 to target Windows (-Twin32), then specify
the Win32 unit files via -Fu<path/to/your/win32/units/*> and you should
get a Windows exe as result, without going through Wine during the
compilation process. (Yes, the unit files between the Linux ppc386 and the
Windows ppc386.exe are compatible too.)
Of course, your 64bit Linux has to be prepared to run 32bit Linux
binaries, but as the Linux ppc386 doesn't even link against libc, this
should be pretty easy.
If you don't want to use FPC's internal linker or assembler for some
reason, I'm sure most Linux distros supply mingw cross-win32-binutils as
(Ps: of course you could compile an x64 hosted ppc386 as well, but that
would require your own crosscompiler builds, probably. What I described
can be achieved by just downg pre-baked FPC binaries, and cherry picking
what you need.)
More information about the fpc-pascal