[Resolved] Compiling ztdummy on CentOS 4

Hi all,

I’m trying to compile and install ztdummy but keep getting the following. I am following the steps outline on the wiki.

Makefile:207: target `ztdummy.o’ given more than once in the same rule.
ZAPTELVERSION="" build_tools/make_version_h > version.h.tmp
if cmp -s version.h.tmp version.h ; then echo; else
mv version.h.tmp version.h ;
fi

rm -f version.h.tmp
/lib/modules/2.6.9-34.EL/build
make -C /lib/modules/2.6.9-34.EL/build SUBDIRS=/usr/src/zaptel modules
make[1]: Entering directory /usr/src/kernels/2.6.9-34.EL-i686' /usr/src/zaptel/Makefile:207: targetztdummy.o’ given more than once in the same rule.
CC [M] /usr/src/zaptel/zaptel.o
/usr/src/zaptel/zaptel.c:384: error: syntax error before “zone_lock”
/usr/src/zaptel/zaptel.c:384: warning: type defaults to int' in declaration ofzone_lock’
/usr/src/zaptel/zaptel.c:384: error: incompatible types in initialization
/usr/src/zaptel/zaptel.c:384: error: initializer element is not constant
/usr/src/zaptel/zaptel.c:384: warning: data definition has no type or storage class
/usr/src/zaptel/zaptel.c:385: error: syntax error before “chan_lock”
/usr/src/zaptel/zaptel.c:385: warning: type defaults to int' in declaration ofchan_lock’
/usr/src/zaptel/zaptel.c:385: error: incompatible types in initialization
/usr/src/zaptel/zaptel.c:385: error: initializer element is not constant
/usr/src/zaptel/zaptel.c:385: warning: data definition has no type or storage class
/usr/src/zaptel/zaptel.c:188: warning: ‘fcstab’ defined but not used
make[2]: *** [/usr/src/zaptel/zaptel.o] Error 1
make[1]: *** [module/usr/src/zaptel] Error 2
make[1]: Leaving directory `/usr/src/kernels/2.6.9-34.EL-i686’
make: *** [linux26] Error 2

Thanks,

Lee

[quote=“lee_is_me”]Hi all,

I’m trying to compile and install ztdummy but keep getting the following. I am following the steps outline on the wiki.

[/quote]

Please give a little bit more information:

Linux version?
Kernel version?
Zaptel version?

Have you patched or changed the Makefile or some other file(s)?

Ciao
Marcus

Sorry, I thought that would be enough.

I believe I found the problem (or at least I was able to compile) . The answer was here:

voip-info.org/wiki/view/Aste … CentOS+4.x

[quote]if you are using kernel 2.6.9-34.EL you need to edit spinlock.h or your zaptel will not compile.

vi /usr/src/kernels/2.6.9-34.EL-x86_64/include/linux/spinlock.h

then search for this line:
#define DEFINE_RWLOCK(x) rw_lock_t x = RW_LOCK_UNLOCKED

change it to:
#define DEFINE_RWLOCK(x) rwlock_t x = RW_LOCK_UNLOCKED

see the url for more info

bugzilla.redhat.com/bugzilla/sh … ?id=180568
bugs.digium.com/view.php?id=6425 [/quote]