Mihai Criveti | 4 Aug 15:32

ZSH 4.3.6 fails to compile (module.c: 1453) on AIX 5300-08-01 (AIX 5.3 TL 8), ZSH 4.2.7 compiles

Hi. I'm trying to build zsh 4.3.6 on AIX 5300-08-01 using gcc 4.2.4
and Autoconf 2.61. Configure works fine, but the build fails after
some time with:

        gcc -c -I.  -DHAVE_CONFIG_H -Wall -Wmissing-prototypes -O2  -o
linklist.o linklist.c
        gcc -c -I.  -DHAVE_CONFIG_H -Wall -Wmissing-prototypes -O2  -o
loop.o loop.c
        gcc -c -I.  -DHAVE_CONFIG_H -Wall -Wmissing-prototypes -O2  -o
math.o math.c
        gcc -c -I.  -DHAVE_CONFIG_H -Wall -Wmissing-prototypes -O2  -o
mem.o mem.c
        gcc -c -I.  -DHAVE_CONFIG_H -Wall -Wmissing-prototypes -O2  -o
module.o module.c
module.c: In function 'load_and_bind':
module.c:1453: warning: assignment from incompatible pointer type
module.c:1454: error: 'struct module' has no member named 'flags'
module.c:1455: error: 'struct module' has no member named 'flags'
make: 1254-004 The error code from the last command is 1.

Stop.
make: 1254-004 The error code from the last command is 2.

Stop.
make: 1254-004 The error code from the last command is 2.

Stop.

That line in module.c looks like:

(Continue reading)

Peter Stephenson | 4 Aug 17:12
Favicon

Re: ZSH 4.3.6 fails to compile (module.c: 1453) on AIX 5300-08-01 (AIX 5.3 TL 8), ZSH 4.2.7 compiles

"Mihai Criveti" wrote:
> Hi. I'm trying to build zsh 4.3.6 on AIX 5300-08-01 using gcc 4.2.4
> and Autoconf 2.61. Configure works fine, but the build fails after
> some time with:
> 
>         gcc -c -I.  -DHAVE_CONFIG_H -Wall -Wmissing-prototypes -O2  -o
> module.o module.c
> module.c: In function 'load_and_bind':
> module.c:1453: warning: assignment from incompatible pointer type
> module.c:1454: error: 'struct module' has no member named 'flags'
> module.c:1455: error: 'struct module' has no member named 'flags'
> make: 1254-004 The error code from the last command is 1.

This should fix that bit... unfortunately I am writing this completely
blind for AIX, so please report any further problems.

Index: Src/module.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/module.c,v
retrieving revision 1.38
diff -u -r1.38 module.c
--- Src/module.c	8 May 2008 14:04:52 -0000	1.38
+++ Src/module.c	4 Aug 2008 15:08:36 -0000
@@ -1450,9 +1450,9 @@
 	int i, err = loadbind(0, (void *) addbuiltin, ret);
 	for (i = 0; i < modulestab->hsize && !err; i++) {
 	    for (m = (Module)modulestab->nodes[i]; m && !err;
-		 m = m->node.next) {
-		if (!(m->flags & MOD_ALIAS) &&
-		    m->u.handle && !(m->flags & MOD_LINKED))
(Continue reading)

Mihai Criveti | 4 Aug 18:03

Re: ZSH 4.3.6 fails to compile (module.c: 1453) on AIX 5300-08-01 (AIX 5.3 TL 8), ZSH 4.2.7 compiles

Thanks Peter, that did the trick for module.c, it compiles. Though
make fails a bit after that.

Here's the ./configure output, this one works quite well:

zsh configuration
-----------------
zsh version               : 4.3.6
host operating system     : powerpc-ibm-aix5.3.0.0
source code location      : .
compiler                  : gcc
preprocessor flags        :
executable compiler flags :  -Wall -Wmissing-prototypes -O2
module compiler flags     :  -Wall -Wmissing-prototypes -O2
executable linker flags   :   -s
module linker flags       :   -s -shared
library flags             : -liconv -ldl -lncurses -lm  -lc
installation basename     : zsh
binary install path       : /usr/local/bin
man page install path     : ${prefix}/share/man
info install path         : ${prefix}/share/info
functions install path    : ${prefix}/share/zsh/4.3.6/functions
See config.modules for installed modules and functions.

I'm using gmake 3.81 btw:

[...]

Creating `zshxmods.h'.
echo '#define ZSH_VERSION "'4.3.6'"' > version.h
(Continue reading)

Peter Stephenson | 4 Aug 18:17
Favicon

Re: ZSH 4.3.6 fails to compile (module.c: 1453) on AIX 5300-08-01 (AIX 5.3 TL 8), ZSH 4.2.7 compiles

On Mon, 4 Aug 2008 19:03:09 +0300
"Mihai Criveti" <cmihai <at> boreas.ro> wrote:
> Thanks Peter, that did the trick for module.c, it compiles. Though
> make fails a bit after that.
> gcc -c -I.  -DHAVE_CONFIG_H -DMODULE -Wall -Wmissing-prototypes -O2
> -o curses..o curses.c
> In file included from ../../Src/zsh.mdh:18,
>                  from curses.mdh:17,
>                  from curses.c:32:
> ../../Src/zsh.h:1871: error: field 'winsize' has incomplete type
> gmake[3]: *** [curses..o] Error 1

"struct winsize" is used throught the zsh source; this suggests that it's
not being defined in this case because of different code options.  The
obvious candidate is _XOPEN_SOURCE_EXTENDED, which has caused problems on
other systems.

The best I can think of is therefore to turn that off, which requires
rebuilding configure.  Not defining _XOPEN_SOURCE_EXTENDED might have side
effects in curses.

If it's not easy to track down what's going on, it might simply want to set
the "link=no" against the zsh/curses line in config.modules and run "make
prep" before compiling so as not to compile zsh/curses.  It's not currently
required by anything else.

Index: configure.ac
===================================================================
RCS file: /cvsroot/zsh/zsh/configure.ac,v
retrieving revision 1.106
(Continue reading)


Gmane