Invalid rpaths + fix (1.0.4)
Hi, I was reworking the freeswitch.spec file to make it build an RPM on Fedora 11 and noticed the following: [..snip a gazillion previous ones..] ERROR 0002: file '/opt/freeswitch/mod/mod_sndfile.so' contains an invalid rpath '/opt/freeswitch/mod' in [/opt/freeswitch/lib64:/opt/freeswitch/mod] [..snip a gazillion more..] To solve this issue I had to add in the spec file after configure the following lines: # kill rpath madness in the top level libtool sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool # and fix it in the libtool in libs/openzap too sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libs/openzap/libtool sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libs/openzap/libtool Maybe this could be done on libtool in trunk? If I need to report this in Jira please let me know. Regards, Patrick
While that mod doesn't need that in the rpath, some others do. What exactly is invalid about it? On Aug 9, 2009, at 3:18 PM, Patrick <freeswitch- list@puzzled.xs4all.nl> wrote:
Hi,
I was reworking the freeswitch.spec file to make it build an RPM on Fedora 11 and noticed the following:
[..snip a gazillion previous ones..]
ERROR 0002: file '/opt/freeswitch/mod/mod_sndfile.so' contains an invalid rpath '/opt/freeswitch/mod' in [/opt/freeswitch/lib64:/opt/freeswitch/mod]
[..snip a gazillion more..]
To solve this issue I had to add in the spec file after configure the following lines:
# kill rpath madness in the top level libtool sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""| g' libtool sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
# and fix it in the libtool in libs/openzap too sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""| g' libs/openzap/libtool sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libs/openzap/libtool
Maybe this could be done on libtool in trunk? If I need to report this in Jira please let me know.
Regards, Patrick
_______________________________________________ FreeSWITCH-dev mailing list FreeSWITCH-dev@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev http://www.freeswitch.org
On 08/10/2009 06:35 AM, Michael Jerris wrote:
While that mod doesn't need that in the rpath, some others do. What exactly is invalid about it?
Quoting from http://fedoraproject.org/wiki/Packaging/Guidelines#Beware_of_Rpath "Sometimes, code will hardcode specific library paths when linking binaries (using the -rpath or -R flag). This is commonly referred to as an rpath, and in Fedora it is forbidden." Since Red Hat follows the Fedora Packaging Guidelines this applies to RHEL & CentOS too. Please forgive my ignorance but couldn't a file like /etc/ld.so.conf.d/freeswitch.conf which specifies the libs not solve this? That would work for Fedora, RHEL & CentOS. Regards, Patrick
This kills any ability to have multiple versions installed at the same time. On Aug 10, 2009, at 9:11 AM, Patrick <freeswitch- list@puzzled.xs4all.nl> wrote:
On 08/10/2009 06:35 AM, Michael Jerris wrote:
While that mod doesn't need that in the rpath, some others do. What exactly is invalid about it?
Quoting from http://fedoraproject.org/wiki/Packaging/Guidelines#Beware_of_Rpath
"Sometimes, code will hardcode specific library paths when linking binaries (using the -rpath or -R flag). This is commonly referred to as an rpath, and in Fedora it is forbidden."
Since Red Hat follows the Fedora Packaging Guidelines this applies to RHEL & CentOS too.
Please forgive my ignorance but couldn't a file like /etc/ld.so.conf.d/freeswitch.conf which specifies the libs not solve this? That would work for Fedora, RHEL & CentOS.
Regards, Patrick
_______________________________________________ FreeSWITCH-dev mailing list FreeSWITCH-dev@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev http://www.freeswitch.org
Pretty much all of the ones you see the errors on will need rpath, although not the one you see in that error message, but others. Mike On Aug 10, 2009, at 6:01 PM, Patrick wrote:
On 08/10/2009 09:08 PM, Michael Jerris wrote:
This kills any ability to have multiple versions installed at the same time.
That makes sense. If you know which binaries require rpaths then I can exclude those from the purge in the spec file. Would that be ok?
Regards, Patrick
_______________________________________________ FreeSWITCH-dev mailing list FreeSWITCH-dev@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev http://www.freeswitch.org
participants (3)
-
Brian West
-
Michael Jerris
-
Patrick