Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在为 ARM 平台进行交叉编译。在我链接的许多库文件中,只有极少数有 rpath。
我不知道它来自哪里,因为我将我需要的所有库复制到一个文件夹中,然后使用 Netbeans 将它们添加到项目中(在 Ubuntu 下使用 Linaro 编译器)。即使我从命令行编译,输出也是一样的。
我尝试了 patchelf,但它没有删除 rpath。该程序本身可以工作(例如,如果我在搜索库时创建了它正在寻找的路径)。
知道如何解决吗?
您是否尝试过使用chrpath?,它可能在您的分发包中可用
如果你使用 cmake,
There is a builtin CMake option CMAKE_SKIP_RPATH, if it is enabled all other RPATH related options are ignored, no RPATH is built into anything.
http://www.cmake.org/Wiki/CMake_RPATH_handling