My fixes (?) for building Abiword on MSYS/gcc

From: Steve D. Perkins <lists_at_steveperkins.net>
Date: Mon Jul 25 2005 - 18:00:02 CEST

Hey everybody -

    I started using Abiword a week or so ago, and have opened up a
couple of Bugzilla items for issues I've found. Going through the
Bugzilla repository it looks like there's already 2,000 or so
outstanding items backlogged, so I thought I might just build from
source myself and see if my issues are something I could fix myself to
help out.

    I was able to build Abiword on my Windows 2000 workstation using GCC
and the MSYS shell, although I did have to patch a few makefiles. This
puzzled me, because I've read other reports in the mailing list archive
that give me the impression that other people are building the source
out-of-the-box using MSYS without needing to patch anything. I don't
know if it could have anything to do with the fact that I use Mohan
Embar's (http://www.thisiscool.com/gcc_mingw.htm) build of GCC 3.4 with
Java compiler rather than the standard MinGW team's build. Still, the
particular issues I saw didn't look like anything that this would cause.

    Here are the steps I had to do in order to build Abiword 2.3.4 from
the tarball:

1) First of all, the master Makefile acts as if it wants to build
"libpng" and "zlib" from the directories in the same base as "abi", but
fails to do so. I think it's expecting to find "Makefile" in the
"libpng" directory, but the makefile there is named "Makefile.abi"
instead. I had to start the build process by running "make -f
Makefile.abi" in the "libpng" directory, then run "make" in the "zlib"
directory, and THEN run the make build from "abi".

2) In the file "\abi\src\af\gr\win\Makefile", I had to add
"-I$(ABI_XX_ROOT)/../zlib" to the INCLUDES assignment, or the build
would fail with an error about being unable to find "zlib.h".

3) Similar thing in "\abi\src\af\util\xp\Makefile". It seems that the
include was once there, but somebody commented it out. I simply
uncommented line 100.

4) More missing-zlib troubles with "\abi\src\wp\impexp\xp\Makefile". I
added the line "INCLUDES+= -I$(ABI_ROOT)/../zlib" near the end.

5) In "\abi\src\config\platforms\mingw32.mk", the name given to expect
for the zlib library doesn't match the name that's generated when you
built it. I commented out these two lines:

#ABI_ZLIB_LIB = -lzdll
#ABI_LIBS += zdll

    ... and replaced them with these two...

ABI_ZLIB_LIB = -lAbi_zlib
ABI_LIBS += Abi_zlib

    With these changes in place, Abiword 2.3.4 builds without a hitch.

    Step 1 could be "fixed" with just a little additional documentation
in the readme, although it seems like it really wouldn't take much
effort at all to fully integrate those two dependencies in the "abi"
master makefile.

    Steps 2-4 could be avoided, I suppose, by me copying the zlib
includes and libraries to a system-wide location in the compiler's
search path. Still, that really shouldn't be a required step since all
this source is being shipped as an integrated tarball... plus the fact
that the library builds with name "Abi_zlib" implies that it's not
intended as a system-wide library.

    Step 5 looks like an outright bug... the library name given is just
flat-out inconsistent with the makefile that built it. I would be
really interested to hear how other people who are building with MSYS
have been doing so cleanly without having to alter that.

    Anyway, I hope that this is helpful. If so, it would be great to
see the changes make their way into future tarballs so they build clean
out-of-the-box. On the other hand, if I'm just missing something and
some or all of these steps were completely unnecessary... please let me
know!

Steve
Received on Mon Jul 25 17:59:49 2005

This archive was generated by hypermail 2.1.8 : Mon Jul 25 2005 - 17:59:50 CEST