如何让 automake、libtool 和 rpmbuild 协同工作

发布于 2024-11-17 08:32:40 字数 445 浏览 4 评论 0原文

我正在尝试为我的包创建 RPM,该包是使用 automakelibtool 构建的,但我遇到了一个问题:rpmbuild发现包的已安装程序包含包的共享库的安装目录的路径名时中止(由于 automake 使用了 -rpath 选项ld)。

据我所知,rpmbuild 这样做是为了保证包是可重定位的。我的问题是该怎么办。我可以消除可共享库的使用(并失去它们的好处),或者我可以告诉 automake 不要安装可共享库(这将阻止它使用 -rpath 选项) )然后无论如何都安装它们。后一个选项的成本是它要求用户始终拥有正确设置的LD_LIBRARY_PATH环境变量——而且它看起来有点混乱。

还有其他选择吗?

你会怎么办?

I'm trying to create an RPM of my package, which is built using automake and libtool, and I've encountered a problem: rpmbuild aborts upon discovering that the installed programs of the package contain the pathname of the installation directory for the package's sharable libraries (due to automake's use of the -rpath option of ld).

I understand that rpmbuild does this in order to guarantee that the package is relocatable. My question is what to do about it. I could eliminate the use of sharable libraries (and lose their benefits) or I could tell automake to not install the sharable libraries (which would stop it from using the -rpath option) and then install them anyway. The cost of this latter option is that it would require that the user always have a correctly-set LD_LIBRARY_PATH environment variable -- plus it seems like a bit of a kludge.

Is there another option?

What would you do?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

送你一个梦 2024-11-24 08:32:40

其详细信息取决于特定包的构建系统及其使用的 libtool 版本。

以下是 Fedora 的相关打包指南:http://fedoraproject.org/wiki/PackagingGuidelines#Beware_of_Rpath

这是来自 Debian 的类似页面: http://wiki.debian.org/RpathIssue

维基百科还有一些相关链接:http://en.wikipedia.org/wiki/Rpath_(linking)

因此,您需要尝试一些建议的技术来摆脱 rpath,但哪一种有效取决于关于具体情况您的包裹。

The details of this depend on the particular package's build system and which libtool version it is using.

Here are the relevant packaging guidelines from Fedora: http://fedoraproject.org/wiki/PackagingGuidelines#Beware_of_Rpath

Here is the analogous page from Debian: http://wiki.debian.org/RpathIssue

Wikipedia also has some relevant links: http://en.wikipedia.org/wiki/Rpath_(linking)

So you will need to try a few of the suggested techniques for getting rid of the rpath, but which one will work depends on the specifics of your package.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文