Re: [ROOT] Re: MacOSX 10.3 (Panther) , compile issue with TProofServ.cxx

From: Edmond Offermann (edmondoffermann@yahoo.com)
Date: Thu Nov 06 2003 - 08:54:41 MET


Hi Fons,

Using __APPLE_CC__ is a bit of a hack . 
In /usr/include/AvailabilityMacros.h a bunch
of variables are defined that lets you control
these things. In our case, the following test
would be appropriate: 

 MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_3

because MAC_OS_X_VERSION_MAX_ALLOWED will be
MAC_OS_X_VERSION_10_2 for Jaguar (10.2).

Eddy

--- Fons Rademakers <Fons.Rademakers@cern.ch> wrote:
> Hi Eddy,
> 
>  turns out that on MacOS X 10.2
> MAC_OS_X_VERSION_10_3 also was already
> defined. I now use the __APPLE_CC__ version, which
> is the closest to
> being unique.
> 
> Cheers, Fons.
> 
> 
> 
> On Tue, 2003-11-04 at 19:58, Edmond Offermann wrote:
> > Hi Remi,
> > 
> > I pointed Fons to the variable
> MAC_OS_X_VERSION_10_3 
> > which is in  /usr/include/AvailabilityMacros.h
> > on the MacOSX .
> > 
> > So in TProofSrv.cxx I did :
> > 
> > #ifdef __APPLE__
> >   #include "/usr/include/AvailabilityMacros.h"
> > #endif
> > 
> > //#if (defined(__FreeBSD__) && (__FreeBSD__ < 4))
> ||
> > defined(__APPLE__)
> > #if (defined(__FreeBSD__) && (__FreeBSD__ < 4)) ||
> > (!defined(MAC_OS_X_VERSION_10_3))
> > #include <sys/file.h> 
> > #define lockf(fd, op, sz)   flock((fd), (op))
> > #define F_LOCK             (LOCK_EX | LOCK_NB)
> > #define F_ULOCK             LOCK_UN
> > #endif
> > 
> > Eddy
> > 
> > --- Remi Mommsen <remigius.mommsen@cern.ch> wrote:
> > > Hi Fons,
> > > 
> > > In case nobody else replied yet and you're still
> > > waiting for the 
> > > Panther CDs. I installed Panther over the
> weekend,
> > > but haven't had time 
> > > to compile root yet. However, here the
> difference of
> > > gcc 3.3 from 
> > > Jaguar (10.2.8 with August Developer Update) and
> > > Panther:
> > > 
> > > Jaguar:
> > > gcc -v ToolBox.cc
> > > Reading specs from
> > > /usr/libexec/gcc/darwin/ppc/3.3/specs
> > > Thread model: posix
> > > gcc version 3.3 20030304 (Apple Computer, Inc.
> build
> > > 1493)
> > >   /usr/libexec/gcc/darwin/ppc/3.3/cc1plus -quiet
> -v
> > > -D__GNUC__=3 
> > > -D__GNUC_MINOR__=3 -D__GNUC_PATCHLEVEL__=0
> > > -D__APPLE_CC__=1493 
> > > -D__DYNAMIC__ ToolBox.cc -D__GNUG__=3 -fPIC
> -quiet
> > > -dumpbase ToolBox.cc 
> > > -auxbase ToolBox -version
> > > -D__private_extern__=extern -o 
> > > /var/tmp//ccMg6NTJ.s
> > > GNU C++ version 3.3 20030304 (Apple Computer,
> Inc.
> > > build 1493) 
> > > (ppc-darwin)
> > > 	compiled by GNU C version 3.3 20030304 (Apple
> > > Computer, Inc. build 
> > > 1493).
> > > GGC heuristics: --param ggc-min-expand=30
> --param 
> > > ggc-min-heapsize=131072
> > > 
> > > 
> > > Panther:
> > > gcc -v ToolBox.cc
> > > Reading specs from
> > > /usr/libexec/gcc/darwin/ppc/3.3/specs
> > > Thread model: posix
> > > gcc version 3.3 20030304 (Apple Computer, Inc.
> build
> > > 1495)
> > >   /usr/libexec/gcc/darwin/ppc/3.3/cc1plus -quiet
> -v
> > > -D__GNUC__=3 
> > > -D__GNUC_MINOR__=3 -D__GNUC_PATCHLEVEL__=0
> > > -D__APPLE_CC__=1495 
> > > -D__DYNAMIC__ ToolBox.cc -D__GNUG__=3 -fPIC
> -quiet
> > > -dumpbase ToolBox.cc 
> > > -auxbase ToolBox -version
> > > -D__private_extern__=extern -o 
> > > /var/tmp//cc4jMdrY.s
> > > GNU C++ version 3.3 20030304 (Apple Computer,
> Inc.
> > > build 1495) 
> > > (ppc-darwin)
> > > 	compiled by GNU C version 3.3 20030304 (Apple
> > > Computer, Inc. build 
> > > 1495).
> > > GGC heuristics: --param ggc-min-expand=30
> --param 
> > > ggc-min-heapsize=131072
> > > 
> > > It seems the only difference is in the
> __APPLE_CC__
> > > version number.
> > > 
> > > HTH,
> > > 		Remi
> > > 
> > > 
> > > On Thursday, October 30, 2003, at 09:30  AM,
> Fons
> > > Rademakers wrote:
> > > 
> > > > Hi Eddy,
> > > >
> > > >   to keep thing working with Jaguar I need to
> know
> > > how we can
> > > > distinguish between the two platforms. Try
> > > compiling with the gcc -v
> > > > option to see what symbols are predefined for
> > > Panther and that were not
> > > > for Jaguar.
> > > >
> > > > Looking forward to the Panther CD. :-)
> > > >
> > > > Cheers, Fons.
> > > >
> > > >
> > > >
> > > > On Thu, 2003-10-30 at 16:57, Edmond Offermann
> > > wrote:
> > > >> Oops, lazy me
> > > >> looking in TProofServ.cxx. The solution is
> > > obvious
> > > >>
> > > >>    37 //#if (defined(__FreeBSD__) &&
> (__FreeBSD__
> > > <
> > > >> 4)) || defined(__APPLE__)
> > > >>      38 #if (defined(__FreeBSD__) &&
> (__FreeBSD__
> > > <
> > > >> 4))
> > > >>
> > > >> After this change Root compiles fine and my
> > > >> root marks increase 25% :
> > > >> G4 1.42 Ghz 1Gb Ram g++3.3
> > > >>
> > > >> fatman:~/src/ROOT/root-3.10.00/test> ./stress
> > > >>
> > >
> >
>
******************************************************************
> > > >> *  Starting  R O O T - S T R E S S test suite
> > > with
> > > >> 1000 events
> > > >>
> > >
> >
>
******************************************************************
> > > >> Test  1 : Functions, Random Numbers,
> Histogram
> > > >> Fits............. OK
> > > >> Test  2 : Check size & compression factor of
> a
> > > Root
> > > >> file........ OK
> > > >> Test  3 : Purge, Reuse of gaps in
> > > >> TFile......................... OK
> > > >> Test  4 : Test of 2-d histograms, functions,
> 2-d
> > > >> fits........... OK
> > > >> Test  5 : Test graphics &
> > > >> Postscript............................ OK
> > > >> Test  6 : Test subdirectories in a Root
> > > >> file.................... OK
> > > >> Test  7 : TNtuple, selections, TCut, TCutG,
> > > >> TEventList.......... OK
> > > >> Test  8 : Trees split and compression
> > > >> modes..................... OK
> > > >> Test  9 : Analyze Event.root file of stress
> > > >> 8................... OK
> > > >> Test 10 : Create 10 files starting from
> > > >> Event.root.............. OK
> > > >> Test 11 : Test chains of Trees using the 10
> > > >> files............... OK
> > > >> Test 12 : Compare histograms of test 9 and
> 
=== message truncated ===



This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:16 MET