Bug#510140: #510140 - zaptel-source: Zaptel modules fail to build under etch-and-a-half

Patrik Schindler poc at pocnet.net
Thu Jan 8 20:54:47 UTC 2009


Hello,

thanks for the fast answer.

On 2009-01-08, 20:42 Karl Schmidt wrote:

> I could not find a fix - I had to go back to the older kernel. If  
> you could provide further information - I wonder if this bug is  
> specific to AMD64 kernels?


I don't use AMD64.

133er:~# uname -r
2.6.24-etchnhalf.1-486

gcc-4.1 -fno-inline-functions -O2 -fno-inline-functions -O2 -I. -O2 - 
g -Wall -DBUILDING_TONEZONE    -DSTANDALONE_ZAPATA -DZAPTEL_CONFIG=\"/ 
etc/zaptel.conf\" -DHOTPLUG_FIRMWARE    ztpty.c   -o ztpty
ztpty.c: In function 'main':
ztpty.c:80: warning: implicit declaration of function 'ioctl'
/lib/modules/2.6.24-etchnhalf.1-486/build
make -C /lib/modules/2.6.24-etchnhalf.1-486/build SUBDIRS=/usr/src/ 
modules/zaptel modules
make[3]: Entering directory `/usr/src/linux-headers-2.6.24-etchnhalf. 
1-486'
scripts/Makefile.build:46: *** CFLAGS was changed in "/usr/src/ 
modules/zaptel/Makefile". Fix it to use EXTRA_CFLAGS.  Stop.
make[3]: *** [_module_/usr/src/modules/zaptel] Error 2
make[3]: Leaving directory `/usr/src/linux-headers-2.6.24-etchnhalf. 
1-486'
make[2]: *** [linux26] Error 2
make[2]: Leaving directory `/usr/src/modules/zaptel'
make[1]: *** [binary-modules] Error 2
make[1]: Leaving directory `/usr/src/modules/zaptel'
make: *** [kdist_build] Error 2


I used module-assisstant to automatically determine needed programs  
and headers.


I digged a bit deeper into the issue.

 From /usr/src/linux-kbuild-2.6.24/scripts/Makefile.build:
# If the save-* variables changed error out
ifeq ($(KBUILD_NOPEDANTIC),)
         ifneq ("$(save-cflags)","$(CFLAGS)")
                 $(error CFLAGS was changed in "$(kbuild-file)". Fix  
it to use EXTRA_CFLAGS)
         endif
endif

I replaced all declarations of CFLAGS in /usr/src/zaptel/Makefile and  
usr/src/zaptel/debian/rules with EXTRA_CFLAGS.
libtonezone-dev has to be installed to successfully go further in  
compiling. Some dependencies are missing.

Now I'm stuck here:

gcc-4.1    -c -o ztcfg.o ztcfg.c
ztcfg.c:55: error: 'ZAPTEL_CONFIG' undeclared here (not in a function)
ztcfg.c: In function 'usage':
ztcfg.c:1142: error: expected ')' before 'ZAPTEL_CONFIG'
make[2]: *** [ztcfg.o] Error 1
make[2]: Leaving directory `/usr/src/modules/zaptel'
make[1]: *** [binary-modules] Error 2
make[1]: Leaving directory `/usr/src/modules/zaptel'
make: *** [kdist_build] Error 2

That happens if I declare
EXTRA_CFLAGS+=-DZAPTEL_CONFIG=\"$(CONFIG_FILE)\"
in Makefile.

If I don't, the build process fails with the original error,  
complaining that CFLAGS would have changed.

Can anyone help in here?


:wq! PoC







More information about the Pkg-voip-maintainers mailing list