Fork me on GitHub

Opened 9 years ago

Last modified 9 years ago

#774 new Enhancement

compilation on mac with default binary.

Reported by: olivier Owned by:
Priority: minor Milestone:
Component: Delphes code Version: Delphes 3
Keywords: Cc:

Description

Hi,

In order to make Delphes to work, I had to modify the makefile.
My installation is completely standard (root from the binary)

My modification was the following:
change:
DELPHES_LIBS = $(shell $(RC) --libs) -lEG $(SYSLIBS)
to:
DELPHES_LIBS = $(shell $(RC) --libs) -lEG $(SYSLIBS) -Wl,-rpath,/Applications/root_v6.04.08/lib/

If you didn't make that move the error was:
dyld: Library not loaded: @rpath/libCore.so

Referenced from: /Users/omatt/Documents/eclipse/2.3.4/Delphes/DelphesSTDHEP
Reason: image not found

Change History (8)

comment:1 by olivier, 9 years ago

Thanks in advance,

Olivier

comment:2 by Pavel Demin, 9 years ago

Hi Olivier,

Normally, the -Wl,-rpath part is not necessary if you setup the environment variables as described at:

https://root.cern.ch/root/EnvVars.html

Only I'm not sure if it's DYLD_LIBRARY_PATH or just LD_LIBRARY_PATH.

Cheers,

Pavel

comment:3 by olivier, 9 years ago

Hi Pavel,

both the DYLD_LIBRARY_PATH and LD_LIBRARY_PATH where set correctly and it was still returning the above error.

you can see here part of my .bashrc:

#path root
. /Applications/root_v6.04.08/bin/thisroot.sh

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$BATINSTALLDIR/lib:/Applications/root_v6.04.08/lib
export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:/Applications/root_v6.04.08/lib

with this .bashrc and the standard makefile, I reproduce the crash of linking mention above.

[@pb-d-128-141-232-47 2.3.3]$ echo $DYLD_LIBRARY_PATH
/Applications/root_v6.04.08/lib/:/Applications/root_v6.04.08/lib:/Applications/root_v6.04.08/lib

Cheers,

Olivier

comment:4 by olivier, 9 years ago

Hi Pavel,

I still get the problem today when trying to install Delphes today (via madgraph).
What's your plan about this?

On my side, I can edit the makefile automatically as soon as someone tries to install Delphes via madgraph. But I guess it will be better if you do that on your side.

Cheers,

Olivier

comment:5 by Pavel Demin, 9 years ago

Hi Olivier,

Unfortunately, my test MacBook was stolen from my office and I can't debug this problem.

I'd prefer not to add any hard-coded paths (like /Applications/root_v6.04.08/lib/) to Makefile. For example, on my test MacBook, ROOT was installed to $HOME/root.

Any other ideas?

Cheers,

Pavel

Last edited 9 years ago by Pavel Demin (previous) (diff)

comment:6 by olivier, 9 years ago

Hi Pavel,

Of course hardcoding the path is a bad idea.
But using something like:
-Wl,-rpath,$ROOTSYS/lib/

For some reason the above syntax do not seems to work but I guess that something similar in spirit can be done (or at worse I can automatically edit the Makefile when installing Delphes via madgraph)

Cheers,

Olivier

comment:7 by olivier, 9 years ago

Hi,

I have change the madgraph installer to automatically add that line (with the correct ROOTSYS dependence) when installing Delphes. This will be part of 2.3.4 release.

Cheers,

Olivier

comment:8 by mawatari, 9 years ago

Hi Olivier,

I just note that, as I posted at #871, your modification doesn't work for me. Kentarou

Note: See TracTickets for help on using tickets.