4

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?

4

1 回答 1

3

这个细节取决于特定包的构建系统和它使用的 libtool 版本。

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

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

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

因此,您将需要尝试一些建议的技术来摆脱 rpath,但哪种方法可行取决于您的包的具体情况。

于 2011-07-07T03:29:05.080 回答