[Asterisk-Users] cdr_addon_mysql.c
Ed Devine
ncfm at airmail.net
Fri Jun 11 12:21:02 MST 2004
Following the latest * CVS update, my MySQL was broken.
Following the update, Asterisk-addons would compile fine, but when I ran
asterisk I got the following error:
ERROR[1202489024]: cdr_addon_mysql.c:203 mysql_log: Failed to insert
into databas
I then tried using the patch (bug id 0001823) from bugs.digium.com, and
found that Asterisk-addons would no longer compile, giving me the
following errors:
make clean ; make install
rm -f *.so *.o .depend
./mkdep -fPIC -I../asterisk -D_GNU_SOURCE -I/usr/include/mysql `ls
*.c`
cc -fPIC -I../asterisk -D_GNU_SOURCE -I/usr/include/mysql -c -o
cdr_addon_mysql.o cdr_addon_mysql.c
cdr_addon_mysql.c:50: parse error before '!' token
cdr_addon_mysql.c: In function `mysql_log':
cdr_addon_mysql.c:110: `mysql_lock' undeclared (first use in this
function)
cdr_addon_mysql.c:110: (Each undeclared identifier is reported only once
cdr_addon_mysql.c:110: for each function it appears in.)
cdr_addon_mysql.c:121: `mysql' undeclared (first use in this function)
cdr_addon_mysql.c: In function `my_unload_module':
cdr_addon_mysql.c:226: `mysql' undeclared (first use in this function)
cdr_addon_mysql.c: In function `my_load_module':
cdr_addon_mysql.c:380: `mysql' undeclared (first use in this function)
cdr_addon_mysql.c: In function `usecount':
cdr_addon_mysql.c:422: `mysql_lock' undeclared (first use in this
function)
make: *** [cdr_addon_mysql.o] Error 1
I then tried using and older version of cdr_addon_mysql.c, and it also
would not compile, but gave me an entirely different set of errors:
]# make clean ; make install
rm -f *.so *.o .depend
./mkdep -fPIC -I../asterisk -D_GNU_SOURCE -I/usr/include/mysql `ls
*.c`
cc -fPIC -I../asterisk -D_GNU_SOURCE -I/usr/include/mysql -c -o
cdr_addon_mysql.o cdr_addon_mysql.c
cdr_addon_mysql.c:50:
`__use_AST_MUTEX_DEFINE_STATIC_rather_than_AST_MUTEX_INITIALIZER__'
undeclared here (not in a function)
make: *** [cdr_addon_mysql.o] Error 1
I'm stuck on an MySQL project until I can resolve this problem. I've
even blown away my system (OS as well as asterisk) and reloaded
everything fresh from CVS, and still no joy. Any suggestions would be
greatly appreciated.
More information about the asterisk-users
mailing list