GSI Forum
GSI Helmholtzzentrum für Schwerionenforschung

Home » PANDA » PandaRoot » Bugs, Fixes, Releases » config.sh bug
config.sh bug [message #8338] Wed, 29 April 2009 13:03 Go to next message
Anonymous Poster From: *e18.physik.tu-muenchen.de
Hi,

this issue is very old, but still not solved. When cmake is executed if anyone changes a CMakeLists.txt, I end up with /usr/lib and /usr/local/lib in my LD_LIBRARY_PATH. This way, I end up using my system wide installation of geant3, instead the one from the external packages, which is further down the LD_LIBRARY_PATH variable. So, this should be removed. And having /usr/lib in the LD_LIBRARY_PATH is not good for anything anyway.

Please fix this!! If I would add up all the time in my life I spent on fixing this issue after a make, I could probably be much more advanced on that novel I have always been writing on Wink

Cheers, Christian
Re: config.sh bug [message #8340 is a reply to message #8338] Wed, 29 April 2009 14:02 Go to previous messageGo to next message
Florian Uhlig is currently offline  Florian Uhlig
Messages: 424
Registered: May 2007
first-grade participant
From: *gsi.de
Hi Christian

I don't know why you end up with /usr/local/lib and /usr/lib in the LD_LIBRARY_PATH. This can only be if these two libraries are in the LD_LIBRARY_PATH already when you run cmake. Can you please check this the next time before you run cmake.

In the config.sh the two directories /usr/lib and /usr/X11R6/lib are added to the LD_LIBRARY_PATH. I don't remember why this is done, but this was on user request. The two directories were added at the begining of the LD_LIBRARY_PATH which is definitely an error. I moved the two directories to end end of the LD_LIBRARY_PATH after all the other directories. This should cure your problem.

In the end we should test to remove the two directories completely, but i don't want to do this untested, so this will need some time.

Ciao

Florian
Re: config.sh bug [message #8404 is a reply to message #8340] Tue, 05 May 2009 10:29 Go to previous messageGo to next message
Anonymous Poster From: *e18.physik.tu-muenchen.de
Hi Florian,

well I wasnt completely right in my mail before, it wasnt /usr/local it was /usr/X11R6. Before I include config.sh my LD_LIBRARY_PATH is completely empty.
Then, after any CMakeLists.txt was changed, make makes a new config.sh which makes LD_LIBRARY_PATH into this:


/usr/lib:/usr/X11R6/lib:/home/hoeppi/build/lib:/home/hoeppi/build/lib:/h ome/hoeppi/fairsoft/tools/root/lib:/home/hoeppi/fairsoft/generators/lib: /home/hoeppi/fairsoft/generators/lib:/home/hoeppi/fairsoft/transport/gea nt3/lib/tgt_linuxx8664gcc:/home/hoeppi/fairsoft/transport/geant4/lib/Lin ux-g++:/home/hoeppi/fairsoft/transport/geant4_vmc/lib/tgt_linuxx8664gcc: /home/hoeppi/fairsoft/transport/vgm/lib:/home/hoeppi/fairsoft/cern/clhep /lib

Can you please investigate this? Are you sure your LD_LIBRARY_PATH doesnt contain it?

Cheers, Christian
Re: config.sh bug [message #8406 is a reply to message #8404] Tue, 05 May 2009 10:34 Go to previous messageGo to next message
Anonymous Poster From: *e18.physik.tu-muenchen.de
Hi again,

actually I found the bug, but I dont have the write permissions to commit it. Can you please apply the following patch:

hoeppi@hoeppi:~/trunk$ svn diff cmake/modules/WriteConfigFile.cmakeIndex: cmake/modules/WriteConfigFile.cmake
===================================================================
--- cmake/modules/WriteConfigFile.cmake (revision 5370)
+++ cmake/modules/WriteConfigFile.cmake (working copy)
@@ -9,7 +9,7 @@
SET(FAIRLIBDIR ${CMAKE_CURRENT_BINARY_DIR}/lib)

IF(CMAKE_SYSTEM_NAME MATCHES Linux)
- SET(LD_LIBRARY_PATH /usr/lib /usr/X11R6/lib ${FAIRLIBDIR} ${LD_LIBRARY_PATH})
+ SET(LD_LIBRARY_PATH ${FAIRLIBDIR} ${LD_LIBRARY_PATH})
ELSE(CMAKE_SYSTEM_NAME MATCHES Linux)
IF(CMAKE_SYSTEM_NAME MATCHES Darwin)
SET(LD_LIBRARY_PATH ${FAIRLIBDIR} ${LD_LIBRARY_PATH})
@@ -115,7 +115,7 @@
SET(FAIRLIBDIR ${CMAKE_CURRENT_BINARY_DIR}/lib)

IF(CMAKE_SYSTEM_NAME MATCHES Linux)
- SET(LD_LIBRARY_PATH /usr/lib /usr/X11R6/lib ${FAIRLIBDIR} ${LD_LIBRARY_PATH})
+ SET(LD_LIBRARY_PATH ${FAIRLIBDIR} ${LD_LIBRARY_PATH})
ELSE(CMAKE_SYSTEM_NAME MATCHES Linux)
IF(CMAKE_SYSTEM_NAME MATCHES Darwin)
SET(LD_LIBRARY_PATH ${FAIRLIBDIR} ${LD_LIBRARY_PATH})
hoeppi@hoeppi:~/trunk$


As you can see it just removes /usr/lib and /usr/X11R6/lib in two places, nothing else.

Cheers, Christian
Re: config.sh bug [message #8408 is a reply to message #8404] Tue, 05 May 2009 10:51 Go to previous messageGo to next message
Florian Uhlig is currently offline  Florian Uhlig
Messages: 424
Registered: May 2007
first-grade participant
From: 119.93.18*
Hi Christian

I have already changed the file last week. I did not delete the two directories, but
put them to the end of the list. I did this because i am unsure why this two directories are in the path. So updating to the head version of the file should solve your problem.

Ciao

Florian
Re: config.sh bug [message #8409 is a reply to message #8408] Tue, 05 May 2009 10:54 Go to previous message
Anonymous Poster From: *e18.physik.tu-muenchen.de
Hi,

thanks. But I am quite sure that putting these dirs in LD_LIBRARY_PATH is a mistake. The linux system looks in them anyway. I think it is save to remove them.

Cheers, Christian
Previous Topic: Error while using runReco.C
Next Topic: Error: dlopen error when running the root macro to execute MC
Goto Forum:
  


Current Time: Tue Nov 05 06:06:15 CET 2024

Total time taken to generate the page: 0.01013 seconds