GNU bug report logs - #14258
Can't compile 24.3 on AIX 6.1

Previous Next

Package: emacs;

Reported by: Doug Lewan <dougl <at> shubertticketing.com>

Date: Wed, 24 Apr 2013 16:39:02 UTC

Severity: important

Done: Paul Eggert <eggert <at> cs.ucla.edu>

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 14258 in the body.
You can then email your comments to 14258 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#14258; Package emacs. (Wed, 24 Apr 2013 16:39:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Doug Lewan <dougl <at> shubertticketing.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Wed, 24 Apr 2013 16:39:02 GMT) Full text and rfc822 format available.

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

From: Doug Lewan <dougl <at> shubertticketing.com>
To: "bug-gnu-emacs <at> gnu.org" <bug-gnu-emacs <at> gnu.org>
Subject: Can't compile 24.3 on AIX 6.1
Date: Wed, 24 Apr 2013 13:51:57 +0000
[Message part 1 (text/plain, inline)]
I've been unable to build GNU emacs 24.3 on AIX with xlc or xlC.
Attached is information (in chronological order) for CC=xlc, CC='xlc -q64' and CC='xlC -q64'.

Thank you.

,Douglas
Douglas Lewan
Shubert Ticketing
(201) 489-8600 ext 224

If the majority of cooking accidents happen in the kitchen, then why don't we just cook in other rooms?

[Message part 2 (text/html, inline)]
[201304240855-compilation.err.gz (application/x-gzip, attachment)]
[201304240910-compilation.err.gz (application/x-gzip, attachment)]
[201304240910-config.log.gz (application/x-gzip, attachment)]
[201304240928-compilation.err.gz (application/x-gzip, attachment)]
[201304240928-config.log.gz (application/x-gzip, attachment)]
[201314240855-config.log.gz (application/x-gzip, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#14258; Package emacs. (Wed, 24 Apr 2013 19:45:02 GMT) Full text and rfc822 format available.

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

From: Erik Charlebois <erikcharlebois <at> gmail.com>
To: Doug Lewan <dougl <at> shubertticketing.com>
Cc: 14258 <at> debbugs.gnu.org
Subject: Re: bug#14258: Can't compile 24.3 on AIX 6.1
Date: Wed, 24 Apr 2013 15:39:03 -0400
[Message part 1 (text/plain, inline)]
The three logs seem to be for xlC, xlC -q64 and xlc -q64. xlC is the C++
compiler. I'm not sure if Emacs is meant to be built with C++. I'd suggest
trying with just vanilla xlc.

The ar error you're getting with xlc -q64 is because AIX archives can be
either 32-bit, 64-bit or both (containing the .o's for both). You need to
add -X32, -X64 or -X32_64 to your ARFLAGS.

When I was a developer on xlc, I used Emacs 24.2 on AIX6 built with gcc.
Whenever I built Emacs with xlc, I'd get segfaults after some amount of
time, usually corruption detected during garbage collection.
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#14258; Package emacs. (Fri, 26 Apr 2013 07:54:02 GMT) Full text and rfc822 format available.

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

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Doug Lewan <dougl <at> shubertticketing.com>
Cc: 14258 <at> debbugs.gnu.org
Subject: Re:  Can't compile 24.3 on AIX 6.1
Date: Fri, 26 Apr 2013 00:53:50 -0700
Erik's right that Emacs won't build properly when compiled
with a C++ compiler.  So vanilla xlc should be the way to go.

If plain xlc doesn't work, how about 'xlc -O'?  The remarks
in alloc.c's SETJMP_WILL_NOT_WORK indicate that you may need
to compile Emacs with optimization enabled, to get setjmp to
save registers properly.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#14258; Package emacs. (Fri, 26 Apr 2013 15:04:01 GMT) Full text and rfc822 format available.

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

From: Doug Lewan <dougl <at> shubertticketing.com>
To: Paul Eggert <eggert <at> cs.ucla.edu>
Cc: "14258 <at> debbugs.gnu.org" <14258 <at> debbugs.gnu.org>
Subject: RE:  Can't compile 24.3 on AIX 6.1
Date: Fri, 26 Apr 2013 15:05:31 +0000
Paul,

'xlc -O' worked! emacs 24.3 has compiled and linked for me.

I would never have been able to read that diagnostic that way.

And thanks to all the developers who helped along the way!

,Douglas
Douglas Lewan
Shubert Ticketing
(201) 489-8600 ext 224

If the majority of cooking accidents happen in the kitchen, then why don't we just cook in other rooms?


-----Original Message-----
From: Paul Eggert [mailto:eggert <at> cs.ucla.edu] 
Sent: Friday, 2013 April 26 03:54
To: Doug Lewan
Cc: 14258 <at> debbugs.gnu.org
Subject: Re: Can't compile 24.3 on AIX 6.1

Erik's right that Emacs won't build properly when compiled
with a C++ compiler.  So vanilla xlc should be the way to go.

If plain xlc doesn't work, how about 'xlc -O'?  The remarks
in alloc.c's SETJMP_WILL_NOT_WORK indicate that you may need
to compile Emacs with optimization enabled, to get setjmp to
save registers properly.

Reply sent to Paul Eggert <eggert <at> cs.ucla.edu>:
You have taken responsibility. (Fri, 26 Apr 2013 19:36:01 GMT) Full text and rfc822 format available.

Notification sent to Doug Lewan <dougl <at> shubertticketing.com>:
bug acknowledged by developer. (Fri, 26 Apr 2013 19:36:02 GMT) Full text and rfc822 format available.

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

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Doug Lewan <dougl <at> shubertticketing.com>
Cc: 14258-done <at> debbugs.gnu.org
Subject: Re: Can't compile 24.3 on AIX 6.1
Date: Fri, 26 Apr 2013 12:35:07 -0700
On 04/26/2013 08:05 AM, Doug Lewan wrote:

> 'xlc -O' worked!

Thanks for checking.  I installed the following patch to the trunk
to try to make this go a bit easier in the next release, and I'm
marking the bug as done.

=== modified file 'ChangeLog'
--- ChangeLog	2013-04-22 05:08:36 +0000
+++ ChangeLog	2013-04-26 19:31:09 +0000
@@ -1,3 +1,10 @@
+2013-04-26  Paul Eggert  <eggert <at> cs.ucla.edu>
+
+	Port better to AIX (Bug#14258).
+	* configure.ac (CFLAGS): Append -O if the user did not specify CFLAGS,
+	we did not already infer an optimization option, and -O works.
+	AIX xlc needs -O, otherwise garbage collection doesn't work.
+
 2013-04-22  Paul Eggert  <eggert <at> cs.ucla.edu>
 
 	* make-dist: Do not distribute admin/unidata/Makefile.

=== modified file 'configure.ac'
--- configure.ac	2013-04-18 17:12:21 +0000
+++ configure.ac	2013-04-26 19:31:09 +0000
@@ -613,10 +613,10 @@
 dnl Amongst other things, this sets AR and ARFLAGS.
 gl_EARLY
 
-# It's helpful to have C macros available to GDB, so prefer -g3 to -g
-# if -g3 works and the user does not specify CFLAGS.
-# This test must follow gl_EARLY; otherwise AC_LINK_IFELSE complains.
 if test "$ac_test_CFLAGS" != set; then
+  # It's helpful to have C macros available to GDB, so prefer -g3 to -g
+  # if -g3 works and the user does not specify CFLAGS.
+  # This test must follow gl_EARLY; otherwise AC_LINK_IFELSE complains.
   case $CFLAGS in
     '-g')
       emacs_g3_CFLAGS='-g3';;
@@ -632,13 +632,29 @@
       [emacs_cv_prog_cc_g3],
       [AC_LINK_IFELSE([AC_LANG_PROGRAM()],
 	 [emacs_cv_prog_cc_g3=yes],
-         [emacs_cv_prog_cc_g3=no])])
-    if test $emacs_cv_prog_cc_g3 = yes; then
-      CFLAGS=$emacs_g3_CFLAGS
-    else
+	 [emacs_cv_prog_cc_g3=no])])
+    if test $emacs_cv_prog_cc_g3 != yes; then
       CFLAGS=$emacs_save_CFLAGS
     fi
   fi
+
+  case $CFLAGS in
+    *-O*) ;;
+    *)
+      # No optimization flag was inferred for this non-GCC compiler.
+      # Try -O.  This is needed for xlc on AIX; see Bug#14258.
+      emacs_save_CFLAGS=$CFLAGS
+      test -z "$CFLAGS" || CFLAGS="$CFLAGS "
+      CFLAGS=${CFLAGS}-O
+      AC_CACHE_CHECK([whether $CC accepts -O],
+        [emacs_cv_prog_cc_o],
+	[AC_LINK_IFELSE([AC_LANG_PROGRAM()],
+	   [emacs_cv_prog_cc_o=yes],
+	   [emacs_cv_prog_cc_o=no])])
+      if test $emacs_cv_prog_cc_o != yes; then
+	CFLAGS=$emacs_save_CFLAGS
+      fi ;;
+  esac
 fi
 
 AC_ARG_ENABLE([gcc-warnings],

=== modified file 'src/ChangeLog'
--- src/ChangeLog	2013-04-24 15:09:49 +0000
+++ src/ChangeLog	2013-04-26 19:31:09 +0000
@@ -1,3 +1,9 @@
+2013-04-26  Paul Eggert  <eggert <at> cs.ucla.edu>
+
+	Port better to AIX (Bug#14258).
+	* lisp.h (ENUM_BF) [__IBMC__]: Make it 'unsigned int' here, too,
+	to pacify AIX xlc.
+
 2013-04-24  Kenichi Handa  <handa <at> gnu.org>
 
 	* coding.c (decode_coding_iso_2022): When an invalid escape

=== modified file 'src/lisp.h'
--- src/lisp.h	2013-04-07 04:41:19 +0000
+++ src/lisp.h	2013-04-26 19:31:09 +0000
@@ -231,9 +231,9 @@
 #define case_Lisp_Int case Lisp_Int0: case Lisp_Int1
 #define LISP_INT_TAG_P(x) (((x) & ~Lisp_Int1) == 0)
 
-/* Stolen from GDB.  The only known compiler that doesn't support
-   enums in bitfields is MSVC.  */
-#ifdef _MSC_VER
+/* Idea stolen from GDB.  MSVC doesn't support enums in bitfields,
+   and xlc complains vociferously about them.  */
+#if defined _MSC_VER || defined __IBMC__
 #define ENUM_BF(TYPE) unsigned int
 #else
 #define ENUM_BF(TYPE) enum TYPE






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

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

Previous Next


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