Re: [greenstone-devel] Solaris 9 Intel Greenstone problem

From John R. McPherson
DateMon, 09 Feb 2004 11:39:48 +1300
Subject Re: [greenstone-devel] Solaris 9 Intel Greenstone problem
In-Reply-To (4021FB58-4070807-george-wcl2-ee-upatras-gr)
Dimitris Gavrilis wrote:
> Hi,
> I am trying to compile greenstone 2.39 on Solaris 9 x86
> The options for configure are CC=gcc CXX=g++ CPP=cpp LD=gcc
> During make i get the following error (i get the same error
> on 2.38, 2.40 versions):
> make[2]: Entering directory `/export/home/root/gsdl/src/mgpp/text'
> g++ -c -DHAVE_CONFIG_H -I../../.. -I../lib -I. -g -O2 -DSILENT
> -DSHORT_SUFFIX mgpp_passes.cpp
> In file included from /usr/include/sys/stat.h:533,
> from ../lib/sysfuncs.h:28,
> from mgpp_passes.cpp:31:
> /usr/include/sys/stat_impl.h: In function `int lstat(const char *, stat
> *)':
> /usr/include/sys/stat_impl.h:142: implicit declaration of function `int
> _lxstat(...)'
> /usr/include/sys/stat_impl.h: In function `int mknod(const char *, long
> unsigned int, long unsigned int)':
> /usr/include/sys/stat_impl.h:173: implicit declaration of function `int
> _xmknod(...)'
> make[2]: *** [mgpp_passes.o] Error 1
> make[2]: Leaving directory `/export/home/root/gsdl/src/mgpp/text'
> make[1]: *** [all] Error 1
> make[1]: Leaving directory `/export/home/root/gsdl/src/mgpp'
> make: *** [all] Error 1
> Anybody seen this?

No, but $GSDLHOME/src/mgpp/lib/sysfuncs.h contains checks and
workarounds for portability, based on the older mg code (which was based
on some stuff from GNU tar from 1994). A lot of it is a bit unnecessary
now since a lot of unix stuff has been standardised.

According to the manpage for "lstat", some other header files need to be
included first. Try replacing line 28 of sysfuncs.h (the #include
"sys/stat.h" line) with the following 3 lines:

#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>

Alternately, you could try completely replacing the file with an empty
file, since a lot of the file is for windows portability...

John McPherson