The application is a Firefox plugin (loaded from $HOME/.mozilla/plugins), so wrapper script that sets LD_LIBRARY_PATH is not an easy option.
该应用程序是一个Firefox插件(从$ HOME / .mozilla / plugins加载),因此设置LD_LIBRARY_PATH的包装脚本不是一个简单的选择。
RPATH, as far as I know, cannot refer to $HOME and can be only absolue path.
据我所知,RPATH不能引用$ HOME而只能是绝对路径。
Firefox tries to dlopen it's plugin from ~/.mozilla/plugins but fails (because it depends on shared libraries installed somewhere in the user home directory).
Firefox试图从〜/ .mozilla / plugins中删除它的插件但是失败了(因为它依赖于安装在用户主目录中某处的共享库)。
Modifying Firefox menu item to provide a wrapper (with LD_LIBRARY_PATH) around Firefox is too hacky.
修改Firefox菜单项以在Firefox周围提供包装器(带有LD_LIBRARY_PATH)实在太过分了。
What should installer script do (without root access) to make standard firefox load plug-ins that depends on out shared library?
安装程序脚本应该做什么(没有root访问权限)来制作依赖于共享库的标准firefox加载插件?
- Should I just try to make embed everything into that .so to remove dependencies?
- 我是否应该尝试将所有内容嵌入到那里。以删除依赖项?
- Should I try to make installer script to finish linking or patch RPATH during the installation phase?
- 我是否应该尝试在安装阶段使安装程序脚本完成链接或修补RPATH?
1 个解决方案
#1
4
Set RPATH to $ORIGIN/lib
so the loader will look for libraries relative to the my file.
将RPATH设置为$ ORIGIN / lib,以便加载器查找相对于我的文件的库。
Script just unpacks the plugin to $HOME/.mozilla/plugins/myplugin.so
and libraries to $HOME/.mozilla/plugins/lib/
脚本只需将插件解压缩到$ HOME / .mozilla / plugins / myplugin.so和库到$ HOME / .mozilla / plugins / lib /
rpath can be specified to linker though the gcc by adding Wl,-rpath,'$ORIGIN/lib'
($
should be doubled in a Makefile) and can also be changed after compilation by patchelf
.
通过添加Wl,-rpath,'$ ORIGIN / lib'($应该在Makefile中加倍),可以通过gcc将rpath指定给链接器,也可以在patchelf编译后更改。
#1
4
Set RPATH to $ORIGIN/lib
so the loader will look for libraries relative to the my file.
将RPATH设置为$ ORIGIN / lib,以便加载器查找相对于我的文件的库。
Script just unpacks the plugin to $HOME/.mozilla/plugins/myplugin.so
and libraries to $HOME/.mozilla/plugins/lib/
脚本只需将插件解压缩到$ HOME / .mozilla / plugins / myplugin.so和库到$ HOME / .mozilla / plugins / lib /
rpath can be specified to linker though the gcc by adding Wl,-rpath,'$ORIGIN/lib'
($
should be doubled in a Makefile) and can also be changed after compilation by patchelf
.
通过添加Wl,-rpath,'$ ORIGIN / lib'($应该在Makefile中加倍),可以通过gcc将rpath指定给链接器,也可以在patchelf编译后更改。