rpath

How to compile OpenSSL with relative rpath

十年热恋 提交于 2019-12-17 16:36:21
问题 I have been trying to compile openssl 1.0.0g with the following rpath: $ORIGIN/../lib64 Everytime I readelf -d apps/openssl , I am getting results like the following depending on what escaping variation I tried: \RIGIN/../lib64 RIGIN/../lib64 ORIGIN/../lib64 I want to setup my rpath without using external tools like chrpath. Is it at all possible? I will basically accept anything that does not involve using external tools like chrpath (though I would already be done with that). Ideally, I

add standard libraries to RPATH for build tree executables

 ̄綄美尐妖づ 提交于 2019-12-13 04:16:28
问题 In my work setup, my "compiler" is a shell script that sets a few environment variables and calls the actual compiler ( clang-wrapper ): #!/bin/sh export PATH=/path_to_clang_install/bin:/path_to_gcc_install/bin${PATH:+:$PATH} export LD_LIBRARY_PATH=/path_to_clang_install/lib64:/path_to_gcc_install/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}} exec /path_to_clang_install/bin/clang++ --gcc-toolchain=/path_to_gcc_install "$@" As far as I understand, cmake and ctest add all link directories to the

Lookup failure when linking using -rpath and $ORIGIN

旧巷老猫 提交于 2019-12-11 09:17:52
问题 I'm trying to learn how to use the -rpath option in GCC's linker (ld) with $ORIGIN . I'm trying the simplest example I can think of (see below), and all the links I read seem to say I'm doing it correctly. However, when I run the executable it can't find the shared object unless I run it from within $ORIGIN . Using readelf -d on the executable (main.run) shows: 0x0000000000000001 (NEEDED) Shared library: [lib/foo.so] ... 0x000000000000000f (RPATH) Library rpath: [$ORIGIN] ... The file

How to configure scons to link using rpath on mac?

元气小坏坏 提交于 2019-12-11 05:55:19
问题 It works on Ubuntu to link my task using RPATH, but on mac, it doesn't work env.Program(source = Glob("*.cpp") + Glob("../*.cpp"), LIBS = [ "l_util", "boost_system", "boost_timer", ], LIBPATH = libPath, RPATH = libPath, CPPPATH = includePath) On Ubuntu, using ldd , I can see shared libs are linked with absolute path. But using otool -L on mac gives me relative path to top dir of my Sconstruct file. Anyone setup RPATH correctly on mac using scons? 来源: https://stackoverflow.com/questions

the shared library RPATH and the binary RPATH priority

别来无恙 提交于 2019-12-07 16:34:29
问题 if a shared library is linked to a binary, and the shared library also depends on other libs , what are the priorities (linker search order) of the RPATH of the shared library and the RPATH of the binary ? Could the RPATH of the binary override the one in the shared library? and the $ORIGIN I set in the shared library RPATH refers to the lib location or the binary location? Thanks in advance. 回答1: According to my observation, if there is an application main which dynamically loads library

Custom framework not loaded dyld: Library not loaded: @rpath/Custom.framework/

旧巷老猫 提交于 2019-12-07 10:03:58
问题 I have an app with several custom dynamic frameworks which means I am using iOS 8 as the SDK on Xcode 6.2. My Mac is on Yosemite. The frameworks have Swift sources and resources. The app is distributed enterprise so I just create an IPA and distribute internally via a webpage where the user can download and install the app. The app installs and runs on iPhone 5(iOS 8.1.2), iPod Touch(iOS 8.2) and simulators BUT NOT on iPhone 6(iOS 8.1.2). The error is always dyld: Library not loaded: @rpath

CMAKE RPATH with packaging

こ雲淡風輕ζ 提交于 2019-12-07 06:27:19
问题 I am creating package using cmake I am having following structure bin/ bin1 lib/ lib1 lib2 Where lib1 and lib2 are external dynamic library. How can I set RPATH so it will automatically link with lib1 and lib2 ? 回答1: I've been fussing with cmake on this as well. Cmake uses CMAKE_SKIP_BUILD_RPATH for linking at build time and CMAKE_INSTALL_RPATH to set the rpath used when the install target is built. cmake has some good info on using its rpath mechanism: http://www.cmake.org/Wiki/CMake_RPATH

automake and custom rpath

半腔热情 提交于 2019-12-06 07:31:23
I have to ship a third-party library with an application. Because I don't want to set LD_LIBRARY_PATH by hand or require any wrapper script I want automake to set a custom rpath . Unfortunately libtool has its own -rpath option and adding -Wl,-rpath,/foo/bar to LDFLAGS only results in g++: unrecognized option '-rpath' because libtool seems to get confused with the command line options. The same happens with the alternative form -Wl,-rpath -Wl,/foo/bar . Is there any way to specify a custom rpath without libtool interference? As you said, libtool has its own -rpath option. Any reason you don't

Custom framework not loaded dyld: Library not loaded: @rpath/Custom.framework/

自闭症网瘾萝莉.ら 提交于 2019-12-05 18:15:31
I have an app with several custom dynamic frameworks which means I am using iOS 8 as the SDK on Xcode 6.2. My Mac is on Yosemite. The frameworks have Swift sources and resources. The app is distributed enterprise so I just create an IPA and distribute internally via a webpage where the user can download and install the app. The app installs and runs on iPhone 5(iOS 8.1.2), iPod Touch(iOS 8.2) and simulators BUT NOT on iPhone 6(iOS 8.1.2). The error is always dyld: Library not loaded: @rpath/Custom.framework/. Whenever I remove and add the frameworks back to try to fix it another framework pops

Reliable Deployment of Delphi-Generated Dylib on OSX

冷暖自知 提交于 2019-12-05 08:05:32
I would like to deploy a .dylib on OSX, which has been created with Delphi. This .dylib should be loadable by third-party applications . This is going to seem like a duplicate question, but after plenty of searching, I can't find an answer for it. It's the same issue as this: https://forums.embarcadero.com/thread.jspa?messageID=592417 The problem is that the .dylib requires libcgunwind.1.0.dylib , but that it cannot find it when being run from a third-party application . As a test, I tried copying libcgunwind.1.0.dylib into usr/lib , and that worked. When OSX cannot locate the .dylib, it will