FTBFS Emacs23.2 on Natty from multiarch implemented

Bug #746510 reported by Hajime Mizuno
26
This bug affects 3 people
Affects Status Importance Assigned to Milestone
emacs23 (Ubuntu)
Fix Released
Medium
Unassigned
Oneiric
Fix Released
Medium
Unassigned

Bug Description

Binary package hint: emacs23

FTBFS Emacs23.2 on Natty.
The full path to /usr/lib/crt1.o,/usr/lib/crtn.o and /usr/lib/crti.o is coded to the source code of emacs.
(ref: #define START_FILES macro in src/s/gnu-linux.h)

However, passing has been changed to /usr/lib/i386-linux-gnu or /usr/lib/x86_64-linux-gnu in libc6-dev of natty for multiarch.

Steve Langasek (vorlon)
Changed in emacs23 (Ubuntu):
status: New → Triaged
importance: Undecided → Medium
tags: added: ftbfs multiarch
Revision history for this message
Steve Langasek (vorlon) wrote :

This has been worked around in libc6-dev by re-adding compat symlinks for /usr/lib/crt*.o for the time being - as a lot more than just emacs23 cares about this (e.g., any upstream toolchain builds also care).

We will still want to fix emacs23 to not depend on this location, since we will have to drop these symlinks in order to have multiarch co-installable -dev packages.

Revision history for this message
Glenn Morris (rgm+lp) wrote :

Newer versions of Emacs have a --with-crt-dir option that you can pass to configure.

Is there a query that the configure script can run to get the location of the crt files,
so that it works by default?

Revision history for this message
Steve Langasek (vorlon) wrote : Re: [Bug 746510] Re: FTBFS Emacs23.2 on Natty from multiarch implemented

Hi Glenn,

On Sat, Apr 02, 2011 at 08:58:06PM -0000, Glenn Morris wrote:
> Newer versions of Emacs have a --with-crt-dir option that you can pass
> to configure.

> Is there a query that the configure script can run to get the location of the crt files,
> so that it works by default?

The trouble is that gcc and binutils both use a search path to find the crt
files, not a single directory. The only query for determining which
directory the crt files are in is to walk all of the directories in the
default linker path until you find them! There is no other way to be sure
which directory they'll be in; libc itself is the only package that knows
for sure, and it has no interface for querying this.

--
Steve Langasek Give me a lever long enough and a Free OS
Debian Developer to set it on, and I can move the world.
Ubuntu Developer http://www.debian.org/
<email address hidden> <email address hidden>

tags: added: oneiric
Changed in emacs23 (Ubuntu):
milestone: none → oneiric-alpha-2
Changed in emacs23 (Ubuntu):
milestone: oneiric-alpha-2 → oneiric-alpha-3
Changed in emacs23 (Ubuntu Oneiric):
milestone: oneiric-alpha-3 → none
tags: added: main
Revision history for this message
Michael Hope (michaelh1) wrote :

@Steve re: --with-crt-dir:

You can use gcc's --print-file-name=crtn.o to have GCC search for you. Doing this on Natty gives:

michaelh@ursa1:~$ gcc --print-file-name=crtn.o
/usr/lib/arm-linux-gnueabi/gcc/arm-linux-gnueabi/4.5.2/../../../crtn.o

Revision history for this message
pnathan (pnathan) wrote :

emacs 23.3a compile from source is broken on bog-standard Onieric Ocelot (installed yesterday):

./configure yields:
checking for ... [snip]

configure: checking the machine- and system-dependent files to find out
 - which libraries the lib-src programs will want, and
 - whether the GNU malloc routines are usable...
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... no
configure: error: crt*.o not found. Use --with-crt-dir to specify the location.

Then -

paulnath@paulnathlinux:~/temp/emacs-23.3$ gcc --print-file-name=crtn.o
/usr/lib/gcc/x86_64-linux-gnu/4.6.1/../../../x86_64-linux-gnu/crtn.o
paulnath@paulnathlinux:~/temp/emacs-23.3$ ./configure --with-crt-dir /usr/lib/gcc/x86_64-linux-gnu/4.6.1/../../../x86_64-linux-gnu/
configure: WARNING: you should use --build, --host, --target
configure: WARNING: invalid host type: /usr/lib/gcc/x86_64-linux-gnu/4.6.1/../../../x86_64-linux-gnu/
checking build system type... Invalid configuration `/usr/lib/gcc/x86_64-linux-gnu/4.6.1/../../../x86_64-linux-gnu/': machine `/usr/lib/gcc/x86_64-linux-gnu/4.6.1/../../../x86_64' not recognized
configure: error: /bin/bash /home/paulnath/temp/emacs-23.3/config.sub /usr/lib/gcc/x86_64-linux-gnu/4.6.1/../../../x86_64-linux-gnu/ failed

paulnath@paulnathlinux:~/temp/emacs-23.3$ uname -a
Linux paulnathlinux 3.0.0-12-generic #20-Ubuntu SMP Fri Oct 7 14:56:25 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux

---
g++ version

Architecture: amd64
Source: gcc-defaults (1.107ubuntu5)
Version: 4:4.6.1-2ubuntu5

---
libc6-dev

Architecture: amd64
Source: eglibc
Version: 2.13-20ubuntu5

Revision history for this message
Steve Langasek (vorlon) wrote :

The emacs23 package in unstable and oneiric builds successfully against the multiarch libc6-dev, using the --with-crt-dir option.

For upstream builds, it should suffice to call ./configure --with-crt-dir=$(readlink -f $(dirname $(gcc --print-file-name=crtn.o))).

Changed in emacs23 (Ubuntu Oneiric):
status: Triaged → Fix Released
Changed in emacs23 (Ubuntu):
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.