Issue running executable on MacOS-X

Hi,

I’ve running root 5.26.00b on macOS-X 10.6.3.

I’m building one sharelib with rootcint -> libNtuple.so containing the classes to interpret a root ntuple [see MakefilelibNtuple.txt]
I’m building another lib -> libAnaUtils.so and executable (NtMerge) which depends on libNtuple [see MakefilelibAnaUtils.txt]

When i try to run the executable, I’m getting the following error.
./NtMerge -s fileList.txt
dyld: Library not loaded: /Users/anyes/MyWork/Atlas-Ana/UCINtuple-v07devel/UCINtuple/Ntuple/cmt/
Referenced from: /Users/anyes/MyWork/Atlas-Ana/UCINtuple-v07devel/UCIAnaCommon/AnaUtils/run/./NtMerge
Reason: no suitable image found. Did find:
/Users/anyes/MyWork/Atlas-Ana/UCINtuple-v07devel/UCINtuple/Ntuple/cmt/: not a file
/usr/local/lib/: not a file
/usr/lib/: not a file
zsh: trace trap ./NtMerge -s fileList.txt

This work fine on SLC5, so the issue is related to doing this on MacOS-X.

For the Root config, only ROOTSYS is set (ie no LD_LIBRARY_PATH or DYLD_LIBRARY_PATH)

I’ve tried setting:
echo $LD_LIBRARY_PATH
/Users/anyes/MyWork/Atlas-Ana/UCINtuple-v07devel/lib
echo $DYLD_LIBRARY_PATH
/Users/anyes/MyWork/Atlas-Ana/UCINtuple-v07devel/lib

I though dyld libraries were not used on macosX anymore.

where (I’ve tried w/ &w/o the links for dylib)
lib
total 64
lrwxr-xr-x 1 anyes 502 19 Apr 17 15:31 GoodRunsListsLib.dyld -> GoodRunsListsLib.so
lrwxr-xr-x 1 anyes 502 59 Apr 17 14:51 GoodRunsListsLib.so -> …/DataQuality/GoodRunsLists/StandAlone/GoodRunsListsLib.so
lrwxr-xr-x 1 anyes 502 14 Apr 17 15:32 libAnaUtils.dyld -> libAnaUtils.so
lrwxr-xr-x 1 anyes 502 43 Apr 20 11:29 libAnaUtils.so -> …/UCIAnaCommon/AnaUtils/run/libAnaUtils.so
lrwxr-xr-x 1 anyes 502 18 Apr 17 15:21 libNtAnaExample.dyld -> libNtAnaExample.so
lrwxr-xr-x 1 anyes 502 38 Apr 17 19:35 libNtAnaExample.so -> …/NtAnaExample/run/libNtAnaExample.so
lrwxr-xr-x 1 anyes 502 12 Apr 17 15:21 libNtuple.dyld -> libNtuple.so
lrwxr-xr-x@ 1 anyes 502 43 Apr 16 14:01 libNtuple.so -> …/UCINtuple/Ntuple/standalone/libNtuple.so

the error becomes:
./NtMerge -s fileList.txt
dyld: Library not loaded: /Users/anyes/MyWork/Atlas-Ana/UCINtuple-v07devel/UCINtuple/Ntuple/cmt/
Referenced from: /Users/anyes/MyWork/Atlas-Ana/UCINtuple-v07devel/UCIAnaCommon/AnaUtils/run/./NtMerge
Reason: no suitable image found. Did find:
/Users/anyes/MyWork/Atlas-Ana/UCINtuple-v07devel/lib/: not a file
/Users/anyes/MyWork/Atlas-Ana/UCINtuple-v07devel/UCINtuple/Ntuple/cmt/: not a file
/usr/local/lib/: not a file
/usr/lib/: not a file
zsh: trace trap ./NtMerge -s fileList.txt

Any ideas how I can fix this ?

Cheers
-a
MakefilelibNtuple.txt (3.01 KB)
MakefilelibAnaUtils.txt (2.86 KB)

Hi,

When using $ROOTSYS/test/Makefile.arch on MacOS the library link command must be something like: $(CXX) $(ROOTLDFLAGS) $(SOFLAGS)lib$(PKG).so $(CXXFLAGS) \ -I.. -I$(OUTDIR) -I../$(PKG) -L/usr/lib $(OUTDIR)/$(PKG)Dict.cxx -o $(OUTDIR)/lib$(PKG).soie. you need to follow $(SOFLAG) with the library name without any spaces between the 2. (See $ROOTSYS/test/Makefile for a comple example).

Cheers,
Philippe.