Subject: sysutils/fam build fails on MacOS X
To: None <tech-pkg@netbsd.org>
From: John D. Baker <jdbaker@mylinuxisp.com>
List: tech-pkg
Date: 03/25/2004 01:57:38
Trying to build sysutils/fam (nested dependency of wip/gimp-current and
the build fails.

First:

g++ -DHAVE_CONFIG_H -I. -I. -I.. -I../include -DCONFIG_ETC_CONFIG_PATH=\"/usr/pkg/etc/fam.conf\"  -no-cpp-precomp  -O2 -c -o IMon.o `test -f 'IMon.c++' || echo './'`IMon.c++
IMon.c++:39:29: sys/sysmacros.h: No such file or directory
gnumake[2]: *** [IMon.o] Error 1
gnumake[1]: *** [all-recursive] Error 1
gnumake: *** [all] Error 2
*** Error code 2

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


looking at /usr/pkgsrc/sysutils/fam/work/fam-2.6.10/fam/IMon.c++
reveals:

#if !defined(__FreeBSD__) && !defined(__OpenBSD__) && !defined(__NetBSD__)
#  include <sys/sysmacros.h>
#endif

Figuring MacOS X should get the same treatment as the other *BSDs and
not knowing what other symbol to test for, as a quick workaround, just
comment the above block out.

An identical problem occurs with
/usr/pkgsrc/sysutils/fam/work/fam-2.6.10/fam/Interest.c++
and I comment out an identical block of code.


The build then proceeds until:

[...]
g++ -DHAVE_CONFIG_H -I. -I. -I.. -I../include -DCONFIG_ETC_CONFIG_PATH=\"/usr/pkg/etc/fam.conf\"  -no-cpp-precomp  -O2 -c -o Listener.o `test -f 'Listener.c++' || echo './'`Listener.c++
In file included from RequestMap.h:26,
                 from MxClient.h:27,
                 from TCP_Client.h:27,
                 from LocalClient.h:26,
                 from Listener.c++:46:
../include/BTree.h:241: warning: `BTree<Key, Value>::Closure' is implicitly a
   typename
../include/BTree.h:241: warning: implicit typename is deprecated, please see
   the documentation for details
../include/BTree.h:353: warning: `BTree<Key, Value>::Closure' is implicitly a
   typename
../include/BTree.h:353: warning: implicit typename is deprecated, please see
   the documentation for details
../include/BTree.h:409: warning: `BTree<Key, Value>::Closure' is implicitly a
   typename
../include/BTree.h:409: warning: implicit typename is deprecated, please see
   the documentation for details
../include/BTree.h:504: warning: `BTree<Key, Value>::Status' is implicitly a
   typename
../include/BTree.h:504: warning: implicit typename is deprecated, please see
   the documentation for details
../include/BTree.h:562: warning: `BTree<Key, Value>::Closure' is implicitly a
   typename
../include/BTree.h:562: warning: implicit typename is deprecated, please see
   the documentation for details
../include/BTree.h:592: warning: `BTree<Key, Value>::Status' is implicitly a
   typename
../include/BTree.h:592: warning: implicit typename is deprecated, please see
   the documentation for details
Listener.c++: In static member function `static void
   Listener::create_local_client(TCP_Client&, unsigned int)':
Listener.c++:215: warning: invalid conversion from `const char*' to `unsigned
   char'
Listener.c++: In static member function `static void
   Listener::accept_localclient(int, void*)':
Listener.c++:289: warning: invalid conversion from `const char*' to `unsigned
   char'
Listener.c++: In member function `void Listener::dirty_ugly_hack()':
Listener.c++:355: warning: invalid conversion from `const char*' to `unsigned
   char'
/var/tmp//ccDq2p1E.s:unknown:Fixup of 5940 too large for field width of 1
gnumake[2]: *** [Listener.o] Error 1
gnumake[1]: *** [all-recursive] Error 1
gnumake: *** [all] Error 2
*** Error code 2

Stop.
bmake: stopped in /usr/pkgsrc/sysutils/fam
*** Error code 1
[...]


There seems to be a problem with the intermediate assembly stage.

I've now encountered this same problem when building on MacOS X 10.1.5
using the April 2002 Developer Tools and gcc 3.1 and when building on
MacOS 10.2.8 using the December 2002 Developer Tools and gcc 3.3.

I'm unsure how to proceed, or what to look for, but perhaps the preceeding
information can help point someone to what may be going wrong.

Thanks.

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