Bug 253872 - hardcoded rpath in emacs
Summary: hardcoded rpath in emacs
Alias: None
Product: Fedora
Classification: Fedora
Component: emacs
Version: 9
Hardware: x86_64
OS: Linux
Target Milestone: ---
Assignee: Daniel Novotny
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2007-08-22 14:51 UTC by Miroslav Lichvar
Modified: 2009-07-14 15:16 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2009-07-14 15:16:38 UTC

Attachments (Terms of Use)
workaround to disable RPATH on x86_64 (388 bytes, patch)
2008-04-19 01:21 UTC, Brad Walker
no flags Details | Diff
Upstream workaround to disable RPATH on x86_64 (1.79 KB, patch)
2008-05-05 11:39 UTC, Brad Walker
no flags Details | Diff

Description Miroslav Lichvar 2007-08-22 14:51:05 UTC
Description of problem:
Please remove rpath from emacs binary. On x86_64 (and possibly other
architectures) it has rpath /usr/lib64.


Version-Release number of selected component (if applicable):

Steps to Reproduce:
1. objdump -x /usr/bin/emacs | grep RPATH
Actual results:
  RPATH       /usr/lib64

Expected results:

Comment 1 Brad Walker 2008-03-26 18:15:43 UTC
i386 builds correctly w/o RPATH. The root of the problem is in _AC_PATH_X_XMKMF
in autoconf. The following code in the configure script sets $ac_x_libraries as
'' on i386 and '/usr/lib64' on x86_64:

    # Screen out bogus values from the imake configuration.  They are
    # bogus both because they are the default anyway, and because
    # using them would break gcc on systems where it needs fixed includes.
    case $ac_im_incroot in
	/usr/include) ac_x_includes= ;;
	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
    case $ac_im_usrlibdir in
	/usr/lib | /lib) ;;
	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
  cd ..
  rm -f -r conftest.dir

Later this code sets the RPATH linker switch:
if test "${x_libraries}" != NONE; then
  if test -n "${x_libraries}"; then
    LD_SWITCH_X_SITE=-L`echo ${x_libraries} | sed -e "s/:/ -L/g"`
    LD_SWITCH_X_SITE_AUX=-R`echo ${x_libraries} | sed -e "s/:/ -R/g"`

Adding /usr/lib64 to 'case $ac_im_usrlibdir in /usr/lib | /lib)' fixes the RPATH.

Comment 2 Brad Walker 2008-04-19 01:21:29 UTC
Created attachment 302963 [details]
workaround to disable RPATH on x86_64

Comment 3 Chip Coldwell 2008-04-21 15:05:23 UTC
(In reply to comment #2)
> Created an attachment (id=302963) [edit]
> workaround to disable RPATH on x86_64

I'm not sure this is the right approach.  Really, it looks more like a bug in
autoconf than emacs.  Patching "configure" instead of "configure.in" means that
the changes will get clobbered by a subsequent "autoconf".


Comment 4 Brad Walker 2008-04-23 14:25:27 UTC
Yeah, fixing autoconf's definitely the ideal solution. 'autoreconf' and
'autoconf --force 'from autoconf-2.62 still produce a buggy configure script.
2.62 does fix the infinite loop in the 'mktime' check, though. I emailed the
autoconf bug mailing list about the problem:

Comment 5 Brad Walker 2008-04-24 14:48:56 UTC
Eric Blake wrote on the autoconf list

emacs won't benefit from the patch until it upgrades to using the
as-yet-unreleased autoconf 2.63, so you will have to continue to carry an
emacs-specific patch for some time

I think the workaround (attachment (id=302963)) is good for now. Once the fix
from autoconf finally trickles upstream to emacs it'll differ enough that the
patch will fail and remind you to remove it.

Comment 6 Brad Walker 2008-05-05 11:39:38 UTC
Created attachment 304522 [details]
Upstream workaround to disable RPATH on x86_64

On May 3 2008 Glenn Morris committed this patch on emacs HEAD but not the emacs
22.2 branch. The diff patchs against the emacs-22.2 tarball and fixes the
configure output and variables.

Comment 7 Bug Zapper 2008-05-14 03:08:30 UTC
Changing version to '9' as part of upcoming Fedora 9 GA.
More information and reason for this action is here:

Comment 8 Debarshi Ray 2008-11-07 19:25:24 UTC

We were informed [1] that Chip has given up ownership of this package.

[1] https://www.redhat.com/archives/fedora-devel-list/2008-November/msg00214.html

Comment 10 Bug Zapper 2009-06-09 22:46:46 UTC
This message is a reminder that Fedora 9 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 9.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '9'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 9's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 9 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 

Comment 11 Bug Zapper 2009-07-14 15:16:38 UTC
Fedora 9 changed to end-of-life (EOL) status on 2009-07-10. Fedora 9 is 
no longer maintained, which means that it will not receive any further 
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.

Note You need to log in before you can comment on or make changes to this bug.