You are not logged in.

#1 2006-08-26 15:03:03

woogie
Member
From: Ottawa, ON
Registered: 2005-04-01
Posts: 45

Problems compiling Zaptel package [SOLVED-ISH]

Hey guys, I'm on an Arch64 system and I'm having problems compiling Zaptel (a dependancy for Asterisk).
Here's the pastebin of the errors I get from the Zaptel makefile: http://pastebin.com/776475

Here's my analysis so far:

There's a line in the Makefile for the zaptel driver that goes like this:
make -C /lib/modules/2.6.17-ARCH/build/ SUBDIRS=/home/woogie/zaptel/src/zaptel-1.2.8 modules

This line activates the kernel's makefile in order to build modules, but specifies that the source directory for zaptel should be included in the make process.

Then things go down the proverbial drain - linux/err_kernel_only.h gets included in the build process, which is designed to do one thing only - stop the build process. So I'm not entirely too sure what's going on here. Is there something misconfigured on my system, or is the Zaptel build system flawed somehow, such that I need to compensate for it?

Offline

#2 2006-08-26 15:18:40

woogie
Member
From: Ottawa, ON
Registered: 2005-04-01
Posts: 45

Re: Problems compiling Zaptel package [SOLVED-ISH]

Further information:

I've manually run the problematic make command from /lib/modules/2.6.17-ARCH/build on my own. After reading the kernel makefile documentation, I've learned of the V=1 flag to show me exactly what's going on. The failing command is this one:

gcc -Wp,-MD,/home/cestus/zaptel/src/zaptel-1.2.8/.zaptel.o.d  -nostdinc -isystem /usr/lib/gcc/x86_64-unknown-linux-gnu/4.1.1/include -D__
KERNEL__ -Iinclude  -include include/linux/autoconf.h -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -O2
 -fomit-frame-pointer   -m64 -mno-red-zone -mcmodel=kernel -pipe -fno-reorder-blocks -Wno-sign-compare -fno-asynchronous-unwind-tables -fun
it-at-a-time -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -Wdeclaration-after-statement -Wno-pointer-sign -I. -Iinclude -O4 -g -Wall -DBUILDING_T
ONEZONE   -m64 -DSTANDALONE_ZAPATA -DZAPTEL_CONFIG="/etc/zaptel.conf" -DHOTPLUG_FIRMWARE -I/home/cestus/zaptel/src/zaptel-1.2.8//include
 -I/home/cestus/zaptel/src/zaptel-1.2.8//include/oct6100api  -DMODULE -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(zaptel)"  -D"KBUIL
D_MODNAME=KBUILD_STR(zaptel)" -c -o /home/cestus/zaptel/src/zaptel-1.2.8/zaptel.o /home/cestus/zaptel/src/zaptel-1.2.8/zaptel.c

I've figured out that the bit which causes the failure is "-include include/linux/autoconf.h", because autoconf.h just includes the "err_kernel_only" header automatically, which then slays the build process. And I've also discovered that the Zaptel devs are uber-leet. They've found the magical -O4 level in gcc. You know, the one above 3, where the supported optimization levels in gcc are -O, -Os, -O2 and -O3  roll

Offline

#3 2006-08-26 15:23:47

woogie
Member
From: Ottawa, ON
Registered: 2005-04-01
Posts: 45

Re: Problems compiling Zaptel package [SOLVED-ISH]

The plot thickens:

/lib/modules/2.6.17-ARCH/build/include/linux/autoconf.h and /usr/src/linux-2.6.17/include/linux/autoconf.h are both just includers for err_kernel_only. So clearly, nobody (nobody!) should be using autoconf.h. I'm thinking that an old, bad means of using the kernel headers included the use of autoconf.h, so it was "sabotaged" by the kernel devs to discourage its use. The only problem is, grepping for "autoconf.h" in the Zaptel sources doesn't turn up anything. So somewhere, there's a makefile or something that's deciding to include autoconf.h. I can't really figure out what it is though.

Offline

#4 2006-08-26 15:33:44

woogie
Member
From: Ottawa, ON
Registered: 2005-04-01
Posts: 45

Re: Problems compiling Zaptel package [SOLVED-ISH]

Going even deeper:

Unable to figure out WTF is up with those kernel headers of doom that are breaking the build process, I commented out the bit in err_kernel_only.h that ... well ... errors. Pretty stupid idea even for me, but I'll remember *crosses fingers* what I did so I can undo it.

Now that the build process can go forwards, I get this:

make -C /lib/modules/2.6.17-ARCH/build SUBDIRS=/home/cestus/zaptel/src/zaptel-1.2.8 modules
make[1]: Entering directory `/usr/src/linux-2.6.17-ARCH'
  CC [M]  /home/cestus/zaptel/src/zaptel-1.2.8/zaptel.o
In file included from include/linux/capability.h:16,
                 from include/linux/sched.h:6,
                 from include/linux/module.h:9,
                 from /home/cestus/zaptel/src/zaptel-1.2.8/zaptel.c:45:
include/linux/types.h:4:23: error: sys/types.h: No such file or directory

Which is kinda nifty, because /usr/include/sys/types.h definitely exists on my system! I've got some troubling feeling that my kernel headers are really, really messed up for some reason. Anybody have a clue what's going on here?

Offline

#5 2006-08-26 18:20:23

woogie
Member
From: Ottawa, ON
Registered: 2005-04-01
Posts: 45

Re: Problems compiling Zaptel package [SOLVED-ISH]

OK, straight-up reinstalling the kernel26 package a few times seemed to clear that stuff up, mostly, I guess. Still horribly confused as to what happened to my system :S

Offline

Board footer

Powered by FluxBB