Re: [ROOT] Re: Compiling root on MacOS X 10.2 (jaguar) (fwd)

From: Remi Mommsen (Remigius.Mommsen@cern.ch)
Date: Thu Oct 10 2002 - 21:22:13 MEST


Hi,

On Thursday, September 26, 2002, at 08:54 AM, Mayly Sanchez wrote:
>
> Fons,
> I just checked. GCC_MAJOR is properly set if and only if you define 
> the compilers
> in the Makefile as gcc, g++ etc..
>
> So a better solution for A (which is close to C and doesn't introduce 
> new problems)
> is the following:
> -keep the changes in build/unix/makelib.sh
> -change cint/Modules.mk back to what it was
> -change in Makefile.macosx :
> CXX           = g++
> CC            = gcc
> LD            = g++
> -make a note in Makefile.macosx that if you want to compile for
> 10.1 you just have to change those 3 variables to what they were:
> CXX           = c++
> CC            = cc
> LD            = c++
>
> Mayly

I compiled the cvs head version (3.03/09) of root on my Mac OS X 10.2.1
two days ago. I use the fink tools for package management 
(http://fink.sourceforge.net) and used the CERNLIB 2002 compiled by 
myself to build against. This worked extremely well (thanks to the root 
developers). I had to make only two changes:

- the above mentioned change in Makefile.macosx seems not to be in the 
cvs yet. I had to make the changes myself.

- I added some EXTRA_*FLAGS for the fink dirs (/sw/include and 
/sw/lib). Doing so, I found out that in root/build/unix/makelib.sh the 
LDFLAGS are not given to the static linker for mac os x. Is this by 
purpose? Anyway, I added them and it worked out.

Here the output of cvs diff:

Index: root/build/unix/makelib.sh
===================================================================
RCS file: /user/cvs/root/build/unix/makelib.sh,v
retrieving revision 1.17
diff -r1.17 makelib.sh
71,72c71,72
<    echo $LD $opt -bundle -flat_namespace -undefined suppress  $LIB -o 
$BUNDLE -ldl $OBJS $EXTRA
<    $LD $opt -bundle -flat_namespace -undefined suppress $LIB \
---
 >    echo $LD $LDFLAGS -bundle -flat_namespace -undefined suppress  
$LIB -o $BUNDLE -ldl $OBJS $EXTRA
 >    $LD $LDFLAGS -bundle -flat_namespace -undefined suppress $LIB \
Index: root/config/Makefile.macosx
===================================================================
RCS file: /user/cvs/root/config/Makefile.macosx,v
retrieving revision 1.6
diff -r1.6 Makefile.macosx
16,17c16,17
< CXX           = c++
< CC            = cc
---
 > CXX           = g++
 > CC            = gcc
30c30
< LD            = c++
---
 > LD            = g++
32c32
< SOFLAGS       = $(OPT) -dynamiclib -flat_namespace -undefined 
suppress \
---
 > SOFLAGS       = $(OPT) $(EXTRA_LDFLAGS) -dynamiclib -flat_namespace 
-undefined suppress \
52a53,55
 > EXTRA_CXXFLAGS= -I./include -I/sw/include
 > EXTRA_CFLAGS  = -I./include -I/sw/include
 > EXTRA_LDFLAGS = -L/sw/lib

Question: could those changes go into the cvs tree?

Thanks a lot for your wonderful work.

Cheers,
		Remi


---------------------------------------------------------------------
Intelligence is like a four-wheel drive vehicle: it allows you to get
stuck in much more remote places.

*********************************************************************
Remigius K. Mommsen                 e-mail: mommsen@slac.stanford.edu
University of California, Irvine       URL:      home.cern.ch/mommsen
c/o SLAC                             voice:        ++1 (650) 926-3595
2575 Sand Hill Road #35             mobile:        ++1 (650) 387-1402
Menlo Park, CA 94025, US               fax:        ++1 (650) 926-8522
*********************************************************************



This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:51:14 MET