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

From: Mayly Sanchez (msanchez@minos.phy.tufts.edu)
Date: Wed Sep 25 2002 - 21:43:08 MEST


I agree is not correct. My solution was a quick hack.

The problem is the current  $ROOTSYS/config/Makefile.macosx  has:
CXX           = c++
CC             = cc

the reason for this is that Apple on 10.1 had some modified gcc that
they called cc and c++. There were no gcc or g++ executables unless
you made a link.

On the new macosx, the compiler is gcc3 and there are links for
gcc, g++, cc and c++.

I'm guessing that if the compiler is defined as gcc then GCC_MAJOR
is configured properly (?) .

The problem is that if you change cc->gcc and c++->g++ in the Makefile
then macosx 10.1 users won't be able to compile but if you don't 
GCC_MAJOR
for 10.2 is not set properly.

I imagine you don't want two Makefiles for macosx? let me know if
you want me to test any of the changes.

Mayly

On Wednesday, September 25, 2002, at 01:31  PM, Fons Rademakers wrote:

> The change in cint/Module.mk is not correct for 2.x gcc. In principle
> the system should detect that it has gcc 3 available and then replace
> libstrm with gcc3strm.
>
> Mayly could you investigate why the GCC_MAJOR is not 3 on macosx in
> cint/Module.mk.
>
> Cheers, Fons.
>
>
>
> On Wed, 2002-09-25 at 17:09, Rene Brun wrote:
>> Hi Maily,
>>
>> Your proposed changes are now in CVS.
>> If I understand your mail correctly, your changes should be OK
>> for gcc2.9x and gcc3.x.
>>
>> Rene Brun
>>
>> On Wed, 25 Sep 2002, Mayly Sanchez wrote:
>>
>>>
>>> Hi Rene,
>>> thank you for applying my changes so quickly.  As for makelib.sh
>>> yes, -install_name should be omitted when the -bundle flag is
>>> used since this is not accepted by gcc3 although it was fine
>>> with gcc2.  The other change in those lines (my mistake I didn't 
>>> write
>>> it in that
>>> email)  is that the  first $BUNDLE variable changes to $LIB, the 
>>> reason
>>> being that
>>> $LIB= library.dylib
>>> $BUNDLE=library.so
>>> the -bundle line is used to create a .so from .dylib, if you don't do
>>> this it will
>>> fail with an error because the .so file is missing in the creation 
>>> of a
>>> .so
>>>
>>> The proposed change in the current CVS would be then:
>>>     echo $LD $opt -bundle -flat_namespace -undefined suppress $LIB \
>>> -o $BUNDLE -ldl $OBJS $EXTRA
>>>     $LD $opt -bundle -flat_namespace -undefined suppress $LIB \
>>>   -o $BUNDLE -ldl $OBJS $EXTRA
>>>
>>> Mayly
>>>
>>> On Wednesday, September 25, 2002, at 03:01  AM, Rene Brun wrote:
>>>
>>>> Hi Mayly,
>>>>
>>>> I have applied your change (replace libstrm by gcc3strm) in
>>>> cint/Module.mk
>>>>
>>>> However, your proposed change in build/unix/makelib.sh clashes with
>>>> the current version in CVS that contains nearly what you propose.
>>>> In the current CVS, we have:
>>>>
>>>>    echo $LD $opt -bundle -flat_namespace -undefined suppress
>>>> -install_name
>>>> $BUNDLE -o $BUNDLE -ldl $OBJS $EXTRA
>>>>    $LD $opt -bundle -flat_namespace -undefined suppress 
>>>> -install_name
>>>> $BUNDLE \
>>>>       -o $BUNDLE -ldl $OBJS $EXTRA
>>>>
>>>> In your proposed cgange, the "-install_name" is omitted.
>>>> Could you clarify this point?
>>>>
>>>> Rene Brun
>>>>
>>>> On Wed, 25 Sep 2002, Mayly Sanchez wrote:
>>>>
>>>>> Hi,
>>>>> I just attempted to compile root on the new MacOS X version 10.2
>>>>> (jaguar).
>>>>> The new developer tools that come with it have gcc 3.1, so in order
>>>>> to make it work I had to make a few changes, which I hope that
>>>>> you will find the time to integrate them into the next release.
>>>>>
>>>>> First, I have obtained all the dependencies from fink:
>>>>> http://fink.sourceforge.net
>>>>> following the specific instructions for 10.2, they are:
>>>>> g77, dlcompat, XFree86 and freetype.
>>>>> Note that these are installed under /sw it would be nice that root
>>>>> would
>>>>> look for these things in there. In the meantime I have made a link
>>>>> from
>>>>> ln -s /sw/lib /usr/local/lib
>>>>> ln -s /sw/include /usr/local/include
>>>>>
>>>>> I downloaded the cernlibs from
>>>>> http://www-jlc.kek.jp/~fujiik/macosx/10.1.X/
>>>>> Note I didn't compile them. The difference between g77-2.95 and
>>>>> g77-3.x
>>>>> doesn't seem too big but you are better off compiling it following 
>>>>> the
>>>>> instructions
>>>>> there and doing it yourself.  Set CERNDIR and CERNLIB as usual.
>>>>>
>>>>> Download ttf fonts and untar them in /usr/share/fonts.
>>>>> Download the root source (this works with 3.03.09) and untar on the
>>>>> desired
>>>>> location. Set ROOTSYS, DYLD_LIBRARY_PATH, etc as usual.
>>>>>
>>>>> Now these are the changes needed to make it compile. I have
>>>>> substituted
>>>>> the options for macosx 10.1.x but probably it needs to be added as
>>>>> a separate option.
>>>>> Edit file $ROOTSYS/cint/Module.mk and go down until you find
>>>>> (ignore the < and > symbols):
>>>>> < ifeq ($(PLATFORM),macosx)
>>>>> < CINTS2       += $(MODDIRS)/libstrm.cxx
>>>>> < endif
>>>>> change it to:
>>>>>> ifeq ($(PLATFORM),macosx)
>>>>>> CINTS2       += $(MODDIRS)/gcc3strm.cxx
>>>>>> endif
>>>>>
>>>>> Next, edit file $ROOTSYS/build/unix/makelib.sh and go to block 
>>>>> with:
>>>>> elif [ $PLATFORM = "macosx" ]; then
>>>>> The following lines:
>>>>> <   echo $LD $opt -bundle -flat_namespace -undefined suppress
>>>>> -install_name $LIB \
>>>>>   -o $BUNDLE -ldl $OBJS $EXTRA
>>>>> <   $LD $opt -bundle -flat_namespace -undefined suppress 
>>>>> -install_name
>>>>> $LIB \
>>>>>        -o $BUNDLE -ldl $OBJS $EXTRA
>>>>> have to be modified to:
>>>>>>   echo $LD $opt -bundle -flat_namespace -undefined suppress 
>>>>>> $BUNDLE \
>>>>> -o $BUNDLE -ldl $OBJS $EXTRA
>>>>>>   $LD $opt -bundle -flat_namespace -undefined suppress $BUNDLE \
>>>>>     -o $BUNDLE -ldl $OBJS $EXTRA
>>>>>
>>>>> The reason for the change is best explained here:
>>>>> http://fink.sourceforge.net/doc/porting/preparing.php#gcc3
>>>>>
>>>>> Well that's it, ./configure macosx. I haven't tested it throughly 
>>>>> but
>>>>> the demos,
>>>>> the tests and my old macros seem to work.
>>>>>
>>>>> If you have any questions or comments please write directly to me
>>>>> since
>>>>> I'm not subscribed to the list. I'm placing the binary here:
>>>>> http://mixcoatl.phy.tufts.edu/msanchez/root/
>>>>> root_v3.03.09_jaguar.tar.gz
>>>>>
>>>>> Mayly
>>>>>
>>>
> -- 
> Org:    CERN, European Laboratory for Particle Physics.
> Mail:   1211 Geneve 23, Switzerland
> E-Mail: Fons.Rademakers@cern.ch              Phone: +41 22 7679248
> WWW:    http://root.cern.ch/~rdm/            Fax:   +41 22 7679480



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