Skip to content

Commit

Permalink
Fix the behavior of 'rpath' option. In both cases the RPATH is always…
Browse files Browse the repository at this point in the history
… used for the build tree. If OFF, the RPATH is removed from the installation, otherwise the RPATH in the installation points to the install libdir.

Fixes ROOT-7663 - failure to compile master branch on ubuntu 15.04
  • Loading branch information
peremato committed Sep 29, 2015
1 parent 5004c3d commit a68f24a
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions cmake/modules/RootBuildOptions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -211,25 +211,25 @@ foreach(opt ${root_build_options})
endif()
endforeach()

#---Avoid creating dependencies to 'non-statndard' header files -------------------------------
#---Avoid creating dependencies to 'non-standard' header files -------------------------------
include_regular_expression("^[^.]+$|[.]h$|[.]icc$|[.]hxx$|[.]hpp$")

#---Add Installation Variables------------------------------------------------------------------
include(RootInstallDirs)

#---General Build options----------------------------------------------------------------------
# use, i.e. don't skip the full RPATH for the build tree
set(CMAKE_SKIP_BUILD_RPATH FALSE)
# when building, don't use the install RPATH already (but later on when installing)
set(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
# add the automatically determined parts of the RPATH
# which point to directories outside the build tree to the install RPATH
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
#---RPATH options-------------------------------------------------------------------------------
# When building, don't use the install RPATH already (but later on when installing)
set(CMAKE_SKIP_BUILD_RPATH FALSE) # don't skip the full RPATH for the build tree
set(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE) # use always the build RPATH for the build tree

# the RPATH to be used when installing---------------------------------------------------------
# Check whether to add RPATH to the installation (the build tree always has the RPATH enabled)
if(rpath)
set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_FULL_LIBDIR}")
set(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)
set(CMAKE_INSTALL_RPATH ${CMAKE_INSTALL_FULL_LIBDIR}) # install LIBDIR
set(CMAKE_SKIP_INSTALL_RPATH FALSE) # don't skip the full RPATH for the install tree
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE) # point to directories outside the build tree to the install RPATH
else()
set(CMAKE_SKIP_INSTALL_RPATH TRUE) # skip the full RPATH for the install tree
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH FALSE) # point to directories outside the build tree to the install RPATH
endif()


1 comment on commit a68f24a

@Danish00786
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I make the same changes in RootBuildoptions.cmake but again got the error. Needs suggestions.

[ 70%] Building CXX object math/mlp/CMakeFiles/MLP.dir/G__MLP.cxx.o
[ 70%] Building CXX object roofit/roofitcore/CMakeFiles/RooFitCore.dir/src/RooAbsCategory.cxx.o
[ 70%] Building CXX object roofit/roofitcore/CMakeFiles/RooFitCore.dir/src/RooAbsCategoryLValue.cxx.o
[ 70%] Building CXX object roofit/roofitcore/CMakeFiles/RooFitCore.dir/src/RooAbsCollection.cxx.o
#0 0x00007fcff7b59687 in __GI___waitpid (pid=3000, stat_loc=stat_loc
entry=0x7fff3941b5f8, options=options
entry=0) at ../sysdeps/unix/sysv/linux/waitpid.c:30
#1 0x00007fcff7ac4067 in do_system (line=) at ../sysdeps/posix/system.c:149
#2 0x00007fcff894cb83 in TUnixSystem::StackTrace (this=0x9cc730) at /home/danisih/root/core/unix/src/TUnixSystem.cxx:2419
#3 0x00007fcff8973db1 in DefaultErrorHandler (level=, abort_bool=, location=0x7fcff8a3d207 "TVirtualStreamerInfo::Factory", msg=0xe38940 "Cannot find the plugin handler for TVirtualStreamerInfo! However $ROOTSYS/etc/plugins/TVirtualStreamerInfo is accessible, Check the content of this directory!") at /home/danisih/root/core/base/src/TError.cxx:192
#4 0x00007fcff8973806 in ErrorHandler(Int_t, const char *, const char *, typedef __va_list_tag __va_list_tag *) (level=level
entry=6000, location=location
entry=0x7fcff8a3d207 "TVirtualStreamerInfo::Factory", fmt=fmt
entry=0x7fcff8a3d3d0 "Cannot find the plugin handler for TVirtualStreamerInfo! However $ROOTSYS/etc/plugins/TVirtualStreamerInfo is accessible, Check the content of this directory!", ap=ap
entry=0x7fff3941d828) at /home/danisih/root/core/base/src/TError.cxx:247
#5 0x00007fcff8973c52 in Fatal (location=location
entry=0x7fcff8a3d207 "TVirtualStreamerInfo::Factory", fmt=fmt
entry=0x7fcff8a3d3d0 "Cannot find the plugin handler for TVirtualStreamerInfo! However $ROOTSYS/etc/plugins/TVirtualStreamerInfo is accessible, Check the content of this directory!") at /home/danisih/root/core/base/src/TError.cxx:343
#6 0x00007fcff89484e4 in TVirtualStreamerInfo::Factory () at /home/danisih/root/core/meta/src/TVirtualStreamerInfo.cxx:181
#7 0x00007fcff891bc69 in TClass::GetStreamerInfo (this=0xcec840, version=7) at /home/danisih/root/core/meta/src/TClass.cxx:3742
#8 0x00007fcff8945377 in TStreamerBase::InitStreaming (this=0xb6de20) at /home/danisih/root/core/meta/src/TStreamerElement.cxx:658
#9 0x00007fcff89454f7 in TStreamerBase::TStreamerBase (this=0xb6de20, name=, title=, offset=) at /home/danisih/root/core/meta/src/TStreamerElement.cxx:602
#10 0x00007fcff938ad2c in TStreamerInfo::Build (this=0xe15560) at /home/danisih/root/io/io/src/TStreamerInfo.cxx:318
#11 0x00007fcff931358b in TBufferFile::WriteClassBuffer (this=0xce8be0, cl=0xce87b0, pointer=0xc9c320) at /home/danisih/root/io/io/src/TBufferFile.cxx:3965
#12 0x00007fcff9378662 in TKey::TKey (this=0xcda6b0, obj=0xc9c320, name=0xc9c339 "hpx", bufsize=1024, motherDir=) at /home/danisih/root/io/io/src/TKey.cxx:253
#13 0x00007fcff934a385 in TFile::CreateKey (this=, mother=0x7fff3941de60, obj=0xc9c320, name=0xc9c339 "hpx", bufsize=1024) at /home/danisih/root/io/io/src/TFile.cxx:960
#14 0x00007fcff93431a9 in TDirectoryFile::WriteTObject (this=0x7fff3941de60, obj=0xc9c320, name=, option=, bufsize=0) at /home/danisih/root/io/io/src/TDirectoryFile.cxx:1839
#15 0x00007fcff898452f in TObject::Write (this=0xc9c320, name=0x0, option=, bufsize=0) at /home/danisih/root/core/base/src/TObject.cxx:795
#16 0x00007fcff93414f1 in TDirectoryFile::Write (this=this
entry=0x7fff3941de60, opt=opt
entry=0, bufsize=bufsize
entry=0) at /home/danisih/root/io/io/src/TDirectoryFile.cxx:1715
#17 0x00007fcff9359bbb in TFile::Write (this=this
entry=0x7fff3941de60, opt=opt
entry=0, bufsiz=bufsiz
entry=0) at /home/danisih/root/io/io/src/TFile.cxx:2213
#18 0x0000000000400f54 in hsimple () at /home/danisih/root/test/hsimple.cxx:62
#19 0x00007fcff7a96b97 in __libc_start_main (main=0x400ba0 <main()>, argc=1, argv=0x7fff3941e298, init=, fini=, rtld_fini=, stack_end=0x7fff3941e288) at ../csu/libc-start.c:310
#20 0x0000000000400bda in _start ()
Aborted (core dumped)
CMakeFiles/hsimple.dir/build.make:60: recipe for target 'hsimple.root' failed
make[2]: *** [hsimple.root] Error 134
make[2]: *** Deleting file 'hsimple.root'
CMakeFiles/Makefile2:278: recipe for target 'CMakeFiles/hsimple.dir/all' failed
make[1]: *** [CMakeFiles/hsimple.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....

Please sign in to comment.