Subject: Re: bochs pkgsrc snafu?
To: None <netbsd-help@NetBSD.org>
From: Bob Bernstein <rs@bernstein.providence.ri.us>
List: netbsd-help
Date: 08/21/2003 13:55:17
On Thu, Aug 21, 2003 at 10:05:46AM +0100, David Laight wrote:

> The easy way to find out is to add:
> #define CPUID

> to the top of devices.cc and see where the compiler objects to the
> duplicate definition.

Ok, that step yields:

===> Building for bochs-2.0.2
cd iodev && \
/usr/pkg/bin/gmake  libiodev.a
gmake[1]: Entering directory 
`/usr/pkgsrc/emulators/bochs/work/bochs-2.0.2/iodev'
c++ -c  -I.. -I./.. -I../instrument/stubs -I./../instrument/stubs 
-I/usr/X11R6/include -O2 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES    
devices.cc -o devices.o
In file included from /usr/include/machine/specialreg.h:3,
                 from /usr/include/machine/cpufunc.h:49,
                 from /usr/include/x86/lock.h:50,
                 from /usr/include/machine/lock.h:3,
                 from /usr/include/pthread_types.h:42,
                 from /usr/include/sys/types.h:361,
                 from /usr/include/stdlib.h:41,
                 from ../bochs.h:50,
                 from devices.cc:28:
/usr/include/x86/specialreg.h:153: warning: `CPUID' redefined
devices.cc:27: warning: this is the location of the previous definition
In file included from ../bochs.h:399,
                 from devices.cc:28:
../cpu/cpu.h:1832: macro `CPUID' used with just one arg
gmake[1]: *** [devices.o] Error 1
gmake[1]: Leaving directory 
`/usr/pkgsrc/emulators/bochs/work/bochs-2.0.2/iodev'
gmake: *** [iodev/libiodev.a] Error 2


Does this require an '#ifndef...' statement in
/usr/include/x86/specialreg.h?  I hesitate to monkey with system
includes, at least not unless advised to do so, and how, or in the midst
of a heavy drinking bout. :-)

-- 
Bob Bernstein