Re: [greenstone-users] Compiling Greenstone 2.41 on MacOSX

From John R. McPherson
DateWed, 10 Dec 2003 13:24:22 +1300
Subject Re: [greenstone-users] Compiling Greenstone 2.41 on MacOSX
In-Reply-To (471D9B1A-2A9E-11D8-9FD2-000393889538-mit-edu)
On Tue, Dec 09, 2003 at 06:20:29PM -0500, Carl Jones wrote:
> Hi,
>
> I tried compiling 2.41 source for MacOSX (10.2 and 10.3 respectively)
> but was unsuccessful, unfortunately (see below).

> Got the same errors on both platforms.
>
> gcc -g -O2 -o ppthtml ppthtml.o ../cole/libcole.a
> making all in isis-gdl
> g++ *.cpp -o IsisGdl
> CRC32.cpp: In function `long unsigned int CalcCRC32(std::fstream&)':
> CRC32.cpp:100: no matching function for call to
> `std::basic_fstream<char,

[snip]

The problem is the isis-gdl package in the greenstone/packages directory...
it obviously wasn't written (or tested) with gcc version 3 or later,
which mac os x (and recent linux distributions use).

I've made some simple little changes (and tested them on gcc 2.95 and
gcc 3.3) to 3 files so that it compiles cleanly.

You can download the 3 files from:
http://www.greenstone.org/tmp/isis-gdl-fixes.zip

which contains:
isis-gdl/CRC32.cpp
isis-gdl/IsisTypes.h
isis-gdl/Master.cpp

If you copy these over the 3 files with the same name in gsdl/packages/isis-gdl
then hopefully it should all compile ok.

John McPherson

--
"Debugging is twice as hard as writing the code in the first
place. Therefore, if you write the code as cleverly as possible, you
are, by definition, not smart enough to debug it."
-- Brian Kernighan