THbookFile and OSX10.5


I have installed the ROOT 5.20 binaries from … 4.0.tar.gz

I need to load some old hbook files, but when I try to do it, i get:

root [1] gSystem->Load("libHbook") Error in <TUnixSystem::DynamicPathName>: libHbook[.so | .sl | .dl | .a | .dll] does not exist in .:/Applications/root/lib::/Applications/root/lib::/Applications/root/lib::/Applications/root/cint/cint/stl (int)(-1) root [2]

There is also no way to run h2root, which does not seem to be in the PATH.

There are specific problem with hbook libs for OSX10.5? Should I compile from source to get this stuff?


Could you use … 4.0.tar.gz instead of version 5.20 ?


Hi Rene,

thanks for the quick response.

When I try to load libHbook I get:

ROOT 5.21/04 (trunk@25661, Oct 02 2008, 13:17:00 on macosx)

CINT/ROOT C/C++ Interpreter version 5.16.29, Jan 08, 2008
Type ? for help. Commands must be C++ statements.
Enclose multiple statements between { }.
root [0] gSystem->Load(“libHbook”)
dlopen error: dlopen(/Applications/root/521/lib/, 9): Library not loaded: /usr/local/lib/libgfortran.3.dylib
Referenced from: /Applications/root/521/lib/
Reason: image not found
Load Error: Failed to load Dynamic link library /Applications/root/521/lib/
*** Interpreter error recovered ***
root [1][/code]

I now have h2root in my PATH, but when I try to use it I get:

$ h2root sp-1005-all.rz ccbar.root dyld: Library not loaded: /usr/local/lib/libgfortran.3.dylib Referenced from: /Applications/root/521/bin/h2root Reason: image not found Trace/BPT trap $

It seems I have problem with a gfortran dynamic lib. Which gcc are you using to compile this ROOT version? I don’t have that library in my /usr/local/lib.



I don’t know if it can help, but typing “gfortran -v” gives:
Using built-in specs.
Target: i386-apple-darwin8.10.1
Configured with: …/gcc-4.3-20070810/configure --enable-threads=posix --enable-languages=fortran
Thread model: posix
gcc version 4.3.0 20070810 (experimental)

and “locate libgfortran”:



I probably don’t have gfortran on my system.
Can you suggest me how to get it?

ps: I have installed Apple XCode to get gcc 4.0.1


use Fink to install the gcc 4.3.2 package, this package contains gfortran.

Cheers, Fons.

In Fink are just gcc4.2.2, which I have now installed, but I still cannot use THbooklib or h2root.

You’ve to recompile ROOT to use this version of the gfortran run-time libs (the binary was built against an older version).

Cheers, Fons.

OK, but why do you write that you have compiled it against gcc4.0.1 if you used 4.3.2?

However don’t worry, I will compile it myself.
Thanks for your help and fast answer.




while compiling I’ve got

gfortran -O2 -m64 -std=legacy -o main/src/g2root.o -c main/src/g2root.f gfortran -O2 -m64 -bind_at_load -o bin/g2root main/src/g2root.o \ -Llib lib/ \ /sw/lib/gcc4.2/lib/gcc/i686-apple-darwin9/4.2.2/../../../x86_64/libgfortran.dylib /sw/lib/gcc4.2/lib/gcc/i686-apple-darwin9/4.2.2/x86_64/libgfortranbegin.a -lm -Wl,-rpath,@loader_path/../lib -pthread -ldl ld: -rpath can only be used when targeting Mac OS X 10.5 or later collect2: ld returned 1 exit status make: *** [bin/g2root] Error 1 rm core/utils/src/RStl_tmp.cxx core/utils/src/rootcint_tmp.cxx $

Any idea?

I’m trying to install into /Application/root/521 from source;
I have downloaded source and unpacked in /Application/root/.;
then I changed root main directory name to 521;
To install I’ve typed:

[code]/Application/root/521/ $ export ROOTSYS=/Application/root/521
/Application/root/521/ $ ./configure macosx64 --enable-minuit2 --enable-roofit

Enabled support for asimage, astiff, builtin_afterimage, builtin_ftgl, builtin_freetype, builtin_pcre, builtin_zlib, cintex, exceptions, krb5, ldap, genvector, odbc, opengl, python, reflex, roofit, minuit2, rpath, shared, ssl, xft, xml, xrootd.

To build ROOT type:


/Application/root/521 $ make


And finally got the previous error.
I’m working on a MacBook 2.4 Intel Core 2 Duo with gcc4.2.2 installed from fink.

You are running on 10.5 aren’t you. In that case make sure you have set:

export COMMAND_MODE=unix2003

or at least make sure that it is not set to:


The -rpath option is only supported in 10.5 so it should work on any 10.5 system. Btw, thanks to this -rpath you don’t need to set ROOTSYS anymore. You only need to add /Application/root/521/bin to PATH.

Cheers, Fons.