Subject: sysutils/fam build failure on Solaris 9/sparc
To: None <tech-pkg@netbsd.org>
From: John D. Baker <jdbaker@mylinuxisp.com>
List: tech-pkg
Date: 04/21/2004 10:06:52
Attempting to build sysutils/fam (a deeply-nested dependency of
graphics/gimp) fails as shown below:

[...]
/bin/ksh ../libtool --mode=compile g++ -DHAVE_CONFIG_H -I. -I. -I.. -I../include -DFAM_CONF=\"/usr/pkg/etc/fam.conf\"  -I/usr/pkg/include -DNDEBUG  -O -I/usr/pkg/include -c -o Client.lo `test -f 'Client.c++' || echo './'`Client.c++
mkdir .libs
 g++ -DHAVE_CONFIG_H -I. -I.. -I../include "-DFAM_CONF=\"/usr/pkg/etc/fam.conf\"" -I/usr/pkgsrc/sysutils/fam/work/.buildlink/include -DNDEBUG -O -c Client.c++ -MT Client.lo -MD -MP -MF .deps/Client.TPlo  -fPIC -DPIC -o .libs/Client.o
In file included from /usr/pkg/gcc3/include/c++/3.3.3/backward/iostream.h:31,
                 from Client.c++:37:
/usr/pkg/gcc3/include/c++/3.3.3/backward/backward_warning.h:32:2: warning: #warning This file includes at least one deprecated or antiquated header. Please consider using one of the 32 headers found in section 17.4.1.2 of the C++ standard. Examples include substituting the <X> header for the <X.h> header for C++ includes, or <sstream> instead of the deprecated header <strstream.h>. To disable this warning use -Wno-deprecated.
Client.c++:42: error: type specifier omitted for parameter `u_int32_t'
Client.c++:42: error: parse error before `*' token
Client.c++: In constructor `Client::Client(long int, unsigned int, int)':
Client.c++:118: error: `u_int32_t' undeclared (first use this function)
Client.c++:118: error: (Each undeclared identifier is reported only once for
   each function it appears in.)
Client.c++:122: error: parse error before `=' token
Client.c++:123: error: `nmsglen' undeclared (first use this function)
Client.c++:132: error: parse error before numeric constant
Client.c++:133: error: non-lvalue in unary `&'
Client.c++:134: error: request for member `sun_family' in `1', which is of
   non-class type `int'
Client.c++:138: error: request for member `sun_path' in `1', which is of
   non-class type `int'
Client.c++:150: error: parse error before `;' token
Client.c++:151: error: `mlen' undeclared (first use this function)
Client.c++:153: error: request for member `sun_path' in `1', which is of
   non-class type `int'
Client.c++:172: error: request for member `sun_path' in `1', which is of
   non-class type `int'
Client.c++:173: error: request for member `sun_path' in `1', which is of
   non-class type `int'
Client.c++:185: error: non-lvalue in unary `&'
Client.c++: In member function `int Client::writeToServer(char*, int)':
Client.c++:209: error: `msgHeader' undeclared (first use this function)
Client.c++: In member function `int Client::nextEvent(FAMEvent*)':
Client.c++:236: error: `u_int32_t' undeclared (first use this function)
Client.c++:236: error: parse error before `;' token
Client.c++:237: error: `msglen' undeclared (first use this function)
Client.c++: In member function `void Client::checkBufferForEvent()':
Client.c++:409: error: parse error before `=' token
Client.c++: At global scope:
Client.c++:438: error: type specifier omitted for parameter `u_int32_t'
Client.c++:438: error: parse error before `*' token
Client.c++: In function `void getword(...)':
Client.c++:440: error: `l' undeclared (first use this function)
Client.c++:440: error: `p' undeclared (first use this function)
gmake[2]: *** [Client.lo] Error 1
gmake[2]: Leaving directory `/usr/pkgsrc/sysutils/fam/work/fam-2.7.0/lib'
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory `/usr/pkgsrc/sysutils/fam/work/fam-2.7.0'
gmake: *** [all] Error 2
*** Error code 2

Stop.
bmake: stopped in /usr/pkgsrc/sysutils/fam
[...]


I've seen similar failures on MacOS X, but those were usually remedied by
changing the order of #include directives to guarantee that <sys/types.h>
was included before most other headers (usually <dirent.h> or <malloc.h>).

I'll see if anything jumps out at me, but I suspect others are better
attuned to finding and fixing these problems.  This appears to be the
current show-stopper for building the current graphics/gimp on Solaris 9.

Thanks.

-- 
John D. Baker, KN5UKS                    NetBSD     Darwin/MacOS X
jdbaker(at)mylinuxisp(dot)com                 OpenBSD            FreeBSD
BSD -- It just sits there and _works_!