GNU bug report logs - #8497
Bug#620795: emacs23: Makefile generation with cpp mangles multiarch include paths (impending FTBFS)

Previous Next

Package: emacs;

Reported by: Rob Browning <rlb <at> defaultvalue.org>

Date: Thu, 14 Apr 2011 03:57:02 UTC

Severity: normal

Merged with 8520, 8543, 8637, 8673, 8808

Found in version 23.3

Fixed in version 24.1

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 8497 in the body.
You can then email your comments to 8497 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#8497; Package emacs. (Thu, 14 Apr 2011 03:57:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Rob Browning <rlb <at> defaultvalue.org>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Thu, 14 Apr 2011 03:57:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Rob Browning <rlb <at> defaultvalue.org>
To: bug-gnu-emacs <at> gnu.org
Cc: 620795-forwarded <at> bugs.debian.org,
	Steve Langasek <steve.langasek <at> canonical.com>, 620795 <at> bugs.debian.org
Subject: Re: Bug#620795: emacs23: Makefile generation with cpp mangles
	multiarch include paths (impending FTBFS)
Date: Wed, 13 Apr 2011 22:56:03 -0500
(If possible, please preserve the 620795-forwarded address in any replies.)

Debian is likely to migrate to multiarch, and it appears that the
transition will probably break the Emacs build process.

The problem is that Emacs uses cpp to process the Makefiles, and with
multiarch, include paths will include strings like "i386" that cpp will
replace with nonsensical values. i.e.

  -I/usr/lib/i386-linux-gnu/glib-2.0 -> -I/usr/lib/1-linux-gnu/glib-2.0

Steve Langasek <steve.langasek <at> canonical.com> writes:

> Having begun to convert libraries over to multiarch in Ubuntu, we've found
> emacs23 among the packages which fails to build.  This is because the
> two-stage, autoconf+cpp generation of src/Makefile and lib-src/Makefile
> results in strings like "-I/usr/lib/i386-linux-gnu/glib-2.0" being seen as
> input to cpp... which has "i386" as a macro defined to "1".  So unless these
> macros are undefined, the path that winds up in the Makefile is broken and
> results in a build failure.
>
> The attached patch partially addresses this by undefining any macros that
> happen to exist for the <cpu> portion of the architecture triplet.  Only
> architectures for which Ubuntu currently builds are handled here, however;
> for Debian either a more comprehensive list or a generic fix is needed. 
> It's possible that passing -fdirectives-only to cpp would solve this, but I
> haven't tested.

Please see http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=620795 for
additional information.

Thanks
-- 
Rob Browning
rlb @defaultvalue.org and @debian.org
GPG as of 2002-11-03 14DD 432F AE39 534D B592 F9A0 25C8 D377 8C7E 73A4




bug Marked as found in versions 23.3. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Thu, 14 Apr 2011 04:20:03 GMT) Full text and rfc822 format available.

bug Marked as fixed in versions 24.1. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Thu, 14 Apr 2011 04:20:03 GMT) Full text and rfc822 format available.

Reply sent to Eli Zaretskii <eliz <at> gnu.org>:
You have taken responsibility. (Thu, 14 Apr 2011 04:47:01 GMT) Full text and rfc822 format available.

Notification sent to Rob Browning <rlb <at> defaultvalue.org>:
bug acknowledged by developer. (Thu, 14 Apr 2011 04:47:02 GMT) Full text and rfc822 format available.

Message #14 received at 8497-done <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Rob Browning <rlb <at> defaultvalue.org>
Cc: 620795-forwarded <at> bugs.debian.org, 8497-done <at> debbugs.gnu.org,
	steve.langasek <at> canonical.com, 620795 <at> bugs.debian.org
Subject: Re: bug#8497: Bug#620795: emacs23: Makefile generation with cpp
	mangles multiarch include paths (impending FTBFS)
Date: Thu, 14 Apr 2011 00:46:06 -0400
> From: Rob Browning <rlb <at> defaultvalue.org>
> Date: Wed, 13 Apr 2011 22:56:03 -0500
> Cc: 620795-forwarded <at> bugs.debian.org,
> 	Steve Langasek <steve.langasek <at> canonical.com>, 620795 <at> bugs.debian.org
> 
> 
> (If possible, please preserve the 620795-forwarded address in any replies.)
> 
> Debian is likely to migrate to multiarch, and it appears that the
> transition will probably break the Emacs build process.
> 
> The problem is that Emacs uses cpp to process the Makefiles

It no longer does in the development trunk.  However, that change is
not (and probably will not be) in the emacs-23 release branch, only in
Emacs 24 when that is released.

So I'm closing this bug.




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#8497; Package emacs. (Sat, 16 Apr 2011 01:52:01 GMT) Full text and rfc822 format available.

Message #17 received at 8497 <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: Rob Browning <rlb <at> defaultvalue.org>
Cc: Steve Langasek <steve.langasek <at> canonical.com>, 8497 <at> debbugs.gnu.org
Subject: Re: bug#8497: Bug#620795: emacs23: Makefile generation with cpp
	mangles multiarch include paths (impending FTBFS)
Date: Fri, 15 Apr 2011 21:51:00 -0400
Rob Browning wrote:

> (If possible, please preserve the 620795-forwarded address in any replies.)

Sorry, not so long as bug#63995 exists.

>> The attached patch partially addresses this by undefining any macros that
>> happen to exist for the <cpu> portion of the architecture triplet.

Note the following in configure.in attempts to do this kind of thing already:

    # Now get this: Some word that is part of the ${srcdir} directory name
    # or the ${configuration} value might, just might, happen to be an
    # identifier like `sun4' or `i386' or something, and be predefined by
    # the C preprocessor to some helpful value like 1, or maybe the empty
    # string.  Needless to say consequent macro substitutions are less
    # than conducive to the makefile finding the correct directory.
    [cpp_undefs="`echo $srcdir $configuration $canonical unix |
      sed -e 's/[^a-zA-Z0-9_]/ /g' -e 's/^/ /' -e 's/  *$//' \
      -e 's/  */ -U/g' -e 's/-U[0-9][^ ]*//g'`"]


so it's not obvious to me why you need to do more (maybe $canonical is
i686-something but your directories are i386-something?).




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#8497; Package emacs. (Sat, 16 Apr 2011 02:39:02 GMT) Full text and rfc822 format available.

Message #20 received at 8497 <at> debbugs.gnu.org (full text, mbox):

From: Steve Langasek <steve.langasek <at> canonical.com>
To: Glenn Morris <rgm <at> gnu.org>
Cc: 8497 <at> debbugs.gnu.org, Rob Browning <rlb <at> defaultvalue.org>
Subject: Re: bug#8497: Bug#620795: emacs23: Makefile generation with cpp
	mangles multiarch include paths (impending FTBFS)
Date: Fri, 15 Apr 2011 19:12:18 -0700
[Message part 1 (text/plain, inline)]
On Fri, Apr 15, 2011 at 09:51:00PM -0400, Glenn Morris wrote:
> Rob Browning wrote:

> > (If possible, please preserve the 620795-forwarded address in any replies.)

> Sorry, not so long as bug#63995 exists.

> >> The attached patch partially addresses this by undefining any macros that
> >> happen to exist for the <cpu> portion of the architecture triplet.

> Note the following in configure.in attempts to do this kind of thing already:

>     # Now get this: Some word that is part of the ${srcdir} directory name
>     # or the ${configuration} value might, just might, happen to be an
>     # identifier like `sun4' or `i386' or something, and be predefined by
>     # the C preprocessor to some helpful value like 1, or maybe the empty
>     # string.  Needless to say consequent macro substitutions are less
>     # than conducive to the makefile finding the correct directory.
>     [cpp_undefs="`echo $srcdir $configuration $canonical unix |
>       sed -e 's/[^a-zA-Z0-9_]/ /g' -e 's/^/ /' -e 's/  *$//' \
>       -e 's/  */ -U/g' -e 's/-U[0-9][^ ]*//g'`"]

> so it's not obvious to me why you need to do more (maybe $canonical is
> i686-something but your directories are i386-something?).

Ah - yes, that's exactly right.  So this issue should only affect the i386
build, where the toolchain triplet != the multiarch directory.

-- 
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/
slangasek <at> ubuntu.com                                     vorlon <at> debian.org
[signature.asc (application/pgp-signature, inline)]

Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#8497; Package emacs. (Sat, 16 Apr 2011 16:31:02 GMT) Full text and rfc822 format available.

Message #23 received at 8497 <at> debbugs.gnu.org (full text, mbox):

From: Rob Browning <rlb <at> defaultvalue.org>
To: Steve Langasek <steve.langasek <at> canonical.com>
Cc: Glenn Morris <rgm <at> gnu.org>, 8497 <at> debbugs.gnu.org
Subject: Re: bug#8497: Bug#620795: emacs23: Makefile generation with cpp
	mangles multiarch include paths (impending FTBFS)
Date: Sat, 16 Apr 2011 11:29:57 -0500
Steve Langasek <steve.langasek <at> canonical.com> writes:

> On Fri, Apr 15, 2011 at 09:51:00PM -0400, Glenn Morris wrote:
>> Rob Browning wrote:
>
>> > (If possible, please preserve the 620795-forwarded address in any replies.)
>
>> Sorry, not so long as bug#63995 exists.
>
>> >> The attached patch partially addresses this by undefining any macros that
>> >> happen to exist for the <cpu> portion of the architecture triplet.
>
>> Note the following in configure.in attempts to do this kind of thing already:
>
>>     # Now get this: Some word that is part of the ${srcdir} directory name
>>     # or the ${configuration} value might, just might, happen to be an
>>     # identifier like `sun4' or `i386' or something, and be predefined by
>>     # the C preprocessor to some helpful value like 1, or maybe the empty
>>     # string.  Needless to say consequent macro substitutions are less
>>     # than conducive to the makefile finding the correct directory.
>>     [cpp_undefs="`echo $srcdir $configuration $canonical unix |
>>       sed -e 's/[^a-zA-Z0-9_]/ /g' -e 's/^/ /' -e 's/  *$//' \
>>       -e 's/  */ -U/g' -e 's/-U[0-9][^ ]*//g'`"]
>
>> so it's not obvious to me why you need to do more (maybe $canonical is
>> i686-something but your directories are i386-something?).
>
> Ah - yes, that's exactly right.  So this issue should only affect the i386
> build, where the toolchain triplet != the multiarch directory.

OK, thanks.  I'll fix that in the next Debian release.

-- 
Rob Browning
rlb @defaultvalue.org and @debian.org
GPG as of 2002-11-03 14DD 432F AE39 534D B592 F9A0 25C8 D377 8C7E 73A4




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#8497; Package emacs. (Sun, 17 Apr 2011 17:36:01 GMT) Full text and rfc822 format available.

Message #26 received at 8497 <at> debbugs.gnu.org (full text, mbox):

From: Rob Browning <rlb <at> defaultvalue.org>
To: Steve Langasek <steve.langasek <at> canonical.com>
Cc: Glenn Morris <rgm <at> gnu.org>, 8497 <at> debbugs.gnu.org
Subject: Re: bug#8497: Bug#620795: emacs23: Makefile generation with cpp
	mangles multiarch include paths (impending FTBFS)
Date: Sun, 17 Apr 2011 12:35:03 -0500
Steve Langasek <steve.langasek <at> canonical.com> writes:

> On Fri, Apr 15, 2011 at 09:51:00PM -0400, Glenn Morris wrote:

>> Note the following in configure.in attempts to do this kind of thing already:
>
>>     # Now get this: Some word that is part of the ${srcdir} directory name
>>     # or the ${configuration} value might, just might, happen to be an
>>     # identifier like `sun4' or `i386' or something, and be predefined by
>>     # the C preprocessor to some helpful value like 1, or maybe the empty
>>     # string.  Needless to say consequent macro substitutions are less
>>     # than conducive to the makefile finding the correct directory.
>>     [cpp_undefs="`echo $srcdir $configuration $canonical unix |
>>       sed -e 's/[^a-zA-Z0-9_]/ /g' -e 's/^/ /' -e 's/  *$//' \
>>       -e 's/  */ -U/g' -e 's/-U[0-9][^ ]*//g'`"]
>
>> so it's not obvious to me why you need to do more (maybe $canonical is
>> i686-something but your directories are i386-something?).
>
> Ah - yes, that's exactly right.  So this issue should only affect the i386
> build, where the toolchain triplet != the multiarch directory.

For now I've fixed this for the next upload by just adding a hard-coded
i386 after "unix".

Thanks
-- 
Rob Browning
rlb @defaultvalue.org and @debian.org
GPG as of 2002-11-03 14DD 432F AE39 534D B592 F9A0 25C8 D377 8C7E 73A4




Forcibly Merged 8497 8520. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Mon, 18 Apr 2011 18:40:02 GMT) Full text and rfc822 format available.

Forcibly Merged 8497 8520 8543. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Sun, 24 Apr 2011 21:22:02 GMT) Full text and rfc822 format available.

Forcibly Merged 8497 8520 8543 8637. Request was from Sven Joachim <svenjoac <at> gmx.de> to control <at> debbugs.gnu.org. (Sun, 08 May 2011 18:05:03 GMT) Full text and rfc822 format available.

Forcibly Merged 8497 8520 8543 8637 8673. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Sat, 14 May 2011 22:25:02 GMT) Full text and rfc822 format available.

Forcibly Merged 8497 8520 8543 8637 8673 8808. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Mon, 06 Jun 2011 06:38:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 04 Jul 2011 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 13 years and 352 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.