bugWeeChat - Bugs: bug #41525, Runtime errors due to option...

 
 

bug #41525: Runtime errors due to option CMAKE_SKIP_RPATH

Submitter:  None
Submitted:  Sun 09 Feb 2014 04:25:02 PM UTC
   
 
Category:  compilation Severity:  3 - Normal
Item Group:  compile/install Status:  None
Privacy:  Public Assigned to:  None
Originator Name:  Originator Email:  * -email is unavailable-
Open/Closed:  Open Release:  * 0.4.3
IRC nick:  cotta
* Mandatory Fields

Add a New Comment Rich Markup
   

Sun 09 Feb 2014 04:25:02 PM UTC, original submission:  

I'm trying to get weechat to run on a machine without root access. This required me to install various libraries required by weechat (such as GnuTLS) in my local home directory. 

Due to the option CMAKE_SKIP_RPATH in CMakeLists.txt [0], the RPATH header [1] is not added to the executable [2]. This results in errors like; weechat: error while loading shared libraries: libgnutls.so.28: cannot open shared object file: No such file or directory. This is caused by the dynamic linker not finding the required library, while it is installed locally. One solution is to set the environment variable LD_LIBRARY_PATH, but this is bad [3].

When the option is removed from the config file, the executable does have the RPATH header. However this is removed when it is installed (with 'make install'). The solution is to set CMAKE_INSTALL_RPATH_USE_LINK_PATH to TRUE [4].

As discussed in [1], the RUNPATH header is a better option because it allows for defining LD_LIBRARY_PATH if needed and is used when LD_LIBRARY_PATH isn't set. This option is also discussed in a CMake thread [5]. However, like it states in the thread, the 'ld' argument '--enable-new-dtags' could be giving cross platform issues. Maybe the suggested 'chrpath' solution is better in that case.

[0]: http://git.savannah.gnu.org/cgit/weechat.git/tree/CMakeLists.txt#n28
[1]: http://blog.tremily.us/posts/rpath/
[2]: http://www.cmake.org/Wiki/CMake_RPATH_handling#No_RPATH_at_all
[3]: http://xahlee.info/UnixResource_dir/_/ldpath.html
[4]: http://www.cmake.org/Wiki/CMake_RPATH_handling#Common_questions
[5]: http://www.cmake.org/pipermail/cmake/2011-August/045957.html

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

Only logged-in users can vote.

 

No changes have been made to this item

Back to the top

Powered by Savane 3.13-f8d8.
Corresponding source code