I have installed ROOTv5.24/00 on MacOSX 10.6.2 Snow Leopard.
Instration finished with no Error.
But , When I try Pythia6 in ROOT, I’ve got follow error.
root [0] gSystem->Load(“libEG.so”)
(int)0
root [2] gSystem->Load(“libEGPythia6.so”)
dlopen error: dlopen(/Users/hashimotokimiaki/CERN/rootsys/lib/root/./libEGPythia6.so, 9): Library not loaded: /Users/hashimotokimiaki/pythia6/libPythia6.dylib
Referenced from: /Users/hashimotokimiaki/CERN/rootsys/lib/root/./libEGPythia6.so
Reason: image not found
Load Error: Failed to load Dynamic link library /Users/hashimotokimiaki/CERN/rootsys/lib/root/./libEGPythia6.so
(int)(-1)
*** Interpreter error recovered ***
There is libPythia6.so in Users/hashimotokimiaki/CERN/rootsys/lib/root/./libEGPythia6.
My gcc,g++,gfortran is
gcc version 4.4.1 (GCC) (from fink)
see example in $ROOTSYS/tutorials/pythia/pythiaExample.C
you must load libPythia6 before libEGPythia6.
Also note that with macos10.6 you do not need the dylib anymore, only .so
I suggest to use 5.26 instead of 5.24
gcc-4 mean gcc 4.4.1 (from fink)
gcc mean gcc 4.2.1 (Apple Inc. build 5646)
1)Try link
In /Users/hashimotokimiaki/CERN/pythia6
ln -s libPythia6.dylib libPythia6.so
But , I got same error.
root [0] gSystem->Load(“libEG.so”)
(int)0
root [1] gSystem->Load(“libPythia6.so”)
(int)0
root [2] gSystem->Load(“libEGPythia6.so”)
dlopen error: dlopen(/Users/hashimotokimiaki/CERN/rootsys/lib/root/libEGPythia6.so, 9): Library not loaded: /Users/hashimotokimiaki/pythia6/libPythia6.dylib
Referenced from: /Users/hashimotokimiaki/CERN/rootsys/lib/root/libEGPythia6.so
Reason: image not found
Load Error: Failed to load Dynamic link library /Users/hashimotokimiaki/CERN/rootsys/lib/root/libEGPythia6.so
(int)(-1)
*** Interpreter error recovered ***
rebuild Pythia6 gcc-4
I have maked ROOTv5.26 by gcc4.4.1(from fink).But , To build libPythia6.so and .dylib, I have used gcc4.2.1(Apple Inc. build 5646) .
So, Try to rebuild libPythia6 by gcc4.4.1(from fink).
First , Edit makePythia6.macosx64 by emacs , Simply change gcc to gcc-4
And rebuild libPythia6…
sudo ./makePythia6.macosx64
The error message is: image not found. So there must be a typo somewhere. Does you get something when you do:
(proof) [168] otool -L $PYTHIA6/libPythia6.so
/Users/rdm/Dropbox/src/pythia6/libPythia6.so:
/Users/rdm/pythia6/libPythia6.dylib (compatibility version 0.0.0, current version 0.0.0)
/sw/lib/gcc4.4/lib/libgfortran.3.dylib (compatibility version 4.0.0, current version 4.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 125.0.0)
otool output…
/Users/hashimotokimiaki/CERN/pythia6% otool -L $PYTHIA6/libPythia6.so
/Users/hashimotokimiaki/CERN/pythia6//libPythia6.so:
/Users/hashimotokimiaki/pythia6/libPythia6.dylib (compatibility version 0.0.0, current version 0.0.0)
/usr/local/lib/libgfortran.3.dylib (compatibility version 4.0.0, current version 4.0.0)
/sw/lib/gcc4.4/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 125.0.0)
After remove “/” from $PYTHIA6 ,rebuildlibPythia6.so and ROOT.
Next , try to run tutorials/pythia/pythiaExample.C
root [0] .L pythiaExample.C
root [1] makeEventSample(1000)
dlopen error: dlopen(/Users/hashimotokimiaki/CERN/rootsys/lib/root/libEGPythia6.so, 9): Library not loaded: /Users/hashimotokimiaki/pythia6/libPythia6.dylib
Referenced from: /Users/hashimotokimiaki/CERN/rootsys/lib/root/libEGPythia6.so
Reason: image not found
Load Error: Failed to load Dynamic link library /Users/hashimotokimiaki/CERN/rootsys/lib/root/libEGPythia6.so
(int)(-1)
*** Interpreter error recovered ***
In /usr/local/lib , there are follow libs and objectfiles about gfortran
/usr/local/lib/libgfortran.2.0.0.dylib* /usr/local/lib/libgfortran.a
/usr/local/lib/libgfortran.2.dylib@ /usr/local/lib/libgfortran.dylib@
/usr/local/lib/libgfortran.3.dylib* /usr/local/lib/libgfortran.la*
And in /sw/lib/gcc4.4/lib,
/sw/lib/gcc4.4/lib/libgfortran.3.dylib* /sw/lib/gcc4.4/lib/libgfortran.dylib@
/sw/lib/gcc4.4/lib/libgfortran.a /sw/lib/gcc4.4/lib/libgfortran.la*
Here ,
/sw/lib/gcc4.4/lib/libgfortran.dylib@ → libgfortran.3.dylib
Are all those libs used by libPythia6 available on your system?
libPythia6.dylib
libgfortran.3.dylib
libgcc_s.1.dylib
libSystem.B.dylib
are exactly exist in their directry.
I can not remember why 2 different version exist.
But , execute gfortran-uninstall. So,libgfortran.2.0.0.dylib in /usr/local/lib/ is removed.Now , single version(libgfortran.3.dylib) is exist.And in /sw/lib/gcc4.4/lib , libgfortran.3.dylib exist.
root [0] .L pythiaExample.C
root [1] makeEventSample(1000)
dlopen error: dlopen(/Users/hashimotokimiaki/CERN/rootsys/lib/root/libEGPythia6.so, 9): Library not loaded: /Users/hashimotokimiaki/pythia6/libPythia6.dylib
Referenced from: /Users/hashimotokimiaki/CERN/rootsys/lib/root/libEGPythia6.so
Reason: image not found
Load Error: Failed to load Dynamic link library /Users/hashimotokimiaki/CERN/rootsys/lib/root/libEGPythia6.so
(int)(-1)
*** Interpreter error recovered ***
otool output is same ,
libPythia6.dylib:
/Users/hashimotokimiaki/pythia6/libPythia6.dylib (compatibility version 0.0.0, current version 0.0.0)
/sw/lib/gcc4.4/lib/x86_64/libgfortran.3.dylib (compatibility version 4.0.0, current version 4.0.0)
/sw/lib/gcc4.4/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 125.0.0)
ROOT 5.26/00 (trunk@31882, Dec 14 2009, 20:18:36 on macosx64)
CINT/ROOT C/C++ Interpreter version 5.17.00, Dec 21, 2008
Type ? for help. Commands must be C++ statements.
Enclose multiple statements between { }.
root [0] gSystem->Load("$PYTHIA6/libPythia6.so")
(int)0
root [1]