Problem to compile zaptel

Hello,

I am currently installing asterisk on Debian. I am on a 2.4 kernel. I installed all packages required for this installation.I compiled libpri successfully but I can not compile zaptel. “. /configure” does neither of error or warning. However when I do the “make” it gives me this error:

make[1]: entrant dans le répertoire « /usr/src/asterisk/zaptel-1.4.6/menuselect »
make[2]: entrant dans le répertoire « /usr/src/asterisk/zaptel-1.4.6/menuselect »
make[3]: entrant dans le répertoire « /usr/src/asterisk/zaptel-1.4.6/menuselect/mxml »
if test -f config.status; then \
                ./config.status --recheck; \
                ./config.status; \
        else \
                ./configure; \
        fi
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for a BSD-compatible install... /usr/bin/install -c
checking for ranlib... ranlib
checking for ar... /usr/bin/ar
checking for cp... /bin/cp
checking for ln... /bin/ln -s -s -s -s
checking for mkdir... /bin/mkdir
checking for nroff... /usr/bin/nroff
checking for rm... /bin/rm
checking for strdup... yes
checking for vsnprintf... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating mxml.list
config.status: creating mxml.pc
config.status: creating config.h
touch config.h
gcc -O -Wall -O -Wall -O -Wall -O -Wall      -c mxml-attr.c
gcc -O -Wall -O -Wall -O -Wall -O -Wall      -c mxml-entity.c
gcc -O -Wall -O -Wall -O -Wall -O -Wall      -c mxml-file.c
gcc -O -Wall -O -Wall -O -Wall -O -Wall      -c mxml-index.c
gcc -O -Wall -O -Wall -O -Wall -O -Wall      -c mxml-node.c
gcc -O -Wall -O -Wall -O -Wall -O -Wall      -c mxml-search.c
gcc -O -Wall -O -Wall -O -Wall -O -Wall      -c mxml-set.c
gcc -O -Wall -O -Wall -O -Wall -O -Wall      -c mxml-private.c
gcc -O -Wall -O -Wall -O -Wall -O -Wall      -c mxml-string.c
/bin/rm -f libmxml.a
/usr/bin/ar crvs libmxml.a mxml-attr.o mxml-entity.o mxml-file.o mxml-index.o mxml-node.o mxml-search.o mxml-set.o mxml-private.o mxml-string.o
a - mxml-attr.o
a - mxml-entity.o
a - mxml-file.o
a - mxml-index.o
a - mxml-node.o
a - mxml-search.o
a - mxml-set.o
a - mxml-private.o
a - mxml-string.o
ranlib libmxml.a
make[3]: quittant le répertoire « /usr/src/asterisk/zaptel-1.4.6/menuselect/mxml »
gcc -Wall  -o menuselect.o -g -c -D_GNU_SOURCE menuselect.c
gcc -Wall  -o menuselect_curses.o -g -c -D_GNU_SOURCE  menuselect_curses.c
gcc -Wall  -o strcompat.o -g -c -D_GNU_SOURCE strcompat.c
gcc -g -Wall -o menuselect menuselect.o menuselect_curses.o strcompat.o mxml/libmxml.a -lncurses
make[2]: quittant le répertoire « /usr/src/asterisk/zaptel-1.4.6/menuselect »
make[1]: quittant le répertoire « /usr/src/asterisk/zaptel-1.4.6/menuselect »
make[1]: entrant dans le répertoire « /usr/src/asterisk/zaptel-1.4.6 »
gcc -o gendigits gendigits.c -lm
./gendigits > tones.h
gcc -o makefw makefw.c
./makefw tormenta2.rbt tor2fw > tor2fw.h
Loaded 69900 bytes from file
./makefw pciradio.rbt radfw > radfw.h
Loaded 42096 bytes from file
gcc -I/lib/modules/2.4.27-3-386/build/include -O6 -DMODULE -D__KERNEL__ -DEXPORT_SYMTAB -I/lib/modules/2.4.27-3-386/build/drivers/net -Wall -I. -Wstrict-prototypes -fomit-frame-pointer -I/lib/modules/2.4.27-3-386/build/drivers/net/wan -I/lib/modules/2.4.27-3-386/build/include/net -DMODVERSIONS -include /lib/modules/2.4.27-3-386/build/include/linux/modversions.h  -DSTANDALONE_ZAPATA -o pciradio.o -c pciradio.c
In file included from /lib/modules/2.4.27-3-386/build/include/linux/kernel.h:15,
                 from pciradio.c:46:
/lib/modules/2.4.27-3-386/build/include/asm/byteorder.h:14: warning: type qualifiers ignored on function return type
/lib/modules/2.4.27-3-386/build/include/asm/byteorder.h:30: warning: type qualifiers ignored on function return type
In file included from /lib/modules/2.4.27-3-386/build/include/linux/byteorder/little_endian.h:11,
                 from /lib/modules/2.4.27-3-386/build/include/asm/byteorder.h:65,
                 from /lib/modules/2.4.27-3-386/build/include/linux/kernel.h:15,
                 from pciradio.c:46:
/lib/modules/2.4.27-3-386/build/include/linux/byteorder/swab.h:160: warning: type qualifiers ignored on function return type
/lib/modules/2.4.27-3-386/build/include/linux/byteorder/swab.h:173: warning: type qualifiers ignored on function return type
/lib/modules/2.4.27-3-386/build/include/linux/byteorder/swab.h:186: warning: type qualifiers ignored on function return type
/lib/modules/2.4.27-3-386/build/include/linux/byteorder/swab.h:200: warning: type qualifiers ignored on function return type
In file included from /lib/modules/2.4.27-3-386/build/include/linux/spinlock.h:6,
                 from /lib/modules/2.4.27-3-386/build/include/linux/module.h:12,
                 from pciradio.c:48:
/lib/modules/2.4.27-3-386/build/include/asm/system.h: In function '__set_64bit_var':
/lib/modules/2.4.27-3-386/build/include/asm/system.h:190: warning: dereferencing type-punned pointer will break strict-aliasing rules
/lib/modules/2.4.27-3-386/build/include/asm/system.h:190: warning: dereferencing type-punned pointer will break strict-aliasing rules
In file included from /lib/modules/2.4.27-3-386/build/include/linux/prefetch.h:13,
                 from /lib/modules/2.4.27-3-386/build/include/linux/list.h:6,
                 from /lib/modules/2.4.27-3-386/build/include/linux/module.h:13,
                 from pciradio.c:48:
/lib/modules/2.4.27-3-386/build/include/asm/processor.h: At top level:
/lib/modules/2.4.27-3-386/build/include/asm/processor.h:75: error: array type has incomplete element type
In file included from /lib/modules/2.4.27-3-386/build/include/linux/fs.h:324,
                 from /lib/modules/2.4.27-3-386/build/include/linux/capability.h:17,
                 from /lib/modules/2.4.27-3-386/build/include/linux/binfmts.h:5,
                 from /lib/modules/2.4.27-3-386/build/include/linux/sched.h:9,
                 from /lib/modules/2.4.27-3-386/build/include/linux/mm.h:4,
                 from /lib/modules/2.4.27-3-386/build/include/linux/slab.h:14,
                 from /lib/modules/2.4.27-3-386/build/include/asm/pci.h:38,
                 from /lib/modules/2.4.27-3-386/build/include/linux/pci.h:683,
                 from pciradio.c:51:
/lib/modules/2.4.27-3-386/build/include/linux/ncp_fs_i.h:26: warning: 'packed' attribute ignored for field of type '__u8'
/lib/modules/2.4.27-3-386/build/include/linux/ncp_fs_i.h:27: warning: 'packed' attribute ignored for field of type '__u8[6]'
In file included from /lib/modules/2.4.27-3-386/build/include/linux/ncp_mount.h:12,
                 from /lib/modules/2.4.27-3-386/build/include/linux/ncp_fs_sb.h:12,
                 from /lib/modules/2.4.27-3-386/build/include/linux/fs.h:734,
                 from /lib/modules/2.4.27-3-386/build/include/linux/capability.h:17,
                 from /lib/modules/2.4.27-3-386/build/include/linux/binfmts.h:5,
                 from /lib/modules/2.4.27-3-386/build/include/linux/sched.h:9,
                 from /lib/modules/2.4.27-3-386/build/include/linux/mm.h:4,
                 from /lib/modules/2.4.27-3-386/build/include/linux/slab.h:14,
                 from /lib/modules/2.4.27-3-386/build/include/asm/pci.h:38,
                 from /lib/modules/2.4.27-3-386/build/include/linux/pci.h:683,
                 from pciradio.c:51:
/lib/modules/2.4.27-3-386/build/include/linux/ncp.h:24: warning: 'packed' attribute ignored for field of type '__u8'
/lib/modules/2.4.27-3-386/build/include/linux/ncp.h:25: warning: 'packed' attribute ignored for field of type '__u8'
/lib/modules/2.4.27-3-386/build/include/linux/ncp.h:26: warning: 'packed' attribute ignored for field of type '__u8'
/lib/modules/2.4.27-3-386/build/include/linux/ncp.h:27: warning: 'packed' attribute ignored for field of type '__u8'
/lib/modules/2.4.27-3-386/build/include/linux/ncp.h:28: warning: 'packed' attribute ignored for field of type '__u8'
/lib/modules/2.4.27-3-386/build/include/linux/ncp.h:29: warning: 'packed' attribute ignored for field of type '__u8[]'
/lib/modules/2.4.27-3-386/build/include/linux/ncp.h:37: warning: 'packed' attribute ignored for field of type '__u8'
/lib/modules/2.4.27-3-386/build/include/linux/ncp.h:38: warning: 'packed' attribute ignored for field of type '__u8'
/lib/modules/2.4.27-3-386/build/include/linux/ncp.h:39: warning: 'packed' attribute ignored for field of type '__u8'
/lib/modules/2.4.27-3-386/build/include/linux/ncp.h:40: warning: 'packed' attribute ignored for field of type '__u8'
/lib/modules/2.4.27-3-386/build/include/linux/ncp.h:41: warning: 'packed' attribute ignored for field of type '__u8'
/lib/modules/2.4.27-3-386/build/include/linux/ncp.h:42: warning: 'packed' attribute ignored for field of type '__u8'
/lib/modules/2.4.27-3-386/build/include/linux/ncp.h:43: warning: 'packed' attribute ignored for field of type '__u8[]'
/lib/modules/2.4.27-3-386/build/include/linux/ncp.h:137: warning: 'packed' attribute ignored for field of type '__u8'
/lib/modules/2.4.27-3-386/build/include/linux/ncp.h:138: warning: 'packed' attribute ignored for field of type '__u8[256]'
/lib/modules/2.4.27-3-386/build/include/linux/ncp.h:174: warning: 'packed' attribute ignored for field of type '__u8'
make[1]: *** [pciradio.o] Erreur 1
make[1]: quittant le répertoire « /usr/src/asterisk/zaptel-1.4.6 »
make: *** [all] Erreur 2

I tried to install a more recent kernel (2.6), but it is the same.

an idea?

Which version of gcc are you using? I have recently compiled Asterisk V1.4 on Debian etch ,2.6 kernel using gcc 4.1.2.

I use version 4.1 of gcc.
Do I absolutely must have the version 4.1.2?

No. It should have worked even with gcc 4.1. Have you searched the web for the compile time errors that you are getting?

I think you can safely ignore the warnings. The fatal error that you are getting is “array has incomplete element type”.

Please refer to the following link:

bugzilla.kernel.org/show_bug.cgi?id=5478

It says that, "gcc 4 is not and will never be a supported compiler for kernel 2.4.

Please use either an older compiler or kernel 2.6."

The solution is also given in the same page:

make CC=gcc-2.95 or some version prior to gcc-4.

Thank you very much for your response! It was several days that I was on this problem and I was desperate.
I install gcc-3.3, and it works perfectly. :smiley:

You are most welcome.