GNU bug report logs - #9757
24.0.90; configuration and compilation for multiple architectures not possible

Previous Next

Package: emacs;

Reported by: Peter Dyballa <Peter_Dyballa <at> Freenet.DE>

Date: Fri, 14 Oct 2011 20:43:01 UTC

Severity: wishlist

Found in version 24.0.90

Done: Chong Yidong <cyd <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 9757 in the body.
You can then email your comments to 9757 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 bug-gnu-emacs <at> gnu.org:
bug#9757; Package emacs. (Fri, 14 Oct 2011 20:43:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Peter Dyballa <Peter_Dyballa <at> Freenet.DE>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Fri, 14 Oct 2011 20:43:02 GMT) Full text and rfc822 format available.

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

From: Peter Dyballa <Peter_Dyballa <at> Freenet.DE>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.0.90;
	configuration and compilation for multiple architectures not possible
Date: Fri, 14 Oct 2011 22:38:44 +0200
Hello!

Trying to set up GNU Emacs with Apple means to run on more than one target architecture configuration fails because the configure script does not use the value I set for CPP but insists on using the -E option for CC, which is not allowed in this situation:

configure:5753: checking how to run the C preprocessor
configure:5823: result: gcc-4.0 -arch ppc -arch ppc64 -arch x86_64 -mmacosx-version-min=10.4.8 -isysroot /Developer45/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4.8 -Xarch_ppc -faltivec -Xarch_ppc -mabi=altivec -Xarch_ppc -mcpu=G4 -Xarch_ppc -mtune=G4 -Xarch_ppc64 -mpowerpc-gfxopt -Xarch_ppc64 -faltivec -Xarch_ppc64 -mabi=altivec -Xarch_x86_64 -march=nocona -Xarch_x86_64 -m64 -Xarch_x86_64 -msse3 -Xarch_x86_64 -mssse3 -E -I/sw/include -L/sw/lib
configure:5843: gcc-4.0 -arch ppc -arch ppc64 -arch x86_64 -mmacosx-version-min=10.4.8 -isysroot /Developer45/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4.8 -Xarch_ppc -faltivec -Xarch_ppc -mabi=altivec -Xarch_ppc -mcpu=G4 -Xarch_ppc -mtune=G4 -Xarch_ppc64 -mpowerpc-gfxopt -Xarch_ppc64 -faltivec -Xarch_ppc64 -mabi=altivec -Xarch_x86_64 -march=nocona -Xarch_x86_64 -m64 -Xarch_x86_64 -msse3 -Xarch_x86_64 -mssse3 -E -I/sw/include -L/sw/lib  conftest.c
gcc-4.0: -E, -S, -save-temps and -M options are not allowed with multiple -arch flags
configure:5843: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "emacs"
| #define PACKAGE_TARNAME "emacs"
| #define PACKAGE_VERSION "24.0.90"
| #define PACKAGE_STRING "emacs 24.0.90"
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| #define PACKAGE "emacs"
| #define VERSION "24.0.90"
| #define SYNC_INPUT 1
| #define WIDE_EMACS_INT 1
| /* end confdefs.h.  */
| #ifdef __STDC__
| # include <limits.h>
| #else
| # include <assert.h>
| #endif
| 		     Syntax error
configure:5843: gcc-4.0 -arch ppc -arch ppc64 -arch x86_64 -mmacosx-version-min=10.4.8 -isysroot /Developer45/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4.8 -Xarch_ppc -faltivec -Xarch_ppc -mabi=altivec -Xarch_ppc -mcpu=G4 -Xarch_ppc -mtune=G4 -Xarch_ppc64 -mpowerpc-gfxopt -Xarch_ppc64 -faltivec -Xarch_ppc64 -mabi=altivec -Xarch_x86_64 -march=nocona -Xarch_x86_64 -m64 -Xarch_x86_64 -msse3 -Xarch_x86_64 -mssse3 -E -I/sw/include -L/sw/lib  conftest.c
gcc-4.0: -E, -S, -save-temps and -M options are not allowed with multiple -arch flags
configure:5843: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "emacs"
| #define PACKAGE_TARNAME "emacs"
| #define PACKAGE_VERSION "24.0.90"
| #define PACKAGE_STRING "emacs 24.0.90"
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| #define PACKAGE "emacs"
| #define VERSION "24.0.90"
| #define SYNC_INPUT 1
| #define WIDE_EMACS_INT 1
| /* end confdefs.h.  */
| #ifdef __STDC__
| # include <limits.h>
| #else
| # include <assert.h>
| #endif
| 		     Syntax error
configure:5873: error: in `/Users/peter/Quellen/Emacs_CVS/emacs-24.0.90':
configure:5875: error: C preprocessor "gcc-4.0 -arch ppc -arch ppc64 -arch x86_64 -mmacosx-version-min=10.4.8 -isysroot /Developer45/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4.8 -Xarch_ppc -faltivec -Xarch_ppc -mabi=altivec -Xarch_ppc -mcpu=G4 -Xarch_ppc -mtune=G4 -Xarch_ppc64 -mpowerpc-gfxopt -Xarch_ppc64 -faltivec -Xarch_ppc64 -mabi=altivec -Xarch_x86_64 -march=nocona -Xarch_x86_64 -m64 -Xarch_x86_64 -msse3 -Xarch_x86_64 -mssse3 -E -I/sw/include -L/sw/lib" fails sanity check
See `config.log' for more details


I invoked configure this way:

	env LANG=C PATH=/sw/bin:$PATH ./configure --without-sound --without-dbus --without-pop --without-gconf --without-gpm --with-wide-int --with-x-toolkit=athena --x-libraries=/usr/X11/lib --x-includes=/usr/X11/include --enable-locallisppath=/Library/Application\ Support/Emacs/calendar24:/Library/Application\ Support/Emacs CFLAGS="-H -pipe -fPIC -pthread" LDFLAGS="-Wl,-dead_strip_dylibs -Wl,-bind_at_load -Wl,-t" CC="gcc-4.0 -arch ppc -arch ppc64 -arch x86_64 -mmacosx-version-min=10.4.8 -isysroot /Developer45/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4.8 -Xarch_ppc -faltivec -Xarch_ppc -mabi=altivec -Xarch_ppc -mcpu=G4 -Xarch_ppc -mtune=G4 -Xarch_ppc64 -mpowerpc-gfxopt -Xarch_ppc64 -faltivec -Xarch_ppc64 -mabi=altivec -Xarch_x86_64 -march=nocona -Xarch_x86_64 -m64 -Xarch_x86_64 -msse3 -Xarch_x86_64 -mssse3" CPP=cpp-4 PKG_CONFIG_PATH=/sw/lib/xft2/lib/pkgconfig:/sw/share/pkgconfig:/sw/lib/pkgconfig:/usr/X11/lib/pkgconfig:/usr/X11/share/pkgconfig:/usr/lib/pkgconfig

In config.log I can see:

	ac_cv_c_compiler_gnu=yes
	ac_cv_env_CC_set=set
	ac_cv_env_CC_value='gcc-4.0 -arch ppc -arch ppc64 -arch x86_64 -mmacosx-version-min=10.4.8 -isysroot /Developer45/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4.8 -Xarch_ppc -faltivec -Xarch_ppc -mabi=altivec -Xarch_ppc -mcpu=G4 -Xarch_ppc -mtune=G4 -Xarch_ppc64 -mpowerpc-gfxopt -Xarch_ppc64 -faltivec -Xarch_ppc64 -mabi=altivec -Xarch_x86_64 -march=nocona -Xarch_x86_64 -m64 -Xarch_x86_64 -msse3 -Xarch_x86_64 -mssse3'
	ac_cv_env_CFLAGS_set=set
	ac_cv_env_CFLAGS_value='-H -pipe -fPIC -pthread'
	ac_cv_env_CPPFLAGS_set=
	ac_cv_env_CPPFLAGS_value=
	ac_cv_env_CPP_set=set
	ac_cv_env_CPP_value=cpp-4
	ac_cv_env_LDFLAGS_set=set
	ac_cv_env_LDFLAGS_value='-Wl,-dead_strip_dylibs -Wl,-bind_at_load -Wl,-t'
	ac_cv_env_LIBS_set=
	ac_cv_env_LIBS_value=

but these lines are below the first excerpt with the test whether some C preprocessor works, in a section "Cache variables." And it seems to cache a value that it never tested...

My test case also shows another problem: only one architecture, ppc (G4 or PowerPC 74xx) is 32-bit and would need the --with-wide-int configure option, the two other architectures, ppc64 (or G5, PowerPC 970) and x86_64 (intel, kind of "nocona"), are inherently 64-bit.


And one more problem (family) shines up: "uname -m = x86_64" and "/usr/bin/uname -p = i386" are found, a "Processor type: i486 (Intel 80486)" is deduced (Apple recommends the TRIPLE x86_64-apple-darwin10 for Snow Leopard on a 64-bit machine and i686-apple-darwin10 for Snow Leopard on a 32-bit machine). Finally configure logs:

	configure:4324: checking build system type
	configure:4338: result: i386-apple-darwin10.8.0
	configure:4358: checking host system type
	configure:4371: result: i386-apple-darwin10.8.0

It declares my hardware 32-bit, which is OK for the libraries provided by Fink in /sw/lib, but it's not OK for the native libraries provided by MacPorts in /opt/local/lib, which are 64-bit. (Apple makes it simple: it provides real fat libraries with support for i386, x86_64, and the G4 ppc family, as I try to compile myself. Notice: this is the situation for old Mac OS X 10.6.x, Snow Leopard; the Lion, Mac OS X 10.7.x, situation might be simpler, only i386 and x86_64, but I have no access.)

--
Greetings

  Pete

You can never know too little of what is not worth knowing at all.
			– Anon.






Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#9757; Package emacs. (Fri, 14 Oct 2011 22:28:02 GMT) Full text and rfc822 format available.

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

From: Peter Dyballa <Peter_Dyballa <at> Freenet.DE>
To: 9757 <at> debbugs.gnu.org
Subject: Re: 24.0.90;
	configuration and compilation for multiple architectures not possible
Date: Sat, 15 Oct 2011 00:23:54 +0200
Sorry, I made a mistake: Apple of course only supports x86_64 and i386, because that's the hardware where Mac OS X 10.6 runs on. I made the test with X11, which is not original Apple but rather third party, and it also supports elder Mac OS X versions than just Snow Leopard, 10.6.x. So, on Snow Leopard, it plays (almost – wide-int) no role whether configure prepares for x86_64 or i386, a basic terminal-only, a basic X client, and a basic NS variant should build.

--
Greetings

  Pete

Experience is what you get when you don't get what you want.





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#9757; Package emacs. (Sun, 16 Oct 2011 05:10:01 GMT) Full text and rfc822 format available.

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

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Peter Dyballa <Peter_Dyballa <at> Freenet.DE>
Cc: 9757 <at> debbugs.gnu.org
Subject: Re: configuration and compilation for multiple architectures not
	possible
Date: Sat, 15 Oct 2011 22:08:54 -0700
This has never worked for Emacs, right?  So it's a wishlist item?

> My test case also shows another problem: only one architecture,
> ppc (G4 or PowerPC 74xx) is 32-bit and would need the --with-wide-int configure option,
> the two other architectures, ppc64 (or G5, PowerPC 970) and x86_64 (intel, kind of "nocona"),
> are inherently 64-bit.

This part shouldn't be a problem, as it doesn't hurt to use --with-wide-int
on those 64-bit hosts.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#9757; Package emacs. (Sun, 16 Oct 2011 10:50:01 GMT) Full text and rfc822 format available.

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

From: Peter Dyballa <Peter_Dyballa <at> Freenet.DE>
To: Paul Eggert <eggert <at> cs.ucla.edu>
Cc: 9757 <at> debbugs.gnu.org
Subject: Re: configuration and compilation for multiple architectures not
	possible
Date: Sun, 16 Oct 2011 12:46:19 +0200
Am 16.10.2011 um 07:08 schrieb Paul Eggert:

> This has never worked for Emacs, right?  So it's a wishlist item?

What do you mean? GNU Emacs as a fat or "Universal" binary on Mac OS X? Or wide Lisp INTs on 32-bit hardware? The latter seems to work now (although I would need to find a file large enough to actually test this feature).

The former seems to fail all time when it comes to build temacs... But anyway, this is more academic, since modern Apple hardware is intel 64-bit and Apple has removed PowerPC support ("Rosetta" in Mac OS X 10.7, Xcode 4) from its up-to-date software releases. (And I actually was more of testing my understanding of compiling for multiple architectures.)

--
Greetings

  Pete

’Twas a woman who drove me to drink, and I never had the courtesy to thank her for it.
				— W.C. Fields





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#9757; Package emacs. (Sun, 16 Oct 2011 17:20:01 GMT) Full text and rfc822 format available.

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

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Peter Dyballa <Peter_Dyballa <at> Freenet.DE>
Cc: 9757 <at> debbugs.gnu.org
Subject: Re: configuration and compilation for multiple architectures not
	possible
Date: Sun, 16 Oct 2011 10:18:56 -0700
Severity: wishlist

On 10/16/11 03:46, Peter Dyballa wrote:
> What do you mean? GNU Emacs as a fat or "Universal" binary on Mac OS X?

Yes, sorry, that's what I meant.  As you wrote, --with-wide-int
should work fine.  But as far as I know fat binaries have
never worked.

I'm going to take the liberty of trying to mark this item
as a wishlist item.  Since fat binaries are on their way out
I expect it's not a high priority item.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#9757; Package emacs. (Sun, 16 Oct 2011 17:34:02 GMT) Full text and rfc822 format available.

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

From: Peter Dyballa <Peter_Dyballa <at> Freenet.DE>
To: Paul Eggert <eggert <at> cs.ucla.edu>
Cc: 9757 <at> debbugs.gnu.org
Subject: Re: configuration and compilation for multiple architectures not
	possible
Date: Sun, 16 Oct 2011 19:29:27 +0200
Am 16.10.2011 um 19:18 schrieb Paul Eggert:

> I'm going to take the liberty of trying to mark this item
> as a wishlist item.  Since fat binaries are on their way out
> I expect it's not a high priority item.

Correct! (Nevertheless I'll check whether it works to "cross-compile" and then stitch together a 32-bit and a 64-bit Emacs with lipo!)

But what is with configure using 'gcc -E' instead of the supplied value of CPP? And the mismatch of i386, i686, x86_64?

--
Greetings

  Pete

Email is a wonderful thing for people whose role in life is to be on top of things. But not for me; my role is to be on the bottom of things. What I do takes long hours of studying and uninterruptible concentration.
				– Donald Knuth





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#9757; Package emacs. (Sun, 16 Oct 2011 17:46:02 GMT) Full text and rfc822 format available.

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

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Peter Dyballa <Peter_Dyballa <at> Freenet.DE>
Cc: 9757 <at> debbugs.gnu.org
Subject: Re: configuration and compilation for multiple architectures not
	possible
Date: Sun, 16 Oct 2011 10:44:41 -0700
On 10/16/11 10:29, Peter Dyballa wrote:
> But what is with configure using 'gcc -E' instead of the supplied value of CPP? And the mismatch of i386, i686, x86_64?
> 

Sorry, I don't know the answers to those questions.
(I'm not a MacOS guy at all -- I'm just trying to help
out with the parts that I have some knowledge of, from
a distance as it were.)




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#9757; Package emacs. (Wed, 16 May 2012 07:29:01 GMT) Full text and rfc822 format available.

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

From: Glenn Morris <rgm <at> gnu.org>
To: Peter Dyballa <Peter_Dyballa <at> Freenet.DE>
Cc: 9757 <at> debbugs.gnu.org
Subject: Re: bug#9757: 24.0.90;
	configuration and compilation for multiple architectures not possible
Date: Wed, 16 May 2012 03:28:18 -0400
Peter Dyballa wrote:

> Trying to set up GNU Emacs with Apple means to run on more than one
> target architecture configuration fails because the configure script
> does not use the value I set for CPP but insists on using the -E
> option for CC, which is not allowed in this situation:

This is bug#9755 again.

The report continues for some time after this. I'm afraid I have no idea
what the rest of it is about.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#9757; Package emacs. (Wed, 16 May 2012 13:06:01 GMT) Full text and rfc822 format available.

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

From: Andy Moreton <andrewjmoreton <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: Re: bug#9757: 24.0.90;
	configuration and compilation for multiple architectures not possible
Date: Wed, 16 May 2012 14:04:14 +0100
On Wed 16 May 2012, Glenn Morris wrote:

> Peter Dyballa wrote:
>
>> Trying to set up GNU Emacs with Apple means to run on more than one
>> target architecture configuration fails because the configure script
>> does not use the value I set for CPP but insists on using the -E
>> option for CC, which is not allowed in this situation:
>
> This is bug#9755 again.
>
> The report continues for some time after this. I'm afraid I have no idea
> what the rest of it is about.

MacOSX supports fat binaries, which contain executable code for more
than one architecture. It is usual to build for multiple architectures
at the same time. The rest of the bug report is about problems trying to
build a fat binary with support for ppc, ppc64, x86 and x86-64
architectures.

    AndyM





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#9757; Package emacs. (Wed, 16 May 2012 22:52:02 GMT) Full text and rfc822 format available.

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

From: Peter Dyballa <Peter_Dyballa <at> Freenet.DE>
To: Glenn Morris <rgm <at> gnu.org>
Cc: 9757 <at> debbugs.gnu.org
Subject: Re: bug#9757: 24.0.90;
	configuration and compilation for multiple architectures not possible
Date: Thu, 17 May 2012 00:48:30 +0200
Am 16.05.2012 um 09:28 schrieb Glenn Morris:

> Peter Dyballa wrote:
> 
>> Trying to set up GNU Emacs with Apple means to run on more than one
>> target architecture configuration fails because the configure script
>> does not use the value I set for CPP but insists on using the -E
>> option for CC, which is not allowed in this situation:
> 
> This is bug#9755 again.
> 
> The report continues for some time after this. I'm afraid I have no idea
> what the rest of it is about.


Apple's GGC versions offer the ability to compile a *fat* binary in one compiler run for more than one architecture. This has side-effects, like setting #define's that are changed to fit the target architecture. Another effect is that when the configure script invokes GCC with one of the mentioned flags "-E, -S, -save-temps, -M" it stops working.

The configure scripts of other programmes seem not to use any of these switches, so I can build a fat binary in one step. Meanwhile I think that even when this would work with GNU Emacs' configure script a problem would arise when the unexec step is processed. So there must be a different procedure to build a fat version of GNU Emacs – which also would need to care of the libexec/emacs install targets.

It's probably best to close this bug report.

--
Greetings

  Pete

The most exciting phrase to hear in science, the one that heralds new discoveries, is not "Eureka!" (I found it!) but "That's funny..."
				– Isaac Asimov





bug closed, send any further explanations to 9757 <at> debbugs.gnu.org and Peter Dyballa <Peter_Dyballa <at> Freenet.DE> Request was from Chong Yidong <cyd <at> gnu.org> to control <at> debbugs.gnu.org. (Thu, 17 May 2012 02:23:01 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. (Thu, 14 Jun 2012 11:24:03 GMT) Full text and rfc822 format available.

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

Previous Next


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