Root 4.04.02 on Mac OS X (10.3.9)


I’m trying to compile Root 4.04.02 on Mac OS X (10.3.9) and I get the following error :

Make XrdOuc done.
Making ouc component…
g++ -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_REENTRANT -D_GNU_SOURCE -Wall -D__macos__ -O3 -undefined dynamic_lookup -multiply_defined suppress -DXrdDEBUG=0 -I. -I… -o …/…/obj/XrdNet.o In member function int XrdNet::Accept(XrdNetPeer&, int, int)': error:POLLRDNORM’ undeclared (first use this function) error: (Each undeclared identifier is reported only once for each
function it appears in.) error: `POLLRDBAND’ undeclared (first use this function)
make[5]: *** […/…/obj/XrdNet.o] Error 1
make[4]: *** [Darwinall] Error 2
make[3]: *** [all] Error 2
make[2]: *** [XrdNet] Error 2
make[1]: *** [all] Error 2
make: *** [xrootd/src/xrootd/lib/] Error 2

I’m quite new to Mac OS, so I might miss an obvious point.
Is someone else having the problem ?



gcc -v
Reading specs from /usr/libexec/gcc/darwin/ppc/3.3/specs
Thread model: posix
gcc version 3.3 20030304 (Apple Computer, Inc. build 1671)

uname -a
Darwin ### 7.9.0 Darwin Kernel Version 7.9.0: Wed Mar 30 20:11:17 PST 2005; root:xnu/xnu-517.12.7.obj~1/RELEASE_PPC Power Macintosh powerpc


Those variables (POLLRDNORM, …) are indeed undefined on MacOSx version < 10.4 ; to cope with that, ROOT and xrootd test the flag MAC_OS_X_VERSION_10_4, and explicitly define those variables if the flag is not set.
Now, such a flag should not be set on you system, being 10.3.9 , but it looks like it is. Could you check (either with a simple C++ program or with options -E -dM to gcc, e.g. gcc -E -dM <any_c++_code>.cxx | grep MAC_OS_X_VERSION_10_4)?

In the meanwhile, you should be able to compile ROOT by skipping the build of xrootd:

./configure --disable-xrootd

(unless you need the xrootd daemon, of course).

Hope it helps.

Gerri Ganis


Thanks for the answer. I indeed do not need (yet ?) xrootd, so I can live w/o it for the moment. But I thought this error might annoy someone else.

Strangely enough, it seems the symbol you’re referring to is not defined on my system :

gcc -E -dM a.cxx | grep MAC
#define MACH 1

Are there some others tests I could do to help solve the problem ?


BTW, if the test of platform is the one done in XrdOucPlatform.h, then I can understand the problem :

// For alternative platforms
#ifdef macos
#include <AvailabilityMacros.h>
#if !defined(MAC_OS_X_VERSION_10_4)
#define POLLRDNORM 0
#define POLLRDBAND 0
#define POLLWRNORM 0

And in AvailabilityMacros.h I see :


  • Set up standard Mac OS X versions
    #define MAC_OS_X_VERSION_10_0 1000
    #define MAC_OS_X_VERSION_10_1 1010
    #define MAC_OS_X_VERSION_10_2 1020
    #define MAC_OS_X_VERSION_10_3 1030
    #define MAC_OS_X_VERSION_10_4 1040

so I would say that MAC_OS_X_VERSION_10_4 is defined there.