[Asterisk-Users] Asterisk 1.2.0 AddOn's compile error with MySQL 5.0.15

bbench at mail.bg bbench at mail.bg
Tue Nov 22 04:38:21 MST 2005


On Monday 21 November 2005 23:49, Rainer Maier wrote:
> Hi all,
> I want to compile asterisk's newest version with mysql's newest version,
> but I ran into a big problem.
>
> At compile time for asterisk-addons-1.2.0 I get the following errors:
>
> make
>
> <-- snip -->
>
> cc -fPIC -I../asterisk -D_GNU_SOURCE -I/usr/local/mysql/include
> -I/usr/local/mysql/include/mysql      -c -o res_config_mysql.o
If you didn't do mv /usr/src/asterisk-1.2.0 /usr/src/asterisk
that might be your problem. But cannot be seen because of your 
<--snip-->.
Further down I don't see either CFLAGS+=-I../asterisk-1.2.0 which the other 
way around.
Hope that helps.
benchev

> res_config_mysql.c
> res_config_mysql.c: In function 'realtime_mysql':
> res_config_mysql.c:117: warning: incompatible implicit declaration of
> built-in function 'snprintf'
> res_config_mysql.c: In function 'realtime_multi_mysql':
> res_config_mysql.c:224: warning: incompatible implicit declaration of
> built-in function 'snprintf'
> res_config_mysql.c: In function 'update_mysql':
> res_config_mysql.c:313: warning: incompatible implicit declaration of
> built-in function 'snprintf'
> res_config_mysql.c: In function 'config_mysql':
> res_config_mysql.c:376: warning: incompatible implicit declaration of
> built-in function 'snprintf'
> res_config_mysql.c: In function 'realtime_mysql_status':
> res_config_mysql.c:648: warning: incompatible implicit declaration of
> built-in function 'snprintf'
> res_config_mysql.c:650: warning: incompatible implicit declaration of
> built-in function 'snprintf'
> res_config_mysql.c:652: warning: incompatible implicit declaration of
> built-in function 'snprintf'
> res_config_mysql.c:656: warning: incompatible implicit declaration of
> built-in function 'snprintf'
> cc -shared -Xlinker -x -o res_config_mysql.so res_config_mysql.o
> -lmysqlclient -lz    -L/usr/local/mysql/lib -L/usr/local/mysql/lib/mysql
> sv5000:/usr/src/asterisk-addons-1.2.0#
>
> Now the details:
>
> I wanted to set up a plain asterisk computer without any more programms.
> I set up a plain debian sarge system and installed kernel 2.6.14.2.
> I downloaded, unpacked mysql-5.0.15 under /usr/src/mysql-5.0.15.
> Then I put the link /usr/src/mysql to this directory.
> I compiled and installed mysql successfully.
>
> I then downloaded asterisk-1.2.0.tar.gz and unpacked it to
> /usr/src/asterisk-1.2.0 I compiled and installed it successfully with make,
> make install and make-samples.
>
> I then downloaded asterisk-addons-1.2.0.tar.gz and unpacked it to
> /usr/src/asterisk-addons-1.2.0 I tried to compile and had the problem that
> the compiler did not find the mysql includes an libs.
> I had to modify Makefile first.
>
> First I added this directory to the MODS, CFLAGS and MLFLAGS.
> It would be nice to have them in the next update.
> Afterwards the compiler stopped with the above error's.
>
> Is there a new 'snprintf' version used ?
> Do you have a solution for that ?
> At the end are the compiler etc. versions.
>
> Makefile at /usr/src/asterisk-addons-1.2.0
> ---------------------------------------------------------------------------
>- -------
>
>
>
> V
> MODS+=$(shell if [ -d /usr/local/mysql/include ] || [ -d
> MODS+MODS+/usr/local/mysql/include/mysql ] || [ -d /usr/include/mysql ]
> MODS+|| [MODS+-d /usr/local/include/mysql ] || [ -d
> MODS+/usr/local/mysql/include ] || [ -d /opt/mysql/include ]; then echo
> MODS+"cdr_addon_mysql.so app_addon_sql_m ysql.so res_config_mysql.so";
> MODS+fi)
> CFLAGS+=$(shell if [ -d /usr/local/mysql/include ]; then echo
> "-I/usr/local/mysql/include"; fi)
> CFLAGS+=$(shell if [ -d /usr/local/mysql/include/mysql ]; then echo
> "-I/usr/local/mysql/include/mysql"; fi)     <-----------
> CFLAGS+=$(shell if [ -d /usr/include/mysql ]; then echo
> CFLAGS+"-I/usr/include/mysql"; fi) =$(shell if [ -d
> CFLAGS+/usr/local/include/mysql ]; then echo
> CFLAGS+"-I/usr/local/include/mysql"; fi) =$(shell if [ -d
> CFLAGS+/opt/mysql/include/mysql ]; then echo
> CFLAGS+"-I/opt/mysql/include/mysql"; fi)
> MLFLAGS=
> MLFLAGS+=$(shell if [ -d /usr/lib/mysql ]; then echo "-L/usr/lib/mysql";
> MLFLAGS+fi) =$(shell if [ -d /usr/lib64/mysql ]; then echo
> MLFLAGS+"-L/usr/lib64/mysql"; fi) =$(shell if [ -d /usr/local/mysql/lib ];
> then echo "-L/usr/local/mysql/lib"; fi)
> MLFLAGS+=$(shell if [ -d /usr/local/mysql/lib/mysql ]; then echo
> "-L/usr/local/mysql/lib/mysql"; fi)            <-----------
> MLFLAGS+=$(shell if [ -d /usr/local/lib/mysql ]; then echo
> MLFLAGS+"-L/usr/local/lib/mysql"; fi) =$(shell if [ -d
> MLFLAGS+/opt/mysql/lib/mysql ]; then echo "-L/opt/mysql/lib/mysql"; fi)
>
>
>
> Details for compiler and libs:
> dpkg -l | grep gcc
> ii  gcc                      4.0.2-1               The GNU C compiler
> ii  gcc-3.3-base             3.3.6-7               The GNU Compiler
> Collection (base package)
> ii  gcc-4.0                  4.0.2-2               The GNU C compiler
> ii  gcc-4.0-base             4.0.2-2               The GNU Compiler
> Collection (base package)
> ii  libgcc1                  4.0.2-2               GCC support library
>
> dpkg -l | grep libssl-dev
> ii  libssl-dev               0.9.8a-3              SSL development
> libraries, header files and
>
> dpkg -l | grep zlib1g-dev
> ii  zlib1g-dev               1.2.3-4               compression library -
> development
>
>
> Best regards
>
> Rainer
>
> _______________________________________________
> --Bandwidth and Colocation sponsored by Easynews.com --
>
> Asterisk-Users mailing list
> Asterisk-Users at lists.digium.com
> http://lists.digium.com/mailman/listinfo/asterisk-users
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-users



More information about the asterisk-users mailing list