all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#14258: Can't compile 24.3 on AIX 6.1
@ 2013-04-24 13:51 Doug Lewan
  2013-04-24 19:39 ` Erik Charlebois
  2013-04-26  7:53 ` Paul Eggert
  0 siblings, 2 replies; 5+ messages in thread
From: Doug Lewan @ 2013-04-24 13:51 UTC (permalink / raw)
  To: 14258


[-- Attachment #1.1: Type: text/plain, Size: 354 bytes --]

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?


[-- Attachment #1.2: Type: text/html, Size: 22504 bytes --]

[-- Attachment #2: 201304240855-compilation.err.gz --]
[-- Type: application/x-gzip, Size: 7670 bytes --]

[-- Attachment #3: 201304240910-compilation.err.gz --]
[-- Type: application/x-gzip, Size: 4799 bytes --]

[-- Attachment #4: 201304240910-config.log.gz --]
[-- Type: application/x-gzip, Size: 39785 bytes --]

[-- Attachment #5: 201304240928-compilation.err.gz --]
[-- Type: application/x-gzip, Size: 4799 bytes --]

[-- Attachment #6: 201304240928-config.log.gz --]
[-- Type: application/x-gzip, Size: 39787 bytes --]

[-- Attachment #7: 201314240855-config.log.gz --]
[-- Type: application/x-gzip, Size: 40148 bytes --]

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

* bug#14258: Can't compile 24.3 on AIX 6.1
  2013-04-24 13:51 bug#14258: Can't compile 24.3 on AIX 6.1 Doug Lewan
@ 2013-04-24 19:39 ` Erik Charlebois
  2013-04-26  7:53 ` Paul Eggert
  1 sibling, 0 replies; 5+ messages in thread
From: Erik Charlebois @ 2013-04-24 19:39 UTC (permalink / raw)
  To: Doug Lewan; +Cc: 14258

[-- Attachment #1: Type: text/plain, Size: 576 bytes --]

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.

[-- Attachment #2: Type: text/html, Size: 707 bytes --]

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

* bug#14258: Can't compile 24.3 on AIX 6.1
  2013-04-24 13:51 bug#14258: Can't compile 24.3 on AIX 6.1 Doug Lewan
  2013-04-24 19:39 ` Erik Charlebois
@ 2013-04-26  7:53 ` Paul Eggert
  2013-04-26 15:05   ` Doug Lewan
  1 sibling, 1 reply; 5+ messages in thread
From: Paul Eggert @ 2013-04-26  7:53 UTC (permalink / raw)
  To: Doug Lewan; +Cc: 14258

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.





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

* bug#14258: Can't compile 24.3 on AIX 6.1
  2013-04-26  7:53 ` Paul Eggert
@ 2013-04-26 15:05   ` Doug Lewan
  2013-04-26 19:35     ` Paul Eggert
  0 siblings, 1 reply; 5+ messages in thread
From: Doug Lewan @ 2013-04-26 15:05 UTC (permalink / raw)
  To: Paul Eggert; +Cc: 14258@debbugs.gnu.org

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@cs.ucla.edu] 
Sent: Friday, 2013 April 26 03:54
To: Doug Lewan
Cc: 14258@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.

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

* bug#14258: Can't compile 24.3 on AIX 6.1
  2013-04-26 15:05   ` Doug Lewan
@ 2013-04-26 19:35     ` Paul Eggert
  0 siblings, 0 replies; 5+ messages in thread
From: Paul Eggert @ 2013-04-26 19:35 UTC (permalink / raw)
  To: Doug Lewan; +Cc: 14258-done

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@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@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@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@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







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

end of thread, other threads:[~2013-04-26 19:35 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-24 13:51 bug#14258: Can't compile 24.3 on AIX 6.1 Doug Lewan
2013-04-24 19:39 ` Erik Charlebois
2013-04-26  7:53 ` Paul Eggert
2013-04-26 15:05   ` Doug Lewan
2013-04-26 19:35     ` Paul Eggert

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.