GNU bug report logs -
#13650
Emacs pretest 24.2.93 - compilation error on AIX 5.3 using gcc 4.7-2
Previous Next
Reported by: Gilles Pion <gilles.pion <at> gmail.com>
Date: Thu, 7 Feb 2013 16:30: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 13650 in the body.
You can then email your comments to 13650 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#13650
; Package
emacs
.
(Thu, 07 Feb 2013 16:30:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Gilles Pion <gilles.pion <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Thu, 07 Feb 2013 16:30:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
/fdj/opt/gcc-4.7/bin/gcc -std=gnu99 -Demacs -I.
-I/sg/paxdev5/D1stunix/src/emacs/24.2.93/emacs-24.2.93/src -I../lib
-I/sg/paxdev5/D1stunix/src/emacs/24.2.93/emacs-24.2.93/src/../lib
-MMD -MF deps/.d -MP -O2 -I/opt/freeware/include -Wl,-bnodelcsect
-Wl,-bbigtoc \
-o temacs dispnew.o frame.o scroll.o xdisp.o menu.o xmenu.o window.o
charset.o coding.o category.o ccl.o character.o chartab.o bidi.o cm.o
term.o terminal.o xfaces.o xterm.o xfns.o xselect.o xrdb.o xsmfns.o
xsettings.o xgselect.o emacs.o keyboard.o macros.o keymap.o sysdep.o
buffer.o filelock.o insdel.o marker.o minibuf.o fileio.o dired.o cmds.o
casetab.o casefiddle.o indent.o search.o regex.o undo.o alloc.o data.o
doc.o editfns.o callint.o eval.o floatfns.o fns.o font.o print.o lread.o
syntax.o unexaix.o bytecode.o process.o gnutls.o callproc.o region-cache.o
sound.o atimer.o doprnt.o intervals.o textprop.o composite.o xml.o
profiler.o xfont.o fontset.o fringe.o image.o terminfo.o lastfile.o
gmalloc.o ralloc.o vm-limit.o widget.o ../lib/libgnu.a
../lwlib/liblw.a -lXpm -lXaw -lXmu -lXt -lSM -lICE -lXext -lX11
-lrts -lIM -liconv -lcurses -lperfstat -lpthread -lm
ld: 0711-317 ERROR: Undefined symbol: .ADDR_CORRECT
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more
information.
collect2: error: ld returned 8 exit status
gmake[1]: *** [temacs] Error 1
gmake[1]: Leaving directory
`/sg/paxdev5/D1stunix/src/emacs/24.2.93/emacs-24.2.93/src'
gmake: *** [src] Error 2
Context;
Where should the build process find the source code?
/sg/paxdev5/D1stunix/src/emacs/24.2.93/emacs-24.2.93
What compiler should emacs be built with?
/fdj/opt/gcc-4.7/bin/gcc -std=gnu99 -O2 -I/opt/freeware/include
Should Emacs use the GNU version of malloc? yes
Should Emacs use a relocating allocator for buffers? yes
Should Emacs use mmap(2) for buffer allocation? no
What window system should Emacs use? x11
What toolkit should Emacs use? LUCID
Where do we find X Windows header files? Standard dirs
Where do we find X Windows libraries? Standard dirs
Does Emacs use -lXaw3d? no
Does Emacs use -lXpm? yes
Does Emacs use -ljpeg? no
Does Emacs use -ltiff? no
Does Emacs use a gif library? no
Does Emacs use -lpng? no
Does Emacs use -lrsvg-2? no
Does Emacs use imagemagick? no
Does Emacs use -lgpm? no
Does Emacs use -ldbus? no
Does Emacs use -lgconf? no
Does Emacs use GSettings? no
Does Emacs use -lselinux? no
Does Emacs use -lgnutls? no
Does Emacs use -lxml2? no
Does Emacs use -lfreetype? no
Does Emacs use -lm17n-flt? no
Does Emacs use -lotf? no
Does Emacs use -lxft? no
Does Emacs use toolkit scroll bars? no
--
*Gilles*
[Message part 2 (text/html, inline)]
[config.txt (text/plain, attachment)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#13650
; Package
emacs
.
(Thu, 07 Feb 2013 16:53:02 GMT)
Full text and
rfc822 format available.
Message #8 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
fixing was easy this time (adding ADDR_CORRECT macro):
*** unexaix.c Thu Feb 7 10:47:08 2013
--- unexaix.c.ori Tue Jan 1 20:37:17 2013
***************
*** 92,99 ****
#include "lisp.h"
- #define ADDR_CORRECT(x) ((char *)(x) - (char*)0)
-
static void
report_error (const char *file, int fd)
But now the compilation fails later:
Finding pointers to doc strings...
Finding pointers to doc strings...done
Dumping under the name emacs
Invalid format operation %u
gmake[1]: *** [bootstrap-emacs] Error 1
gmake[1]: Leaving directory
`/sg/paxdev5/D1stunix/src/emacs/24.2.93/emacs-24.2.93/src'
gmake: *** [src] Error 2
Still working on it...
2013/2/7 Gilles Pion <gilles.pion <at> gmail.com>
>
> /fdj/opt/gcc-4.7/bin/gcc -std=gnu99 -Demacs -I.
> -I/sg/paxdev5/D1stunix/src/emacs/24.2.93/emacs-24.2.93/src -I../lib
> -I/sg/paxdev5/D1stunix/src/emacs/24.2.93/emacs-24.2.93/src/../lib
> -MMD -MF deps/.d -MP -O2 -I/opt/freeware/include -Wl,-bnodelcsect
> -Wl,-bbigtoc \
> -o temacs dispnew.o frame.o scroll.o xdisp.o menu.o xmenu.o window.o
> charset.o coding.o category.o ccl.o character.o chartab.o bidi.o cm.o
> term.o terminal.o xfaces.o xterm.o xfns.o xselect.o xrdb.o xsmfns.o
> xsettings.o xgselect.o emacs.o keyboard.o macros.o keymap.o sysdep.o
> buffer.o filelock.o insdel.o marker.o minibuf.o fileio.o dired.o cmds.o
> casetab.o casefiddle.o indent.o search.o regex.o undo.o alloc.o data.o
> doc.o editfns.o callint.o eval.o floatfns.o fns.o font.o print.o lread.o
> syntax.o unexaix.o bytecode.o process.o gnutls.o callproc.o region-cache.o
> sound.o atimer.o doprnt.o intervals.o textprop.o composite.o xml.o
> profiler.o xfont.o fontset.o fringe.o image.o terminfo.o lastfile.o
> gmalloc.o ralloc.o vm-limit.o widget.o ../lib/libgnu.a
> ../lwlib/liblw.a -lXpm -lXaw -lXmu -lXt -lSM -lICE -lXext -lX11
> -lrts -lIM -liconv -lcurses -lperfstat -lpthread -lm
> ld: 0711-317 ERROR: Undefined symbol: .ADDR_CORRECT
> ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more
> information.
> collect2: error: ld returned 8 exit status
> gmake[1]: *** [temacs] Error 1
> gmake[1]: Leaving directory
> `/sg/paxdev5/D1stunix/src/emacs/24.2.93/emacs-24.2.93/src'
> gmake: *** [src] Error 2
>
> Context;
>
> Where should the build process find the source code?
> /sg/paxdev5/D1stunix/src/emacs/24.2.93/emacs-24.2.93
> What compiler should emacs be built with?
> /fdj/opt/gcc-4.7/bin/gcc -std=gnu99 -O2 -I/opt/freeware/include
> Should Emacs use the GNU version of malloc? yes
> Should Emacs use a relocating allocator for buffers? yes
> Should Emacs use mmap(2) for buffer allocation? no
> What window system should Emacs use? x11
> What toolkit should Emacs use? LUCID
> Where do we find X Windows header files? Standard dirs
> Where do we find X Windows libraries? Standard dirs
> Does Emacs use -lXaw3d? no
> Does Emacs use -lXpm? yes
> Does Emacs use -ljpeg? no
> Does Emacs use -ltiff? no
> Does Emacs use a gif library? no
> Does Emacs use -lpng? no
> Does Emacs use -lrsvg-2? no
> Does Emacs use imagemagick? no
> Does Emacs use -lgpm? no
> Does Emacs use -ldbus? no
> Does Emacs use -lgconf? no
> Does Emacs use GSettings? no
> Does Emacs use -lselinux? no
> Does Emacs use -lgnutls? no
> Does Emacs use -lxml2? no
> Does Emacs use -lfreetype? no
> Does Emacs use -lm17n-flt? no
> Does Emacs use -lotf? no
> Does Emacs use -lxft? no
> Does Emacs use toolkit scroll bars? no
>
>
>
> --
> *Gilles*
>
--
*Gilles*
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#13650
; Package
emacs
.
(Thu, 07 Feb 2013 17:50:01 GMT)
Full text and
rfc822 format available.
Message #11 received at 13650 <at> debbugs.gnu.org (full text, mbox):
Thanks for the report (no need to cc me by the way).
I was assuming it worked for you following http://debbugs.gnu.org/13408,
but obviously not.
Gilles Pion wrote:
> *** unexaix.c Thu Feb 7 10:47:08 2013
> --- unexaix.c.ori Tue Jan 1 20:37:17 2013
> ***************
> *** 92,99 ****
>
> #include "lisp.h"
>
> - #define ADDR_CORRECT(x) ((char *)(x) - (char*)0)
> -
> static void
> report_error (const char *file, int fd)
(This patch is backwards, BTW).
Actually, looking at the history
http://lists.gnu.org/archive/html/emacs-diffs/2012-05/msg00352.html
looks like this should be:
#define ADDR_CORRECT(x) ((int)(x))
Could you try that?
At first glance, it looks like DATA_START, DATA_SEG_BITS, and
NLIST_STRUCT also went missing in that 2012/05 change. Paul?
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#13650
; Package
emacs
.
(Thu, 07 Feb 2013 21:18:01 GMT)
Full text and
rfc822 format available.
Message #14 received at 13650 <at> debbugs.gnu.org (full text, mbox):
On 02/07/13 09:47, Glenn Morris wrote:
> At first glance, it looks like DATA_START, DATA_SEG_BITS, and
> NLIST_STRUCT also went missing in that 2012/05 change. Paul?
That part should be OK. DATA_START and DATA_SEG_BITS are
needed only for the non-USE_LSB_TAG case, which no longer
applies to AIX. NLIST_STRUCT is handled automatically by
Gnulib now.
Since ADDR_CORRECT should be a noop now, it should probably
be removed and replaced by a cast. Casting to 'int' can't
be right, though, since AIX can be 64-bit. I expect the build
in question here is 64-bit, too, as Gilles's symptom is the
same one that Harald Maier reported in 2009
<http://lists.gnu.org/archive/html/emacs-devel/2009-08/msg00353.html>.
Given the date of that report, I expect the problem is that
unexaix has some long-existing problems for 64-bit platforms.
I briefly looked for problems and came up with the following patch,
which should fix both the ADDR_CORRECT problem and the
"Invalid format operation %u" problem. Most likely this will
merely uncover another problem but I hope we can fix that too.
So, Gilles, can you please try this patch? Thanks.
=== modified file 'src/unexaix.c'
--- src/unexaix.c 2013-01-01 09:11:05 +0000
+++ src/unexaix.c 2013-02-07 21:11:30 +0000
@@ -51,6 +51,8 @@ what you give them. Help stamp out sof
#include "getpagesize.h"
#include <sys/types.h>
+#include <inttypes.h>
+#include <stdarg.h>
#include <stdio.h>
#include <sys/stat.h>
#include <errno.h>
@@ -92,23 +94,30 @@ static int pagemask;
#include "lisp.h"
-static void
+static _Noreturn void
report_error (const char *file, int fd)
{
if (fd)
- close (fd);
+ {
+ int failed_errno = errno;
+ close (fd);
+ errno = failed_errno;
+ }
report_file_error ("Cannot unexec", Fcons (build_string (file), Qnil));
}
-#define ERROR0(msg) report_error_1 (new, msg, 0, 0); return -1
-#define ERROR1(msg,x) report_error_1 (new, msg, x, 0); return -1
-#define ERROR2(msg,x,y) report_error_1 (new, msg, x, y); return -1
+#define ERROR0(msg) report_error_1 (new, msg)
+#define ERROR1(msg,x) report_error_1 (new, msg, x)
+#define ERROR2(msg,x,y) report_error_1 (new, msg, x, y)
-static void
-report_error_1 (int fd, const char *msg, int a1, int a2)
+static _Noreturn void ATTRIBUTE_FORMAT_PRINTF (2, 3)
+report_error_1 (int fd, const char *msg, ...)
{
+ va_list ap;
close (fd);
- error (msg, a1, a2);
+ va_start (ap, msg);
+ verror (msg, ap);
+ va_end (ap);
}
static int make_hdr (int, int, const char *, const char *);
@@ -163,8 +172,8 @@ make_hdr (int new, int a_out,
const char *a_name, const char *new_name)
{
int scns;
- unsigned int bss_start;
- unsigned int data_start;
+ uintptr_t bss_start;
+ uintptr_t data_start;
struct scnhdr section[MAX_SECTIONS];
struct scnhdr * f_thdr; /* Text section header */
@@ -179,17 +188,17 @@ make_hdr (int new, int a_out,
pagemask = getpagesize () - 1;
/* Adjust text/data boundary. */
- data_start = (long) start_of_data ();
- data_start = ADDR_CORRECT (data_start);
+ data_start = (uintptr_t) start_of_data ();
data_start = data_start & ~pagemask; /* (Down) to page boundary. */
- bss_start = ADDR_CORRECT (sbrk (0)) + pagemask;
+ bss_start = (uintptr_t) sbrk (0) + pagemask;
bss_start &= ~ pagemask;
if (data_start > bss_start) /* Can't have negative data size. */
{
- ERROR2 ("unexec: data_start (%u) can't be greater than bss_start (%u)",
+ ERROR2 (("unexec: data_start (0x%"PRIxPTR
+ ") can't be greater than bss_start (0x%"PRIxPTR")"),
data_start, bss_start);
}
@@ -393,7 +402,6 @@ static void
write_segment (int new, char *ptr, char *end)
{
int i, nwrite, ret;
- char buf[80];
char zeros[UnexBlockSz];
for (i = 0; ptr < end;)
@@ -414,9 +422,13 @@ write_segment (int new, char *ptr, char
}
else if (nwrite != ret)
{
+ int write_errno = errno;
+ char buf[1000];
+ void *addr = ptr;
sprintf (buf,
- "unexec write failure: addr 0x%lx, fileno %d, size 0x%x, wrote 0x%x, errno %d",
- (unsigned long)ptr, new, nwrite, ret, errno);
+ "unexec write failure: addr %p, fileno %d, size 0x%x, wrote 0x%x, errno %d",
+ addr, new, nwrite, ret, errno);
+ errno = write_errno;
PERROR (buf);
}
i += nwrite;
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#13650
; Package
emacs
.
(Thu, 07 Feb 2013 21:43:01 GMT)
Full text and
rfc822 format available.
Message #17 received at 13650 <at> debbugs.gnu.org (full text, mbox):
Paul Eggert wrote:
> <http://lists.gnu.org/archive/html/emacs-devel/2009-08/msg00353.html>.
> Given the date of that report, I expect the problem is that
> unexaix has some long-existing problems for 64-bit platforms.
I don't think Emacs has ever supported such platforms. Eg
http://lists.gnu.org/archive/html/bug-gnu-emacs/2003-05/msg00070.html
So, it's not essential to fix this problem for 24.3, although if it can
be done safely (ie without impacting any other platform) that's a nice
bonus.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#13650
; Package
emacs
.
(Fri, 08 Feb 2013 07:11:01 GMT)
Full text and
rfc822 format available.
Message #20 received at 13650 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
You'll have to wait until monday for the results but I won't forget!
2013/2/7 Paul Eggert <eggert <at> cs.ucla.edu>
> On 02/07/13 09:47, Glenn Morris wrote:
> > At first glance, it looks like DATA_START, DATA_SEG_BITS, and
> > NLIST_STRUCT also went missing in that 2012/05 change. Paul?
>
> That part should be OK. DATA_START and DATA_SEG_BITS are
> needed only for the non-USE_LSB_TAG case, which no longer
> applies to AIX. NLIST_STRUCT is handled automatically by
> Gnulib now.
>
> Since ADDR_CORRECT should be a noop now, it should probably
> be removed and replaced by a cast. Casting to 'int' can't
> be right, though, since AIX can be 64-bit. I expect the build
> in question here is 64-bit, too, as Gilles's symptom is the
> same one that Harald Maier reported in 2009
> <http://lists.gnu.org/archive/html/emacs-devel/2009-08/msg00353.html>.
> Given the date of that report, I expect the problem is that
> unexaix has some long-existing problems for 64-bit platforms.
> I briefly looked for problems and came up with the following patch,
> which should fix both the ADDR_CORRECT problem and the
> "Invalid format operation %u" problem. Most likely this will
> merely uncover another problem but I hope we can fix that too.
>
> So, Gilles, can you please try this patch? Thanks.
>
> === modified file 'src/unexaix.c'
> --- src/unexaix.c 2013-01-01 09:11:05 +0000
> +++ src/unexaix.c 2013-02-07 21:11:30 +0000
> @@ -51,6 +51,8 @@ what you give them. Help stamp out sof
> #include "getpagesize.h"
>
> #include <sys/types.h>
> +#include <inttypes.h>
> +#include <stdarg.h>
> #include <stdio.h>
> #include <sys/stat.h>
> #include <errno.h>
> @@ -92,23 +94,30 @@ static int pagemask;
>
> #include "lisp.h"
>
> -static void
> +static _Noreturn void
> report_error (const char *file, int fd)
> {
> if (fd)
> - close (fd);
> + {
> + int failed_errno = errno;
> + close (fd);
> + errno = failed_errno;
> + }
> report_file_error ("Cannot unexec", Fcons (build_string (file), Qnil));
> }
>
> -#define ERROR0(msg) report_error_1 (new, msg, 0, 0); return -1
> -#define ERROR1(msg,x) report_error_1 (new, msg, x, 0); return -1
> -#define ERROR2(msg,x,y) report_error_1 (new, msg, x, y); return -1
> +#define ERROR0(msg) report_error_1 (new, msg)
> +#define ERROR1(msg,x) report_error_1 (new, msg, x)
> +#define ERROR2(msg,x,y) report_error_1 (new, msg, x, y)
>
> -static void
> -report_error_1 (int fd, const char *msg, int a1, int a2)
> +static _Noreturn void ATTRIBUTE_FORMAT_PRINTF (2, 3)
> +report_error_1 (int fd, const char *msg, ...)
> {
> + va_list ap;
> close (fd);
> - error (msg, a1, a2);
> + va_start (ap, msg);
> + verror (msg, ap);
> + va_end (ap);
> }
>
> static int make_hdr (int, int, const char *, const char *);
> @@ -163,8 +172,8 @@ make_hdr (int new, int a_out,
> const char *a_name, const char *new_name)
> {
> int scns;
> - unsigned int bss_start;
> - unsigned int data_start;
> + uintptr_t bss_start;
> + uintptr_t data_start;
>
> struct scnhdr section[MAX_SECTIONS];
> struct scnhdr * f_thdr; /* Text section header */
> @@ -179,17 +188,17 @@ make_hdr (int new, int a_out,
> pagemask = getpagesize () - 1;
>
> /* Adjust text/data boundary. */
> - data_start = (long) start_of_data ();
> - data_start = ADDR_CORRECT (data_start);
> + data_start = (uintptr_t) start_of_data ();
>
> data_start = data_start & ~pagemask; /* (Down) to page boundary. */
>
> - bss_start = ADDR_CORRECT (sbrk (0)) + pagemask;
> + bss_start = (uintptr_t) sbrk (0) + pagemask;
> bss_start &= ~ pagemask;
>
> if (data_start > bss_start) /* Can't have negative data size. */
> {
> - ERROR2 ("unexec: data_start (%u) can't be greater than bss_start
> (%u)",
> + ERROR2 (("unexec: data_start (0x%"PRIxPTR
> + ") can't be greater than bss_start (0x%"PRIxPTR")"),
> data_start, bss_start);
> }
>
> @@ -393,7 +402,6 @@ static void
> write_segment (int new, char *ptr, char *end)
> {
> int i, nwrite, ret;
> - char buf[80];
> char zeros[UnexBlockSz];
>
> for (i = 0; ptr < end;)
> @@ -414,9 +422,13 @@ write_segment (int new, char *ptr, char
> }
> else if (nwrite != ret)
> {
> + int write_errno = errno;
> + char buf[1000];
> + void *addr = ptr;
> sprintf (buf,
> - "unexec write failure: addr 0x%lx, fileno %d, size
> 0x%x, wrote 0x%x, errno %d",
> - (unsigned long)ptr, new, nwrite, ret, errno);
> + "unexec write failure: addr %p, fileno %d, size 0x%x,
> wrote 0x%x, errno %d",
> + addr, new, nwrite, ret, errno);
> + errno = write_errno;
> PERROR (buf);
> }
> i += nwrite;
>
>
>
--
*Gilles*
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#13650
; Package
emacs
.
(Mon, 11 Feb 2013 07:52:02 GMT)
Full text and
rfc822 format available.
Message #23 received at 13650 <at> debbugs.gnu.org (full text, mbox):
> So, Gilles, can you please try this patch? Thanks.
Here what I get:
unexec: data_start (0x2ff22000) can't be greater than bss_start (0x20a62000)
gmake[1]: *** [bootstrap-emacs] Error 1
gmake[1]: Leaving directory
`/sg/paxdev5/D1stunix/src/emacs/24.2.93/emacs-24.2.93/src'
gmake: *** [src] Error 2
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#13650
; Package
emacs
.
(Mon, 11 Feb 2013 21:19:01 GMT)
Full text and
rfc822 format available.
Message #26 received at 13650 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On 02/10/13 23:51, Gilles Pion wrote:
> unexec: data_start (0x2ff22000) can't be greater than bss_start (0x20a62000)
Thanks, that's progress, since Emacs at least builds now.
So I committed that into emacs-24.
Can you please try the attached patch as well? That is,
please apply it in addition to the earlier patch.
[aixpatch.txt (text/plain, attachment)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#13650
; Package
emacs
.
(Tue, 12 Feb 2013 08:08:03 GMT)
Full text and
rfc822 format available.
Message #29 received at 13650 <at> debbugs.gnu.org (full text, mbox):
> On 02/10/13 23:51, Gilles Pion wrote:
>
>> unexec: data_start (0x2ff22000) can't be greater than bss_start (0x20a62000)
>
> Thanks, that's progress, since Emacs at least builds now.
> So I committed that into emacs-24.
>
> Can you please try the attached patch as well? That is,
> please apply it in addition to the earlier patch.
>
Not much success,
1st try using default gcc options, it fails like this:
cd /sg/paxdev5/D1stunix/src/emacs/24.2.93/emacs-24.2.93/lisp && chmod
+w ps-print.el emulation/tpu-edt.el emacs-lisp/cl-loaddefs.el
mail/rmail.el dired.el ibuffer.el htmlfontify.el emacs-lisp/eieio.el
cd /sg/paxdev5/D1stunix/src/emacs/24.2.93/emacs-24.2.93/lisp;
subdirs=`find . -type d -print`; for file in $subdirs; do case $file
in */.* | */.*/* | */=* | */obsolete | */term ) ;; *) wins="$wins
$file" ;; esac; done; \
echo Directories: $wins; \
EMACSLOADPATH=/sg/paxdev5/D1stunix/src/emacs/24.2.93/emacs-24.2.93/lisp
LC_ALL=C /sg/paxdev5/D1stunix/src/emacs/24.2.93/emacs-24.2.93/src/bootstrap-emacs
-batch --no-site-file --no-site-lisp -l autoload --eval '(setq
generated-autoload-file
"/sg/paxdev5/D1stunix/src/emacs/24.2.93/emacs-24.2.93/lisp/loaddefs.el")'
-f batch-update-autoloads $wins
Directories: . ./calc ./calendar ./cedet ./cedet/semantic
./cedet/semantic/analyze ./cedet/semantic/bovine
./cedet/semantic/decorate ./cedet/semantic/wisent
./cedet/semantic/symref ./cedet/srecode ./cedet/ede ./emacs-lisp
./emulation ./erc ./eshell ./gnus ./international ./language ./mail
./mh-e ./org ./progmodes ./play ./nxml ./net ./textmodes ./url ./vc
gmake[2]: *** [autoloads] Illegal instruction
gmake[2]: Leaving directory
`/sg/paxdev5/D1stunix/src/emacs/24.2.93/emacs-24.2.93/lisp'
gmake[1]: *** [/sg/paxdev5/D1stunix/src/emacs/24.2.93/emacs-24.2.93/src/../lisp/loaddefs.el]
Error 2
gmake[1]: Leaving directory
`/sg/paxdev5/D1stunix/src/emacs/24.2.93/emacs-24.2.93/src'
gmake: *** [src] Error 2
I then have tried to force 64 bit mode, with gcc and with xlc, none worked,
Here's what I get using xlc (CFLAGS="-q64", OBJECT_MODE=64)
unexec: couldn't find "|<" section
gmake[1]: *** [bootstrap-emacs] Error 1
gmake[1]: Leaving directory
`/sg/paxdev5/D1stunix/src/emacs/24.2.93/emacs-24.2.93/src'
gmake: *** [src] Error 2
(and be assured that I don't forget to do a "make distclean,
configure" between each tests)
--
Gilles
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#13650
; Package
emacs
.
(Tue, 12 Feb 2013 19:04:01 GMT)
Full text and
rfc822 format available.
Message #32 received at 13650 <at> debbugs.gnu.org (full text, mbox):
On 02/12/13 00:06, Gilles Pion wrote:
> 1st try using default gcc options,
Thanks for following up on this. Is this a 32-bit build? Can you
please check that it generated 32-bit object files and that temacs and
bootstrap-emacs are 32-bit? The command 'file temacs bootstrap-emacs
*.o' might tell you that.
> gmake[2]: *** [autoloads] Illegal instruction
OK, so we've made more progress. Not only does Emacs (OK, just
temacs) build, it generates bootstrap-emacs (which it didn't do
before). So I installed that patch into emacs-24 and we can now try
to fix the next problem, namely, that bootstrap-emacs does not execute
properly.
Mark Fleishman reported this problem for Emacs 23.3; please see
<http://lists.gnu.org/archive/html/help-gnu-emacs/2011-04/msg00287.html>.
So I suspect that you'll also observe this problem for Emacs 23.3.
Am i right? You can grab it from
<ftp://ftp.gnu.org/gnu/emacs/emacs-23.3b.tar.gz> and build it; the
trailing "b" in the version number there should not matter.
At any rate it would be helpful to know which version of Emacs is the
most recent one that worked on AIX. You can use binary search to find
that out. The IBM toolbox has Emacs 21.3
<http://www-03.ibm.com/systems/power/software/aix/linux/toolbox/date.html>
so my assumption is that 21.3 will build, but it could be that your
environment differs from IBM's so it might be helpful to check 21.3
too.
> I then have tried to force 64 bit mode
As far as I know 64-bit mode has never worked, though it shouldn't be
hard to get it to work if we can find someone who knows AIX's
executable format. For now, it may be better focus on getting 32-bit
mode to work, since we know it used to work at some point.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#13650
; Package
emacs
.
(Wed, 13 Feb 2013 11:29:01 GMT)
Full text and
rfc822 format available.
Message #35 received at 13650 <at> debbugs.gnu.org (full text, mbox):
2013/2/12 Paul Eggert <eggert <at> cs.ucla.edu>:
> On 02/12/13 00:06, Gilles Pion wrote:
>
>> 1st try using default gcc options,
>
> Thanks for following up on this. Is this a 32-bit build? Can you
> please check that it generated 32-bit object files and that temacs and
> bootstrap-emacs are 32-bit? The command 'file temacs bootstrap-emacs
> *.o' might tell you that.
definitevely 32 bits:
$ file emacs-24.2.93/src/bootstrap-emacs
emacs-24.2.93/src/bootstrap-emacs: executable (RISC System/6000) or
object module not stripped
(if would have been "64-bit XCOFF executable or object module" if it was 64bits)
>
>> gmake[2]: *** [autoloads] Illegal instruction
>
> OK, so we've made more progress. Not only does Emacs (OK, just
> temacs) build, it generates bootstrap-emacs (which it didn't do
> before). So I installed that patch into emacs-24 and we can now try
> to fix the next problem, namely, that bootstrap-emacs does not execute
> properly.
>
> Mark Fleishman reported this problem for Emacs 23.3; please see
> <http://lists.gnu.org/archive/html/help-gnu-emacs/2011-04/msg00287.html>.
> So I suspect that you'll also observe this problem for Emacs 23.3.
> Am i right? You can grab it from
> <ftp://ftp.gnu.org/gnu/emacs/emacs-23.3b.tar.gz> and build it; the
> trailing "b" in the version number there should not matter.
No problem with that version: downladed and compiled successfully
> At any rate it would be helpful to know which version of Emacs is the
> most recent one that worked on AIX. You can use binary search to find
> that out. The IBM toolbox has Emacs 21.3
I never used IBM toolbox emacs, always compiled from source
I'm currently using:
GNU Emacs 24.2.1 (powerpc-ibm-aix5.3.0.0, X toolkit)
--
Gilles
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#13650
; Package
emacs
.
(Wed, 13 Feb 2013 18:39:02 GMT)
Full text and
rfc822 format available.
Message #38 received at 13650 <at> debbugs.gnu.org (full text, mbox):
Gilles Pion wrote:
> definitevely 32 bits:
> $ file emacs-24.2.93/src/bootstrap-emacs
> emacs-24.2.93/src/bootstrap-emacs: executable (RISC System/6000) or
[...]
> I'm currently using:
>
> GNU Emacs 24.2.1 (powerpc-ibm-aix5.3.0.0, X toolkit)
Oh, so we are supposed to support this, so it does become important to
fix this for 24.3.
I'd still like to know if the naive approach of just taking the original
24.2.93 tarfile and adding to src/unexaix.c
#define ADDR_CORRECT(x) ((int)(x))
happens to work...?
This may be nonsense, but should be quick to check.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#13650
; Package
emacs
.
(Wed, 13 Feb 2013 23:14:02 GMT)
Full text and
rfc822 format available.
Message #41 received at 13650 <at> debbugs.gnu.org (full text, mbox):
On 02/13/13 10:37, Glenn Morris wrote:
> I'd still like to know if the naive approach of just taking the original
> 24.2.93 tarfile and adding to src/unexaix.c
>
> #define ADDR_CORRECT(x) ((int)(x))
>
> happens to work...?
> This may be nonsense, but should be quick to check.
It'd be great if that works.
Gilles, can you please give it a try?
(I'll be surprised if it works, but I've been surprised before....)
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#13650
; Package
emacs
.
(Wed, 13 Feb 2013 23:35:01 GMT)
Full text and
rfc822 format available.
Message #44 received at 13650 <at> debbugs.gnu.org (full text, mbox):
I don't understand this code and have no chance of being able to fix it.
My point is just that since it apparently worked in Emacs 24.2, then in
emacs-24 branch at this stage we should just do the minimum to get it
back to that working state, and save improvements for trunk. But maybe
the code has changed too much for this to be feasible?
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#13650
; Package
emacs
.
(Thu, 14 Feb 2013 02:50:02 GMT)
Full text and
rfc822 format available.
Message #47 received at 13650 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On 02/13/2013 03:33 PM, Glenn Morris wrote:
> since it apparently worked in Emacs 24.2, then in emacs-24
> branch at this stage we should just do the minimum to get
> it back to that working state, and save improvements for trunk.
We can certainly give that a try. Looking at unexaix.c, the
changes made between 24.2 and 24.2.93 are small. The first
change to unexaix.c, in emacs-24 bzr 108226
<http://bzr.savannah.gnu.org/lh/emacs/emacs-24/revision/108226>,
fixed a bug privately reported to me by Gilles on
2012-05-09; he already tested this so it shouldn't be the
problem. The remaining changes are small: it shouldn't hurt
to undo them but the real problem surely lies elsewhere.
I see two main suspects. First, we got rid of DATA_START
and DATA_SEG_BITS on AIX. Second, USE_LSB_TAG changed from
0 to 1 on AIX.
And now that I look at the code again, I see a serious bug
in Emacs 24.2.93's src/lisp.h when DATA_SEG_BITS is nonzero:
it mis-defines XPNTR as if DATA_SEG_BITS were zero. This is a
regression and should be fixed in emacs-24 regardless of the
AIX fixes, I expect.
So: Gilles, can you please try the following?
First, aply the attached patch to a fresh copy of emacs-24.2.93.
Then, run these shell commands:
./configure CPPFLAGS='-DDATA_START=0x20000000 -DDATA_SEG_BITS=0x20000000 -DUSE_LSB_TAG=0'
make
If this works, I'll have some followup questions and
proposed changes; the point of the above is to try to test
reverting to 24.2's approach as quickly and painlessly as
possible, without reverting all the other changes we've
made.
[aix.txt (text/plain, attachment)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#13650
; Package
emacs
.
(Thu, 14 Feb 2013 07:30:02 GMT)
Full text and
rfc822 format available.
Message #50 received at 13650 <at> debbugs.gnu.org (full text, mbox):
2013/2/14 Paul Eggert <eggert <at> cs.ucla.edu>:
> So: Gilles, can you please try the following?
>
> First, aply the attached patch to a fresh copy of emacs-24.2.93.
>
> Then, run these shell commands:
>
> ./configure CPPFLAGS='-DDATA_START=0x20000000 -DDATA_SEG_BITS=0x20000000 -DUSE_LSB_TAG=0'
> make
The compilation fails here:
gmake[2]: Entering directory
`/sg/paxdev5/D1stunix/src/emacs/24.2.93/emacs-24.2.93/lisp'
Compiling /sg/paxdev5/D1stunix/src/emacs/24.2.93/emacs-24.2.93/src/../lisp/emacs-lisp/byte-run.el
Wrong type argument: sequencep, 137009740
gmake[2]: *** [compile-onefile] Error 255
gmake[2]: Leaving directory
`/sg/paxdev5/D1stunix/src/emacs/24.2.93/emacs-24.2.93/lisp'
gmake[1]: *** [/sg/paxdev5/D1stunix/src/emacs/24.2.93/emacs-24.2.93/src/../lisp/emacs-lisp/byte-run.elc]
Error 2
gmake[1]: Leaving directory
`/sg/paxdev5/D1stunix/src/emacs/24.2.93/emacs-24.2.93/src'
gmake: *** [src] Error 2
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#13650
; Package
emacs
.
(Thu, 14 Feb 2013 07:34:01 GMT)
Full text and
rfc822 format available.
Message #53 received at 13650 <at> debbugs.gnu.org (full text, mbox):
Thanks, what happens if you try the same patch but the following
build procedure instead?
make distclean
./configure CPPFLAGS='-DDATA_START=0x20000000 -DDATA_SEG_BITS=0x20000000'
make
That is, the same as before, except omit the USE_LSB_TAG setting.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#13650
; Package
emacs
.
(Thu, 14 Feb 2013 07:45:03 GMT)
Full text and
rfc822 format available.
Message #56 received at 13650 <at> debbugs.gnu.org (full text, mbox):
2013/2/14 Paul Eggert <eggert <at> cs.ucla.edu>:
> Thanks, what happens if you try the same patch but the following
> build procedure instead?
>
> make distclean
> ./configure CPPFLAGS='-DDATA_START=0x20000000 -DDATA_SEG_BITS=0x20000000'
> make
>
> That is, the same as before, except omit the USE_LSB_TAG setting.
getting identical result (apart from the pointer value):
Compiling /sg/paxdev5/D1stunix/src/emacs/24.2.93/emacs-24.2.93/src/../lisp/emacs-lisp/byte-run.el
Wrong type argument: sequencep, 137012812
gmake[2]: *** [compile-onefile] Error 255
gmake[2]: Leaving directory
`/sg/paxdev5/D1stunix/src/emacs/24.2.93/emacs-24.2.93/lisp'
gmake[1]: *** [/sg/paxdev5/D1stunix/src/emacs/24.2.93/emacs-24.2.93/src/../lisp/emacs-lisp/byte-run.elc]
Error 2
gmake[1]: Leaving directory
`/sg/paxdev5/D1stunix/src/emacs/24.2.93/emacs-24.2.93/src'
gmake: *** [src] Error 2
--
Gilles
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#13650
; Package
emacs
.
(Thu, 14 Feb 2013 07:58:01 GMT)
Full text and
rfc822 format available.
Message #59 received at 13650 <at> debbugs.gnu.org (full text, mbox):
On 02/13/2013 11:43 PM, Gilles Pion wrote:
> 2013/2/14 Paul Eggert <eggert <at> cs.ucla.edu>:
>> Thanks, what happens if you try the same patch but the following
>> build procedure instead?
>>
>> make distclean
>> ./configure CPPFLAGS='-DDATA_START=0x20000000 -DDATA_SEG_BITS=0x20000000'
>> make
>>
>> That is, the same as before, except omit the USE_LSB_TAG setting.
>
> getting identical result (apart from the pointer value):
Hmm, well, sorry, I'm starting to run low on ideas. We are further than
we were before, no? because 'emacs' has been built?
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#13650
; Package
emacs
.
(Thu, 14 Feb 2013 08:11:02 GMT)
Full text and
rfc822 format available.
Message #62 received at 13650 <at> debbugs.gnu.org (full text, mbox):
> Hmm, well, sorry, I'm starting to run low on ideas. We are further than
> we were before, no? because 'emacs' has been built?
yes it's there
$ file ./emacs-24.2.93/src/temacs
./emacs-24.2.93/src/temacs: executable (RISC System/6000) or object
module not stripped
--
Gilles
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#13650
; Package
emacs
.
(Thu, 14 Feb 2013 14:59:02 GMT)
Full text and
rfc822 format available.
Message #65 received at 13650 <at> debbugs.gnu.org (full text, mbox):
On 02/13/2013 11:43 PM, Gilles Pion wrote:
> getting identical result (apart from the pointer value):
>
> Compiling /sg/paxdev5/D1stunix/src/emacs/24.2.93/emacs-24.2.93/src/../lisp/emacs-lisp/byte-run.el
> Wrong type argument: sequencep, 137012812
> gmake[2]: *** [compile-onefile] Error 255
OK, thanks, I can reproduce that problem on Fedora 17 x86-64,
by manually editing src/config.h so that it says
"#define GC_MARK_STACK GC_USE_GCPROS_AS_BEFORE".
My guess is that a GCPRO is missing somewhere. Ouch.
We won't detect that on typical hosts since GCPROs are noops.
There's a chance that GCPROs can be noops on AIX, too, so
please try what you did before, with the same patch and:
make distclean
./configure CPPFLAGS='-DDATA_START=0x20000000 -DDATA_SEG_BITS=0x20000000'
But then manually edit src/config.h to change this line:
#define GC_MARK_STACK GC_USE_GCPROS_AS_BEFORE
to this:
#define GC_MARK_STACK GC_MAKE_GCPROS_NOOPS
before you do "make".
I suppose we can look into the GCPRO business in the meantime.
I vaguely recall that there have been GCPRO bugfixes in the
trunk since emacs-24 was made -- perhaps backporting them
will fix this. What do you think, Glenn?
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#13650
; Package
emacs
.
(Thu, 14 Feb 2013 15:13:02 GMT)
Full text and
rfc822 format available.
Message #68 received at 13650 <at> debbugs.gnu.org (full text, mbox):
> OK, thanks, I can reproduce that problem on Fedora 17 x86-64,
> by manually editing src/config.h so that it says
> "#define GC_MARK_STACK GC_USE_GCPROS_AS_BEFORE".
> My guess is that a GCPRO is missing somewhere. Ouch.
>
> We won't detect that on typical hosts since GCPROs are noops.
> There's a chance that GCPROs can be noops on AIX, too, so
> please try what you did before, with the same patch and:
>
> make distclean
> ./configure CPPFLAGS='-DDATA_START=0x20000000 -DDATA_SEG_BITS=0x20000000'
>
> But then manually edit src/config.h to change this line:
>
> #define GC_MARK_STACK GC_USE_GCPROS_AS_BEFORE
>
> to this:
>
> #define GC_MARK_STACK GC_MAKE_GCPROS_NOOPS
>
> before you do "make".
>
YESSSSS
Superb!
It Worked!
Emacs on AIX will survive (just hoping not being the last one in the
galaxy using that combo)
--
Gilles
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#13650
; Package
emacs
.
(Thu, 14 Feb 2013 15:48:02 GMT)
Full text and
rfc822 format available.
Message #71 received at 13650 <at> debbugs.gnu.org (full text, mbox):
>> #define GC_MARK_STACK GC_MAKE_GCPROS_NOOPS
[...]
> YESSSSS
Great, one more arch where gcpros aren't needed.
Stefan
Reply sent
to
Paul Eggert <eggert <at> cs.ucla.edu>
:
You have taken responsibility.
(Thu, 14 Feb 2013 22:24:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Gilles Pion <gilles.pion <at> gmail.com>
:
bug acknowledged by developer.
(Thu, 14 Feb 2013 22:24:03 GMT)
Full text and
rfc822 format available.
Message #76 received at 13650-done <at> debbugs.gnu.org (full text, mbox):
On 02/14/13 07:46, Stefan Monnier wrote:
> Great, one more arch where gcpros aren't needed.
Yes, this problem is already solved in the trunk,
as gcpros aren't used on any platform (unless you're
an expert and set them by hand). 24.2.93 uses them
only in AIX, HP-UX, and Unixware. I installed the
patch that fixed Gilles's problem (emacs-24 bzr 111265)
so in the next emacs-24 pretest only HP-UX and Unixware
should use gcpros.
Also, I verified that Dmitry's 2013-01-14 gcpro patch
(trunk bzr 111519) fixes the problem when I build
emacs-24 on Fedora 17 with GC_MARK_STACK manually set to
GC_USE_GCPROS_AS_BEFORE. As this will most likely be needed
for HP-UX and Unixware I backported that patch to emacs-24
(bzr 111266).
Given the YESSSSS I'm marking this as done; if something
else comes up we can always reopen it.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#13650
; Package
emacs
.
(Thu, 14 Feb 2013 23:52:02 GMT)
Full text and
rfc822 format available.
Message #79 received at 13650 <at> debbugs.gnu.org (full text, mbox):
Thank you so much for fixing all this.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Fri, 15 Mar 2013 11:24:02 GMT)
Full text and
rfc822 format available.
This bug report was last modified 11 years and 288 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.