Re: [greenstone-users] Compiling 2.40 on MacOSX?

From Carl Jones
DateMon, 14 Jul 2003 00:26:35 -0400
Subject Re: [greenstone-users] Compiling 2.40 on MacOSX?
In-Reply-To (3F11F779-9050700-cs-waikato-ac-nz)
John,

Many thanks. It now compiles as advertised. :)

Carl


On Sunday, July 13, 2003, at 08:21 PM, John R. McPherson wrote:

> Carl Jones wrote:
>> Hi,
>> Has anyone successfully compiled the latest release on MacOSX 10.2.*?
>> I'm getting the following error:
>> ../../packages/mg/lib/getopt.h:105: declaration of C function `int
>> getopt()'
>> conflicts with
>> /usr/include/unistd.h:142: previous declaration `int getopt(int,
>> char* const*,
>> const char*)' here
>> make[1]: *** [phindaction.o] Error 1
>
> Hi,
> I can't figure out where the headers have changed between gsdl 2.39
> and gsdl 2.40, but I get this as well. The solution is to edit
> the file gsdl/src/gsdl/packages/mg/sysfuncs.h and at about line 283
> or so, remove the line that says
> #include <getopt.h>
> The problem is that mg was written quite a while ago and does a lot
> of portability stuff itself, but since it was written a lot of the
> stuff it does is now in all the main c libraries anyway, so its own
> stuff is conflicting with system libraries and headers.
>
> That was the only change I needed to compile on os x 10.2.4.
>
> Anyway, after finding out from the other developers what's in
> gsdl 2.40 that isn't in gsdl 2.39, I'll see about updating the Mac
> binary in the next few days.
>
> John McPherson
>