unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#9757: 24.0.90; configuration and compilation for multiple architectures not possible
@ 2011-10-14 20:38 Peter Dyballa
  2011-10-14 22:23 ` Peter Dyballa
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Peter Dyballa @ 2011-10-14 20:38 UTC (permalink / raw)
  To: 9757

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.







^ permalink raw reply	[flat|nested] 10+ messages in thread

* bug#9757: 24.0.90; configuration and compilation for multiple architectures not possible
  2011-10-14 20:38 bug#9757: 24.0.90; configuration and compilation for multiple architectures not possible Peter Dyballa
@ 2011-10-14 22:23 ` Peter Dyballa
  2011-10-16  5:08 ` bug#9757: " Paul Eggert
  2012-05-16  7:28 ` bug#9757: 24.0.90; " Glenn Morris
  2 siblings, 0 replies; 10+ messages in thread
From: Peter Dyballa @ 2011-10-14 22:23 UTC (permalink / raw)
  To: 9757

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.






^ permalink raw reply	[flat|nested] 10+ messages in thread

* bug#9757: configuration and compilation for multiple architectures not possible
  2011-10-14 20:38 bug#9757: 24.0.90; configuration and compilation for multiple architectures not possible Peter Dyballa
  2011-10-14 22:23 ` Peter Dyballa
@ 2011-10-16  5:08 ` Paul Eggert
  2011-10-16 10:46   ` Peter Dyballa
  2012-05-16  7:28 ` bug#9757: 24.0.90; " Glenn Morris
  2 siblings, 1 reply; 10+ messages in thread
From: Paul Eggert @ 2011-10-16  5:08 UTC (permalink / raw)
  To: Peter Dyballa; +Cc: 9757

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.





^ permalink raw reply	[flat|nested] 10+ messages in thread

* bug#9757: configuration and compilation for multiple architectures not possible
  2011-10-16  5:08 ` bug#9757: " Paul Eggert
@ 2011-10-16 10:46   ` Peter Dyballa
  2011-10-16 17:18     ` Paul Eggert
  0 siblings, 1 reply; 10+ messages in thread
From: Peter Dyballa @ 2011-10-16 10:46 UTC (permalink / raw)
  To: Paul Eggert; +Cc: 9757


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






^ permalink raw reply	[flat|nested] 10+ messages in thread

* bug#9757: configuration and compilation for multiple architectures not possible
  2011-10-16 10:46   ` Peter Dyballa
@ 2011-10-16 17:18     ` Paul Eggert
  2011-10-16 17:29       ` Peter Dyballa
  0 siblings, 1 reply; 10+ messages in thread
From: Paul Eggert @ 2011-10-16 17:18 UTC (permalink / raw)
  To: Peter Dyballa; +Cc: 9757

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.





^ permalink raw reply	[flat|nested] 10+ messages in thread

* bug#9757: configuration and compilation for multiple architectures not possible
  2011-10-16 17:18     ` Paul Eggert
@ 2011-10-16 17:29       ` Peter Dyballa
  2011-10-16 17:44         ` Paul Eggert
  0 siblings, 1 reply; 10+ messages in thread
From: Peter Dyballa @ 2011-10-16 17:29 UTC (permalink / raw)
  To: Paul Eggert; +Cc: 9757


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






^ permalink raw reply	[flat|nested] 10+ messages in thread

* bug#9757: configuration and compilation for multiple architectures not possible
  2011-10-16 17:29       ` Peter Dyballa
@ 2011-10-16 17:44         ` Paul Eggert
  0 siblings, 0 replies; 10+ messages in thread
From: Paul Eggert @ 2011-10-16 17:44 UTC (permalink / raw)
  To: Peter Dyballa; +Cc: 9757

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.)





^ permalink raw reply	[flat|nested] 10+ messages in thread

* bug#9757: 24.0.90; configuration and compilation for multiple architectures not possible
  2011-10-14 20:38 bug#9757: 24.0.90; configuration and compilation for multiple architectures not possible Peter Dyballa
  2011-10-14 22:23 ` Peter Dyballa
  2011-10-16  5:08 ` bug#9757: " Paul Eggert
@ 2012-05-16  7:28 ` Glenn Morris
  2012-05-16 13:04   ` Andy Moreton
  2012-05-16 22:48   ` Peter Dyballa
  2 siblings, 2 replies; 10+ messages in thread
From: Glenn Morris @ 2012-05-16  7:28 UTC (permalink / raw)
  To: Peter Dyballa; +Cc: 9757

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.





^ permalink raw reply	[flat|nested] 10+ messages in thread

* bug#9757: 24.0.90; configuration and compilation for multiple architectures not possible
  2012-05-16  7:28 ` bug#9757: 24.0.90; " Glenn Morris
@ 2012-05-16 13:04   ` Andy Moreton
  2012-05-16 22:48   ` Peter Dyballa
  1 sibling, 0 replies; 10+ messages in thread
From: Andy Moreton @ 2012-05-16 13:04 UTC (permalink / raw)
  To: 9757

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






^ permalink raw reply	[flat|nested] 10+ messages in thread

* bug#9757: 24.0.90; configuration and compilation for multiple architectures not possible
  2012-05-16  7:28 ` bug#9757: 24.0.90; " Glenn Morris
  2012-05-16 13:04   ` Andy Moreton
@ 2012-05-16 22:48   ` Peter Dyballa
  1 sibling, 0 replies; 10+ messages in thread
From: Peter Dyballa @ 2012-05-16 22:48 UTC (permalink / raw)
  To: Glenn Morris; +Cc: 9757


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






^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2012-05-16 22:48 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-10-14 20:38 bug#9757: 24.0.90; configuration and compilation for multiple architectures not possible Peter Dyballa
2011-10-14 22:23 ` Peter Dyballa
2011-10-16  5:08 ` bug#9757: " Paul Eggert
2011-10-16 10:46   ` Peter Dyballa
2011-10-16 17:18     ` Paul Eggert
2011-10-16 17:29       ` Peter Dyballa
2011-10-16 17:44         ` Paul Eggert
2012-05-16  7:28 ` bug#9757: 24.0.90; " Glenn Morris
2012-05-16 13:04   ` Andy Moreton
2012-05-16 22:48   ` Peter Dyballa

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).