* bug#13650: Emacs pretest 24.2.93 - compilation error on AIX 5.3 using gcc 4.7-2 @ 2013-02-07 9:49 Gilles Pion 2013-02-07 10:57 ` Gilles Pion 0 siblings, 1 reply; 25+ messages in thread From: Gilles Pion @ 2013-02-07 9:49 UTC (permalink / raw) To: 13650 [-- Attachment #1.1: Type: text/plain, Size: 3412 bytes --] /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* [-- Attachment #1.2: Type: text/html, Size: 6172 bytes --] [-- Attachment #2: config.txt --] [-- Type: text/plain, Size: 1225 bytes --] This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by emacs configure 24.2.93, which was generated by GNU Autoconf 2.69. Invocation command line was $ ./configure --prefix=/fdj/opt/emacs-24.2.93 --exec-prefix=/fdj/opt/emacs-24.2.93 --sysconfdir=/etc/fdj/opt/emacs --localstatedir=/var/fdj/opt/emacs --without-kerberos --without-pop --with-x-toolkit=lucid --without-sound --without-kerberos --without-kerberos5 --with-jpeg=no --with-png=no --with-gif=no --with-tiff=no --with-xpm --without-toolkit-scroll-bars --enable-locallisppath=/fdj/share/emacs/site-lisp --without-makeinfo ## --------- ## ## Platform. ## ## --------- ## hostname = ax210 uname -m = 00CD11A44C00 uname -r = 3 uname -s = AIX uname -v = 5 /usr/bin/uname -p = powerpc /bin/uname -X = unknown /bin/arch = unknown /usr/bin/arch -k = unknown /usr/convex/getsysinfo = unknown /usr/bin/hostinfo = unknown /bin/machine = unknown /usr/bin/oslevel = 5.3.0.0 /bin/universe = unknown PATH: /usr/vac/bin PATH: /usr/vacpp/bin PATH: /usr/local/bin PATH: /bin PATH: /usr/bin PATH: /usr/ccs/bin PATH: /opt/freeware/bin ^ permalink raw reply [flat|nested] 25+ messages in thread
* bug#13650: Emacs pretest 24.2.93 - compilation error on AIX 5.3 using gcc 4.7-2 2013-02-07 9:49 bug#13650: Emacs pretest 24.2.93 - compilation error on AIX 5.3 using gcc 4.7-2 Gilles Pion @ 2013-02-07 10:57 ` Gilles Pion 2013-02-07 17:47 ` Glenn Morris 0 siblings, 1 reply; 25+ messages in thread From: Gilles Pion @ 2013-02-07 10:57 UTC (permalink / raw) To: 13650 [-- Attachment #1: Type: text/plain, Size: 4254 bytes --] 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@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* [-- Attachment #2: Type: text/html, Size: 8937 bytes --] ^ permalink raw reply [flat|nested] 25+ messages in thread
* bug#13650: Emacs pretest 24.2.93 - compilation error on AIX 5.3 using gcc 4.7-2 2013-02-07 10:57 ` Gilles Pion @ 2013-02-07 17:47 ` Glenn Morris 2013-02-07 21:17 ` Paul Eggert 0 siblings, 1 reply; 25+ messages in thread From: Glenn Morris @ 2013-02-07 17:47 UTC (permalink / raw) To: Gilles Pion; +Cc: 13650, Paul Eggert 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? ^ permalink raw reply [flat|nested] 25+ messages in thread
* bug#13650: Emacs pretest 24.2.93 - compilation error on AIX 5.3 using gcc 4.7-2 2013-02-07 17:47 ` Glenn Morris @ 2013-02-07 21:17 ` Paul Eggert 2013-02-07 21:42 ` Glenn Morris ` (2 more replies) 0 siblings, 3 replies; 25+ messages in thread From: Paul Eggert @ 2013-02-07 21:17 UTC (permalink / raw) To: Glenn Morris; +Cc: Gilles Pion, 13650 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; ^ permalink raw reply [flat|nested] 25+ messages in thread
* bug#13650: Emacs pretest 24.2.93 - compilation error on AIX 5.3 using gcc 4.7-2 2013-02-07 21:17 ` Paul Eggert @ 2013-02-07 21:42 ` Glenn Morris 2013-02-08 7:09 ` Gilles Pion 2013-02-11 7:51 ` Gilles Pion 2 siblings, 0 replies; 25+ messages in thread From: Glenn Morris @ 2013-02-07 21:42 UTC (permalink / raw) To: Paul Eggert; +Cc: Gilles Pion, 13650 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. ^ permalink raw reply [flat|nested] 25+ messages in thread
* bug#13650: Emacs pretest 24.2.93 - compilation error on AIX 5.3 using gcc 4.7-2 2013-02-07 21:17 ` Paul Eggert 2013-02-07 21:42 ` Glenn Morris @ 2013-02-08 7:09 ` Gilles Pion 2013-02-11 7:51 ` Gilles Pion 2 siblings, 0 replies; 25+ messages in thread From: Gilles Pion @ 2013-02-08 7:09 UTC (permalink / raw) To: Paul Eggert; +Cc: 13650 [-- Attachment #1: Type: text/plain, Size: 4828 bytes --] You'll have to wait until monday for the results but I won't forget! 2013/2/7 Paul Eggert <eggert@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* [-- Attachment #2: Type: text/html, Size: 6177 bytes --] ^ permalink raw reply [flat|nested] 25+ messages in thread
* bug#13650: Emacs pretest 24.2.93 - compilation error on AIX 5.3 using gcc 4.7-2 2013-02-07 21:17 ` Paul Eggert 2013-02-07 21:42 ` Glenn Morris 2013-02-08 7:09 ` Gilles Pion @ 2013-02-11 7:51 ` Gilles Pion 2013-02-11 21:18 ` Paul Eggert 2 siblings, 1 reply; 25+ messages in thread From: Gilles Pion @ 2013-02-11 7:51 UTC (permalink / raw) To: Paul Eggert; +Cc: 13650 > 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 ^ permalink raw reply [flat|nested] 25+ messages in thread
* bug#13650: Emacs pretest 24.2.93 - compilation error on AIX 5.3 using gcc 4.7-2 2013-02-11 7:51 ` Gilles Pion @ 2013-02-11 21:18 ` Paul Eggert 2013-02-12 8:06 ` Gilles Pion 0 siblings, 1 reply; 25+ messages in thread From: Paul Eggert @ 2013-02-11 21:18 UTC (permalink / raw) To: Gilles Pion; +Cc: 13650 [-- Attachment #1: Type: text/plain, Size: 321 bytes --] 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. [-- Attachment #2: aixpatch.txt --] [-- Type: text/plain, Size: 3476 bytes --] === modified file 'src/pre-crt0.c' --- src/pre-crt0.c 2011-01-15 23:16:57 +0000 +++ src/pre-crt0.c 2013-02-11 21:07:33 +0000 @@ -4,7 +4,7 @@ that make environ an initialized variable. However, we do need to make sure the label data_start exists anyway. */ -/* Create a label to appear at the beginning of data space. */ - -int data_start = 0; - +/* Create a label to appear at the beginning of data space. + Its value is nonzero so that it cannot be put into bss. */ + +int data_start = 1; === modified file 'src/unexaix.c' --- src/unexaix.c 2013-02-11 20:32:54 +0000 +++ src/unexaix.c 2013-02-11 21:03:46 +0000 @@ -61,10 +61,8 @@ #include "mem-limits.h" -char *start_of_text (void); /* Start of text */ - -extern int _data; -extern int _text; +extern char _data[]; +extern char _text[]; #include <filehdr.h> #include <aouthdr.h> @@ -73,15 +71,15 @@ static struct filehdr f_hdr; /* File header */ static struct aouthdr f_ohdr; /* Optional file header (a.out) */ -static long bias; /* Bias to add for growth */ -static long lnnoptr; /* Pointer to line-number info within file */ +static off_t bias; /* Bias to add for growth */ +static off_t lnnoptr; /* Pointer to line-number info within file */ -static long text_scnptr; -static long data_scnptr; +static off_t text_scnptr; +static off_t data_scnptr; #define ALIGN(val, pwr) (((val) + ((1L<<(pwr))-1)) & ~((1L<<(pwr))-1)) -static long load_scnptr; -static long orig_load_scnptr; -static long orig_data_scnptr; +static off_t load_scnptr; +static off_t orig_load_scnptr; +static off_t orig_data_scnptr; static int unrelocate_symbols (int, int, const char *, const char *); #ifndef MAX_SECTIONS @@ -188,7 +186,7 @@ pagemask = getpagesize () - 1; /* Adjust text/data boundary. */ - data_start = (uintptr_t) start_of_data (); + data_start = (uintptr_t) _data; data_start = data_start & ~pagemask; /* (Down) to page boundary. */ @@ -288,7 +286,7 @@ /* fix scnptr's */ { - ulong ptr = section[0].s_scnptr; + off_t ptr = section[0].s_scnptr; bias = -1; for (scns = 0; scns < f_hdr.f_nscns; scns++) @@ -384,12 +382,12 @@ char *end; char *ptr; - lseek (new, (long) text_scnptr, SEEK_SET); - ptr = start_of_text () + text_scnptr; + lseek (new, text_scnptr, SEEK_SET); + ptr = _text + text_scnptr; end = ptr + f_ohdr.tsize; write_segment (new, ptr, end); - lseek (new, (long) data_scnptr, SEEK_SET); + lseek (new, data_scnptr, SEEK_SET); ptr = (char *) f_ohdr.data_start; end = ptr + f_ohdr.dsize; write_segment (new, ptr, end); @@ -549,13 +547,13 @@ int i; LDHDR ldhdr; LDREL ldrel; - ulong t_reloc = (ulong) &_text - f_ohdr.text_start; + off_t t_reloc = (intptr_t) _text - f_ohdr.text_start; #ifndef ALIGN_DATA_RELOC - ulong d_reloc = (ulong) &_data - f_ohdr.data_start; + off_t d_reloc = (intptr_t) _data - f_ohdr.data_start; #else /* This worked (and was needed) before AIX 4.2. I have no idea why. -- Mike */ - ulong d_reloc = (ulong) &_data - ALIGN (f_ohdr.data_start, 2); + off_t d_reloc = (intptr_t) _data - ALIGN (f_ohdr.data_start, 2); #endif int * p; @@ -640,16 +638,3 @@ } return 0; } - -/* - * Return the address of the start of the text segment prior to - * doing an unexec. After unexec the return value is undefined. - * See crt0.c for further explanation and _start. - * - */ - -char * -start_of_text (void) -{ - return ((char *) 0x10000000); -} ^ permalink raw reply [flat|nested] 25+ messages in thread
* bug#13650: Emacs pretest 24.2.93 - compilation error on AIX 5.3 using gcc 4.7-2 2013-02-11 21:18 ` Paul Eggert @ 2013-02-12 8:06 ` Gilles Pion 2013-02-12 19:03 ` Paul Eggert 0 siblings, 1 reply; 25+ messages in thread From: Gilles Pion @ 2013-02-12 8:06 UTC (permalink / raw) To: Paul Eggert; +Cc: 13650 > 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 ^ permalink raw reply [flat|nested] 25+ messages in thread
* bug#13650: Emacs pretest 24.2.93 - compilation error on AIX 5.3 using gcc 4.7-2 2013-02-12 8:06 ` Gilles Pion @ 2013-02-12 19:03 ` Paul Eggert 2013-02-13 11:27 ` Gilles Pion 0 siblings, 1 reply; 25+ messages in thread From: Paul Eggert @ 2013-02-12 19:03 UTC (permalink / raw) To: Gilles Pion; +Cc: 13650 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. ^ permalink raw reply [flat|nested] 25+ messages in thread
* bug#13650: Emacs pretest 24.2.93 - compilation error on AIX 5.3 using gcc 4.7-2 2013-02-12 19:03 ` Paul Eggert @ 2013-02-13 11:27 ` Gilles Pion 2013-02-13 18:37 ` Glenn Morris 0 siblings, 1 reply; 25+ messages in thread From: Gilles Pion @ 2013-02-13 11:27 UTC (permalink / raw) To: Paul Eggert; +Cc: 13650 2013/2/12 Paul Eggert <eggert@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 ^ permalink raw reply [flat|nested] 25+ messages in thread
* bug#13650: Emacs pretest 24.2.93 - compilation error on AIX 5.3 using gcc 4.7-2 2013-02-13 11:27 ` Gilles Pion @ 2013-02-13 18:37 ` Glenn Morris 2013-02-13 23:13 ` Paul Eggert 0 siblings, 1 reply; 25+ messages in thread From: Glenn Morris @ 2013-02-13 18:37 UTC (permalink / raw) To: Gilles Pion; +Cc: 13650, Paul Eggert 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. ^ permalink raw reply [flat|nested] 25+ messages in thread
* bug#13650: Emacs pretest 24.2.93 - compilation error on AIX 5.3 using gcc 4.7-2 2013-02-13 18:37 ` Glenn Morris @ 2013-02-13 23:13 ` Paul Eggert 2013-02-13 23:33 ` Glenn Morris 0 siblings, 1 reply; 25+ messages in thread From: Paul Eggert @ 2013-02-13 23:13 UTC (permalink / raw) To: Glenn Morris; +Cc: Gilles Pion, 13650 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....) ^ permalink raw reply [flat|nested] 25+ messages in thread
* bug#13650: Emacs pretest 24.2.93 - compilation error on AIX 5.3 using gcc 4.7-2 2013-02-13 23:13 ` Paul Eggert @ 2013-02-13 23:33 ` Glenn Morris 2013-02-14 2:49 ` Paul Eggert 0 siblings, 1 reply; 25+ messages in thread From: Glenn Morris @ 2013-02-13 23:33 UTC (permalink / raw) To: Paul Eggert; +Cc: Gilles Pion, 13650 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? ^ permalink raw reply [flat|nested] 25+ messages in thread
* bug#13650: Emacs pretest 24.2.93 - compilation error on AIX 5.3 using gcc 4.7-2 2013-02-13 23:33 ` Glenn Morris @ 2013-02-14 2:49 ` Paul Eggert 2013-02-14 7:28 ` Gilles Pion 0 siblings, 1 reply; 25+ messages in thread From: Paul Eggert @ 2013-02-14 2:49 UTC (permalink / raw) To: Glenn Morris; +Cc: Gilles Pion, 13650 [-- Attachment #1: Type: text/plain, Size: 1571 bytes --] 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. [-- Attachment #2: aix.txt --] [-- Type: text/plain, Size: 1622 bytes --] diff -pru emacs-24.2.93/src/lisp.h emacs-24.2.93-AIX/src/lisp.h --- emacs-24.2.93/src/lisp.h 2013-01-01 12:37:17.000000000 -0800 +++ emacs-24.2.93-AIX/src/lisp.h 2013-02-13 18:05:17.635430235 -0800 @@ -496,13 +496,9 @@ static EMACS_INT const VALMASK (XIL ((EMACS_INT) ((EMACS_UINT) (type) << VALBITS) \ + ((intptr_t) (ptr) & VALMASK))) -#if DATA_SEG_BITS /* DATA_SEG_BITS forces extra bits to be or'd in with any pointers which were stored in a Lisp_Object. */ #define XPNTR(a) ((uintptr_t) ((XLI (a) & VALMASK)) | DATA_SEG_BITS)) -#else -#define XPNTR(a) ((uintptr_t) (XLI (a) & VALMASK)) -#endif #endif /* not USE_LSB_TAG */ diff -pru emacs-24.2.93/src/unexaix.c emacs-24.2.93-AIX/src/unexaix.c --- emacs-24.2.93/src/unexaix.c 2013-01-01 12:37:17.000000000 -0800 +++ emacs-24.2.93-AIX/src/unexaix.c 2013-02-13 18:23:19.179525573 -0800 @@ -57,9 +57,8 @@ what you give them. Help stamp out sof #include <unistd.h> #include <fcntl.h> -#include "mem-limits.h" - char *start_of_text (void); /* Start of text */ +extern char *start_of_data (void); /* Start of initialized data */ extern int _data; extern int _text; @@ -90,6 +89,7 @@ static int adjust_lnnoptrs (int, int, co static int pagemask; +#include <setjmp.h> #include "lisp.h" static void @@ -104,6 +104,9 @@ report_error (const char *file, int fd) #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 +#undef ADDR_CORRECT +#define ADDR_CORRECT(x) ((int)(x)) + static void report_error_1 (int fd, const char *msg, int a1, int a2) { ^ permalink raw reply [flat|nested] 25+ messages in thread
* bug#13650: Emacs pretest 24.2.93 - compilation error on AIX 5.3 using gcc 4.7-2 2013-02-14 2:49 ` Paul Eggert @ 2013-02-14 7:28 ` Gilles Pion 2013-02-14 7:32 ` Paul Eggert 0 siblings, 1 reply; 25+ messages in thread From: Gilles Pion @ 2013-02-14 7:28 UTC (permalink / raw) To: Paul Eggert; +Cc: 13650 2013/2/14 Paul Eggert <eggert@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 ^ permalink raw reply [flat|nested] 25+ messages in thread
* bug#13650: Emacs pretest 24.2.93 - compilation error on AIX 5.3 using gcc 4.7-2 2013-02-14 7:28 ` Gilles Pion @ 2013-02-14 7:32 ` Paul Eggert 2013-02-14 7:43 ` Gilles Pion 0 siblings, 1 reply; 25+ messages in thread From: Paul Eggert @ 2013-02-14 7:32 UTC (permalink / raw) To: Gilles Pion; +Cc: 13650 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. ^ permalink raw reply [flat|nested] 25+ messages in thread
* bug#13650: Emacs pretest 24.2.93 - compilation error on AIX 5.3 using gcc 4.7-2 2013-02-14 7:32 ` Paul Eggert @ 2013-02-14 7:43 ` Gilles Pion 2013-02-14 7:56 ` Paul Eggert 2013-02-14 14:57 ` Paul Eggert 0 siblings, 2 replies; 25+ messages in thread From: Gilles Pion @ 2013-02-14 7:43 UTC (permalink / raw) To: Paul Eggert; +Cc: 13650 2013/2/14 Paul Eggert <eggert@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 ^ permalink raw reply [flat|nested] 25+ messages in thread
* bug#13650: Emacs pretest 24.2.93 - compilation error on AIX 5.3 using gcc 4.7-2 2013-02-14 7:43 ` Gilles Pion @ 2013-02-14 7:56 ` Paul Eggert 2013-02-14 8:09 ` Gilles Pion 2013-02-14 14:57 ` Paul Eggert 1 sibling, 1 reply; 25+ messages in thread From: Paul Eggert @ 2013-02-14 7:56 UTC (permalink / raw) To: Gilles Pion; +Cc: 13650 On 02/13/2013 11:43 PM, Gilles Pion wrote: > 2013/2/14 Paul Eggert <eggert@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? ^ permalink raw reply [flat|nested] 25+ messages in thread
* bug#13650: Emacs pretest 24.2.93 - compilation error on AIX 5.3 using gcc 4.7-2 2013-02-14 7:56 ` Paul Eggert @ 2013-02-14 8:09 ` Gilles Pion 0 siblings, 0 replies; 25+ messages in thread From: Gilles Pion @ 2013-02-14 8:09 UTC (permalink / raw) To: Paul Eggert; +Cc: 13650 > 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 ^ permalink raw reply [flat|nested] 25+ messages in thread
* bug#13650: Emacs pretest 24.2.93 - compilation error on AIX 5.3 using gcc 4.7-2 2013-02-14 7:43 ` Gilles Pion 2013-02-14 7:56 ` Paul Eggert @ 2013-02-14 14:57 ` Paul Eggert 2013-02-14 15:11 ` Gilles Pion 1 sibling, 1 reply; 25+ messages in thread From: Paul Eggert @ 2013-02-14 14:57 UTC (permalink / raw) To: Gilles Pion; +Cc: 13650 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? ^ permalink raw reply [flat|nested] 25+ messages in thread
* bug#13650: Emacs pretest 24.2.93 - compilation error on AIX 5.3 using gcc 4.7-2 2013-02-14 14:57 ` Paul Eggert @ 2013-02-14 15:11 ` Gilles Pion 2013-02-14 15:46 ` Stefan Monnier 0 siblings, 1 reply; 25+ messages in thread From: Gilles Pion @ 2013-02-14 15:11 UTC (permalink / raw) To: Paul Eggert; +Cc: 13650 > 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 ^ permalink raw reply [flat|nested] 25+ messages in thread
* bug#13650: Emacs pretest 24.2.93 - compilation error on AIX 5.3 using gcc 4.7-2 2013-02-14 15:11 ` Gilles Pion @ 2013-02-14 15:46 ` Stefan Monnier 2013-02-14 22:23 ` Paul Eggert 0 siblings, 1 reply; 25+ messages in thread From: Stefan Monnier @ 2013-02-14 15:46 UTC (permalink / raw) To: Gilles Pion; +Cc: 13650, Paul Eggert >> #define GC_MARK_STACK GC_MAKE_GCPROS_NOOPS [...] > YESSSSS Great, one more arch where gcpros aren't needed. Stefan ^ permalink raw reply [flat|nested] 25+ messages in thread
* bug#13650: Emacs pretest 24.2.93 - compilation error on AIX 5.3 using gcc 4.7-2 2013-02-14 15:46 ` Stefan Monnier @ 2013-02-14 22:23 ` Paul Eggert 2013-02-14 23:51 ` Glenn Morris 0 siblings, 1 reply; 25+ messages in thread From: Paul Eggert @ 2013-02-14 22:23 UTC (permalink / raw) To: Stefan Monnier; +Cc: Gilles Pion, 13650-done 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. ^ permalink raw reply [flat|nested] 25+ messages in thread
* bug#13650: Emacs pretest 24.2.93 - compilation error on AIX 5.3 using gcc 4.7-2 2013-02-14 22:23 ` Paul Eggert @ 2013-02-14 23:51 ` Glenn Morris 0 siblings, 0 replies; 25+ messages in thread From: Glenn Morris @ 2013-02-14 23:51 UTC (permalink / raw) To: eggert; +Cc: 13650 Thank you so much for fixing all this. ^ permalink raw reply [flat|nested] 25+ messages in thread
end of thread, other threads:[~2013-02-14 23:51 UTC | newest] Thread overview: 25+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2013-02-07 9:49 bug#13650: Emacs pretest 24.2.93 - compilation error on AIX 5.3 using gcc 4.7-2 Gilles Pion 2013-02-07 10:57 ` Gilles Pion 2013-02-07 17:47 ` Glenn Morris 2013-02-07 21:17 ` Paul Eggert 2013-02-07 21:42 ` Glenn Morris 2013-02-08 7:09 ` Gilles Pion 2013-02-11 7:51 ` Gilles Pion 2013-02-11 21:18 ` Paul Eggert 2013-02-12 8:06 ` Gilles Pion 2013-02-12 19:03 ` Paul Eggert 2013-02-13 11:27 ` Gilles Pion 2013-02-13 18:37 ` Glenn Morris 2013-02-13 23:13 ` Paul Eggert 2013-02-13 23:33 ` Glenn Morris 2013-02-14 2:49 ` Paul Eggert 2013-02-14 7:28 ` Gilles Pion 2013-02-14 7:32 ` Paul Eggert 2013-02-14 7:43 ` Gilles Pion 2013-02-14 7:56 ` Paul Eggert 2013-02-14 8:09 ` Gilles Pion 2013-02-14 14:57 ` Paul Eggert 2013-02-14 15:11 ` Gilles Pion 2013-02-14 15:46 ` Stefan Monnier 2013-02-14 22:23 ` Paul Eggert 2013-02-14 23:51 ` Glenn Morris
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).