How to compile root for MacOS X Tiger?

Dear MacRooters

My question is: How do I compile root for MacOS X Tiger?

Yesterday I did a clean install of Mac OS X Tiger on my old PowerBook G4 550MHz,
upgraded to OS X 10.4.1 and installed Fink-0.8.0 including libraries libjpeg,
libpng, libtiff and libXaw3d.

Today I downloaded the newest cvs version of root and found the following
problems/differences compared to Mac OS X Panther 10.3.1:

1, ./configure macosx:
While configuration for Mac OS X 10.3.1 has always found the Fink libraries
in directory /sw/lib, checking for libjpeg, libtiff etc results now in “no”,
as seen in the following config file:

Configuring for macosx
Checking for libX11 ... /usr/X11R6/lib
Checking for X11/Xlib.h ... /usr/include
Checking for libXpm ... /usr/X11R6/lib
Checking for libpthread ... /usr/lib
Checking whether to build included libfreetype6 ... yes
Checking for GL/gl.h ... /usr/X11R6/include
Checking for libGL, or libMesaGL ... /usr/X11R6/lib
Checking for libGLU, or libMesaGLU ... /usr/X11R6/lib
Checking for mysql.h ... no
Checking for libmysqlclient_r, libmysqlclient, or mysqlclient ... no
Checking for occi.h ... no
Checking for libclntsh, or oci ... no
Checking for libocci, or oraocci10 ... no
Checking for libpq-fe.h ... no
Checking for libpq ... no
Checking for sql.h ... no
Checking for libsqlod ... no
Checking for rfio_api.h ... no
Checking for libshift, shiftmd, or shift ... no
Checking for libpacklib, packmd, or packlib ... no
Checking for libkernlib, kernmd, or kernlib ... no
Checking for libPythia6 ... no
Checking for libVenus ... no
Checking for dcap.h ... no
Checking for libdcap ... no
Checking for chirp_client.h ... no
Checking for libchirp_client ... no
Checking for gliteUI.h ... no
Checking for libgliteUI ... no
Checking for jpeglib.h ... no
Checking for png.h ... no
Checking for tiffio.h ... no
Checking for gif_lib.h ... no
Checking for libjpeg ... no
Checking for libtiff ... no
Checking for libz ... /usr/lib
Checking for libpng ... no
Checking whether to build included libAfterImage ... yes
Checking for ldap.h ... /usr/include
Checking for libldap ... /usr/lib
Checking for liblber ... /usr/lib
Checking for Python.h ... /System/Library/Frameworks/Python.framework/Versions/2.3/include/python2.3
Checking for libpython2.4, libpython2.3, libpython2.2, python24, python23, or Python ... /System/Library/Frameworks/Python.framework/Versions/2.3
Checking for xml2-config ... /usr/bin/xml2-config
Checking for libxml2 version >= 2.4.x ... ok
Checking whether to build xrootd ... yes
Checking for globusdir ... no
Checking for GLOBUS_LOCATION ... no
Checking for libssl ... /usr/lib
Checking for libcrypto ... /usr/lib
Checking for openssl/bio.h ... /usr/include
Checking for openssl/blowfish.h ... /usr/include
Checking for openssl/err.h ... /usr/include
Checking for openssl/pem.h ... /usr/include
Checking for openssl/rand.h ... /usr/include
Checking for openssl/rsa.h ... /usr/include
Checking for t_server.h ... no
Checking for libsrp ... no
Checking for libgmp ... no
Checking for libmisc ... no
Checking for pwauth.h ... no
Checking for krb5.h ... /usr/include
Checking for libk5crypto ... /usr/lib
Checking whether we're using MIT Kerberos ... yes
Checking for libkrb5 ... /usr/lib
Checking for kinit ... /usr/bin/kinit
Checking for libcom_err ... /usr/lib
Checking for shadow passwords ... no
Checking whether to build libReflex ... no
Checking whether to build libTable ... no
Checking for Clarens support ... no
Checking for PEAC support ... no
Writing config/Makefile.config ... done
Writing include/config.h ... done
Writing bin/root-config ... done
Writing etc/system.rootrc ... done
Writing etc/system.rootauthrc ... done
Writing etc/system.rootdaemonrc ... done
Writing etc/root.mimes ... done
Writing etc/rootd ... done
Writing bin/memprobe ... done
Writing build/misc/root-help.el ... done
Writing macros/html.C ... done
Writing config.status ... done

Enabled support for asimage, builtin_afterimage, builtin_freetype, exceptions, krb5, ldap, opengl, python, shared, ssl, thread, xml, xrootd.

Why are the Fink libraries not found?

2, Compilation:
A couple of days ago compilation of cvs root on 10.3.1 needed 3 hrs, in contrast,
compilation of cvs root today on 10.4.1 needed 3 hrs 40 min.
It is not quite clear to me why compilation takes longer than on my old system?
Note: The reason may be that mds, i.e. indexing for Spotlight uses almost 50% CPU time.

Compilation of root results in the following messages:
Compiling XrdBuffer.cc
g++ -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_REENTRANT -D_GNU_SOURCE -Wall -D__macos__ -O3 -Wno-deprecated -undefined dynamic_lookup -multiply_defined suppress -DXrdDEBUG=0 -I. -I… -o …/…/obj/XrdBuffer.o XrdBuffer.cc

Does this mean that I am compiling a 64 bit version of root on a 32 bit Mac?

3, Tutorials:
The tutorial “shapes.C” crashes root beyond recovery.
Could this be because libXaw3d of Fink is not found?

4, ROOTMARKS:
Few days ago I tested the newest version of root and got a value of 159 ROOTMARKS.
Today, I got an initial value of 108 ROOTMARKS due to mds. After mds finished, the
value increased to 148 ROOTMARKS.

What is your experience when updating to Tiger?

Best regards
Christian

Hi there ! I’ll try to help you a bit on the few issues you’re having :

You should check the LD_LIBRARY_PATH and the DYLD_LIBRARY_PATH and make sure that /sw/lib (if I remember correctly) is included in the path.

Remember that the compiler toolchain in OS X 10.4.x has moved to GCC 4.0 instead of GCC 3.3. There are several architecture changes between these versions that could explain a difference in compilation and execution time. GCC experts will be able to tell you much more about this and the numerous compiling options than me.

Of course, indexing takes also a lot of CPU time during the initial setup, however I find it quite well-behaved when compiling programs - but my configuration is not the same. The best way to know if Spotlight services are the source of your slow down, is to tag your compilation directories “don’t index” (it’s somewhere in the preferences panel).

Thank you, as far as I remember, sw/lib was never included in the library path.
Could it be that there is something wrong with Fink-0.8.0 installation, since I never had to include sw/lib manually? How should I do it?

Regards
Christian

I’m speaking here on the top of my head. I’ll check the details this evening at home, so take them with a grain of salt.

Control that the LD_LIBRARY_PATH and DYLD_LIBRARY_PATH were correctly set up during the fink installation :

echo $LD_LIBRARY_PATH
echo $DYLD_LIBRARY_PATH

You should see /sw/lib somewhere in the output of both commands. If for whatever reason, this is not the case, do the following :

edit the file .bashrc in your home directory and add the following lines :

export LD_LIBRARY_PATH = /sw/lib:$LD_LIBRARY_PATH
export DYLD_LIBRARY_PATH = /sw/lib:$DYLD_LIBRARY_PATH

(I’m assuming you’re using the default shell, which is bash).

Both echo commands are empty.
Furthermore, there is no .bashrc file, but only the following files:
1, .bash_profile, containing:

source /sw/bin/init.sh

2, .xinitrc, containing:

# Window Maker default X session startup script 

PATH="$PATH:/sw/bin"

# ROOT settings
export MACOSX_DEPLOYMENT_TARGET=10.4
export TMPDIR=/Users/rabbitus/temp

export ROOTSYS=/Users/rabbitus/ROOT/root
export PATH=$ROOTSYS/bin:$PATH
export LD_LIBRARY_PATH=$ROOTSYS/lib:$LD_LIBRARY_PATH
export DYLD_LIBRARY_PATH=$ROOTSYS/lib

XClock -d -geometry +950+700 &
xterm -sb -sl 2000 -rightbar -geometry 80x40+64+0 &
exec wmaker

In Panther these two files were sufficient for everything to work fine.
Where should I place the additional lines?

Thank you
Christian