[fpc-devel]Compiling 1.1 branch on Win32

Roderick van Domburg gog at gamepoint.net
Sun Jan 28 00:06:08 CET 2001


As you may have seen in a couple of my earlier posts, I've been having
trouble getting the 1.1 to compile on Win32 platforms for ever since I can
remember. Usually not too much of a problem since I mainly target Linux or
FreeBSD, but after some research I think I've finally gotten to the core of
the problem:

The `make` included in the build package.

So what's wrong with it? Well, in short, the included GNU Make 3.76.1 fails
to compile the 1.1 branch on every Windows NT (and that includes 2000)
system that I have tried, and that would be two Windows NT 4.0 SP6a, and two
Windows 2000 SP1 systems.

It does, however, compile just fine on every Windows 98 system I've tried,
and again those were two boxes, one running Windows 98 Gold, the other
Windows 98 Second Edition. Reason for me to believe that something's up with
`make` and the NT environments.

WinNT4 seems to compile okay but would randomly crash `make` and have it
dump a traceback, with the registers and all. Since I don't know of any way,
if there is one, to have compilation continue at where it left off without
cleaning everything much like is possible with the FreeBSD world, I have
never gotten through any single `make all` run on a Win32 platform without
having `make` crash. Often, the crash is accompanied with a message "No more
DOS memory" but it's not clear if it's `make` printing that, or `cmd` (the
command line interpreter) itself. I'm not sure if there's a possibility to
assign a larger memory pool to DOS applications as with Windows 9x, if there
is then it's probably a dusty registry entry somewhere.

You can say anything about Win2K you want, but at least it's consistent. No
matter what build target you give it, it will always come to a halt while
cleaning
the compiler directory. Issuing a `make clean`:

C:\fpc-1.1>make clean
c:/pp/bin/win32/make.exe -C compiler distclean
make.exe[1]: Entering directory `c:/fpc-1.1/compiler'
rm -f fpc.exe ppc386.exe ppcaxp.exe ppc68k.exe ppcppc.exe
rm -f fpcmade.w32 ppas.bat link.res  log
rm -f *.ow *.ppw *.rst *.sw *.aw *.dll *.ppl
rm -rf *.slw

C:\fpc-1.1>

or a `make all`:

C:\fpc-1.1>make all
c:/pp/bin/win32/make.exe compiler_cycle
make.exe[1]: Entering directory `c:/fpc-1.1'
c:/pp/bin/win32/make.exe -C compiler cycle
make.exe[2]: Entering directory `c:/fpc-1.1/compiler'
c:/pp/bin/win32/make.exe clean
make.exe[3]: Entering directory `c:/fpc-1.1/compiler'
rm -f fpc.exe ppc386.exe ppcaxp.exe ppc68k.exe ppcppc.exe
rm -f fpcmade.w32 ppas.bat link.res  log
rm -f *.ow *.ppw *.rst *.sw *.aw *.dll *.ppl
rm -rf *.slw

`make win32`:

C:\fpc-1.1>make win32
c:/pp/bin/win32/make.exe install OS_TARGET=win32
make.exe[1]: Entering directory `c:/fpc-1.1'
c:/pp/bin/win32/make.exe compiler_cycle
make.exe[2]: Entering directory `c:/fpc-1.1'
c:/pp/bin/win32/make.exe -C compiler cycle
make.exe[3]: Entering directory `c:/fpc-1.1/compiler'
c:/pp/bin/win32/make.exe clean
make.exe[4]: Entering directory `c:/fpc-1.1/compiler'
rm -f fpc.exe ppc386.exe ppcaxp.exe ppc68k.exe ppcppc.exe
rm -f fpcmade.w32 ppas.bat link.res  log
rm -f *.ow *.ppw *.rst *.sw *.aw *.dll *.ppl
rm -rf *.slw

C:\fpc-1.1>

I think I've made my point. :-)

I've tried compiling in a Cygwin environment (http://www.cygwin.com). For
those of you that have never heard of that, Cygwin Solutions themselves
describe it as "The Cygwin tools are ports of the popular GNU development
tools and utilities for Windows 95, 98, and NT. They function by using the
Cygwin library which provides a UNIX-like API on top of the Win32 API."

It's a free set of utilities that builds an entire Linux-esque environment.
In fact, the only start menu entry it creates is a shortcut to the Bash
shell, leaving you in your own home directory under a UNIX directory tree
(/bin, /etc, /usr, and so on).

It comes with a GNU Make 3.79.1 port. Compiling it using that seems to offer
more success at first but then at some point, and I have no clue as to
where, it fails to rename a temporary compiler to ./compiler/ppc386.exe and
it fails, erring that "./compiler/ppc386.exe cannot be found."

I thought that maybe this had to do with the Bash shell and all, so I
replaced FPC's GNU Make 3.76.1 with the more recent Cygwin GNU Make 3.79.1
one. Trying to give that a try, `make` halted because it was unable to
locate `as`. That is when I found out about the `asr` and `asw`,
respectively `as` and `aw` in any normal Linux environment. The comparison
also went for utilities like `ginstall`, `gecho` and `gdate`.

Pretty much copying the entire Cygwin '/bin' directory to that of FPC 1.0.4,
thus replacing all of the included default utilities, delivered the same
results as building under a full Cygwin Bash shell.

So that led me to believe that the included GNU Make 3.76.1 may, in fact, be
a customized version built by the FPC team. Anyway, I don't know about that,
but the fact is that both FPC 1.1 and 1.0.5 have never successfully compiled
on any of my NT systems, I don't know about the rest of you out there?

I'd really appreciate it if the FPC team could take a serious look at this
and maybe make the Makefiles compatible with the more current build
environments or release updates versions of their build utilities that do
work correctly on NT platforms. I love FPC, but the entire Win32 story
really bothers me. So I really do hope that you can spread your FPC magic on
me, and help me out on this one. :-)






More information about the fpc-devel mailing list