Hi,
I am trying to use the normal mysql integration, and I'm running into a
few issues along the way. Note that I am using Solaris.
1) mysql.so is not available with default installation
mysql.so>: ld.so.1: ser: fatal: /usr/local/lib/ser/modules/mysql.so:
open failed: No such file or directory
2) modules/mysql is not built with default Makefile
sip_router/Makefile: exclude_modules contains mysql
3) when I add mysql to the Makefile and do a "make modules" there is a
compilation error within mysql and the .so is not produced (see
"Compile errors" below).
Do I need to somehow specify where the mysql header-files and libraries
can be found? How do I go about doing this?
Any help is appreciated...
Thanks
Alex Rootham
Blueslice Networks
Compile errors ----
make[1]: Entering directory
`/home/alex/foreignCvs/ser/sip_router/modules/mysql'
cpp0: warning: changing search order for system directory
"/usr/local/include"
cpp0: warning: as it has already been specified as a non-system directory
cpp0: warning: changing search order for system directory
"/usr/local/include"
cpp0: warning: as it has already been specified as a non-system directory
In file included from dbase.c:39:
con_mysql.h:33:25: warning: mysql/mysql.h: No such file or directory
In file included from dbase.c:40:
db_val.h:31:25: warning: mysql/mysql.h: No such file or directory
cpp0: warning: changing search order for system directory
"/usr/local/include"
cpp0: warning: as it has already been specified as a non-system directory
db_val.c:31:25: warning: mysql/mysql.h: No such file or directory
cpp0: warning: changing search order for system directory
"/usr/local/include"
cpp0: warning: as it has already been specified as a non-system directory
cpp0: warning: changing search order for system directory
"/usr/local/include"
cpp0: warning: as it has already been specified as a non-system directory
db_row.c:30:25: warning: mysql/mysql.h: No such file or directory
In file included from db_row.c:35:
db_val.h:31:25: warning: mysql/mysql.h: No such file or directory
In file included from db_row.c:36:
con_mysql.h:33:25: warning: mysql/mysql.h: No such file or directory
make[1]: Entering directory
`/home/alex/foreignCvs/ser/sip_router/modules/mysql'
cpp0: warning: changing search order for system directory
"/usr/local/include"
cpp0: warning: as it has already been specified as a non-system directory
cpp0: warning: changing search order for system directory
"/usr/local/include"
cpp0: warning: as it has already been specified as a non-system directory
In file included from dbase.c:39:
con_mysql.h:33:25: warning: mysql/mysql.h: No such file or directory
In file included from dbase.c:40:
db_val.h:31:25: warning: mysql/mysql.h: No such file or directory
cpp0: warning: changing search order for system directory
"/usr/local/include"
cpp0: warning: as it has already been specified as a non-system directory
db_val.c:31:25: warning: mysql/mysql.h: No such file or directory
cpp0: warning: changing search order for system directory
"/usr/local/include"
cpp0: warning: as it has already been specified as a non-system directory
cpp0: warning: changing search order for system directory
"/usr/local/include"
cpp0: warning: as it has already been specified as a non-system directory
db_row.c:30:25: warning: mysql/mysql.h: No such file or directory
In file included from db_row.c:35:
db_val.h:31:25: warning: mysql/mysql.h: No such file or directory
In file included from db_row.c:36:
con_mysql.h:33:25: warning: mysql/mysql.h: No such file or directory
cpp0: warning: changing search order for system directory
"/usr/local/include"
cpp0: warning: as it has already been specified as a non-system directory
db_res.c:31:25: warning: mysql/mysql.h: No such file or directory
In file included from db_res.c:36:
con_mysql.h:33:25: warning: mysql/mysql.h: No such file or directory
cpp0: warning: changing search order for system directory
"/usr/local/include"
cpp0: warning: as it has already been specified as a non-system directory
cpp0: warning: changing search order for system directory
"/usr/local/include"
cpp0: warning: as it has already been specified as a non-system directory
make[1]: Leaving directory
`/home/alex/foreignCvs/ser/sip_router/modules/mysql'
make[1]: Entering directory
`/home/alex/foreignCvs/ser/sip_router/modules/mysql'
gcc -fPIC -DPIC -g -O9 -funroll-loops -Wall -mcpu=ultrasparc
-mtune=ultrasparc -DNAME='"ser"'
-DVERSION='"0.8.14-2"'
-DARCH='"sparc64"' -DOS='"solaris"'
-DCOMPILER='"gcc 3.1"'
-D__CPU_sparc64 -D__OS_solaris -DCFG_DIR='"/usr/local/etc/ser/"'
-DPKG_MALLOC -DSHM_MEM -DSHM_MMAP -DDNS_IP_HACK -DUSE_IPV6 -DUSE_TCP
-DDISABLE_NAGLE -DF_MALLOC -DFAST_LOCK -DADAPTIVE_WAIT
-DADAPTIVE_WAIT_LOOPS=1024 -DHAVE_GETIPNODEBYNAME -DHAVE_SYS_SOCKIO_H
-DHAVE_SCHED_YIELD -I/usr/local/include -I/usr/local/include/mysql
-I/usr/local/mysql/include -I/usr/pkg/include -c db_con.c -o db_con.o
cc1: warning: changing search order for system directory
"/usr/local/include"
cc1: warning: as it has already been specified as a non-system directory
gcc -fPIC -DPIC -g -O9 -funroll-loops -Wall -mcpu=ultrasparc
-mtune=ultrasparc -DNAME='"ser"'
-DVERSION='"0.8.14-2"'
-DARCH='"sparc64"' -DOS='"solaris"'
-DCOMPILER='"gcc 3.1"'
-D__CPU_sparc64 -D__OS_solaris -DCFG_DIR='"/usr/local/etc/ser/"'
-DPKG_MALLOC -DSHM_MEM -DSHM_MMAP -DDNS_IP_HACK -DUSE_IPV6 -DUSE_TCP
-DDISABLE_NAGLE -DF_MALLOC -DFAST_LOCK -DADAPTIVE_WAIT
-DADAPTIVE_WAIT_LOOPS=1024 -DHAVE_GETIPNODEBYNAME -DHAVE_SYS_SOCKIO_H
-DHAVE_SCHED_YIELD -I/usr/local/include -I/usr/local/include/mysql
-I/usr/local/mysql/include -I/usr/pkg/include -c db_mod.c -o db_mod.o
cc1: warning: changing search order for system directory
"/usr/local/include"
cc1: warning: as it has already been specified as a non-system directory
gcc -fPIC -DPIC -g -O9 -funroll-loops -Wall -mcpu=ultrasparc
-mtune=ultrasparc -DNAME='"ser"'
-DVERSION='"0.8.14-2"'
-DARCH='"sparc64"' -DOS='"solaris"'
-DCOMPILER='"gcc 3.1"'
-D__CPU_sparc64 -D__OS_solaris -DCFG_DIR='"/usr/local/etc/ser/"'
-DPKG_MALLOC -DSHM_MEM -DSHM_MMAP -DDNS_IP_HACK -DUSE_IPV6 -DUSE_TCP
-DDISABLE_NAGLE -DF_MALLOC -DFAST_LOCK -DADAPTIVE_WAIT
-DADAPTIVE_WAIT_LOOPS=1024 -DHAVE_GETIPNODEBYNAME -DHAVE_SYS_SOCKIO_H
-DHAVE_SCHED_YIELD -I/usr/local/include -I/usr/local/include/mysql
-I/usr/local/mysql/include -I/usr/pkg/include -c db_res.c -o db_res.o
cc1: warning: changing search order for system directory
"/usr/local/include"
cc1: warning: as it has already been specified as a non-system directory
db_res.c:31:25: mysql/mysql.h: No such file or directory
In file included from db_res.c:36:
con_mysql.h:33:25: mysql/mysql.h: No such file or directory
In file included from db_res.c:36:
con_mysql.h:39: parse error before "MYSQL_RES"
con_mysql.h:39: warning: no semicolon at end of struct or union
con_mysql.h:40: warning: type defaults to `int' in declaration of `con'
con_mysql.h:40: warning: data definition has no type or storage class
con_mysql.h:41: parse error before "row"
con_mysql.h:41: warning: type defaults to `int' in declaration of `row'
con_mysql.h:41: warning: data definition has no type or storage class
db_res.c: In function `get_columns':
db_res.c:45: `MYSQL_FIELD' undeclared (first use in this function)
db_res.c:45: (Each undeclared identifier is reported only once
db_res.c:45: for each function it appears in.)
db_res.c:45: `fields' undeclared (first use in this function)
db_res.c:52: warning: implicit declaration of function `mysql_field_count'
db_res.c:52: dereferencing pointer to incomplete type
db_res.c:73: warning: implicit declaration of function `mysql_fetch_fields'
db_res.c:73: dereferencing pointer to incomplete type
db_res.c:77: `FIELD_TYPE_TINY' undeclared (first use in this function)
db_res.c:78: `FIELD_TYPE_SHORT' undeclared (first use in this function)
db_res.c:79: `FIELD_TYPE_LONG' undeclared (first use in this function)
db_res.c:80: `FIELD_TYPE_INT24' undeclared (first use in this function)
db_res.c:81: `FIELD_TYPE_TIMESTAMP' undeclared (first use in this function)
db_res.c:85: `FIELD_TYPE_FLOAT' undeclared (first use in this function)
db_res.c:86: `FIELD_TYPE_DOUBLE' undeclared (first use in this function)
db_res.c:90: `FIELD_TYPE_DATETIME' undeclared (first use in this function)
db_res.c:94: `FIELD_TYPE_BLOB' undeclared (first use in this function)
db_res.c:95: `FIELD_TYPE_TINY_BLOB' undeclared (first use in this function)
db_res.c:96: `FIELD_TYPE_MEDIUM_BLOB' undeclared (first use in this
function)
db_res.c:97: `FIELD_TYPE_LONG_BLOB' undeclared (first use in this function)
db_res.c:101: `FIELD_TYPE_SET' undeclared (first use in this function)
db_res.c: In function `convert_rows':
db_res.c:146: warning: implicit declaration of function `mysql_num_rows'
db_res.c:146: dereferencing pointer to incomplete type
db_res.c:159: dereferencing pointer to incomplete type
db_res.c:159: warning: implicit declaration of function `mysql_fetch_row'
db_res.c:159: dereferencing pointer to incomplete type
db_res.c:160: dereferencing pointer to incomplete type
db_res.c:161: warning: implicit declaration of function `mysql_error'
db_res.c:161: dereferencing pointer to incomplete type
db_res.c:161: dereferencing pointer to incomplete type
db_res.c:161: dereferencing pointer to incomplete type
db_res.c:161: dereferencing pointer to incomplete type
db_res.c:161: dereferencing pointer to incomplete type
db_res.c:161: dereferencing pointer to incomplete type
db_res.c:161: dereferencing pointer to incomplete type
db_res.c:161: dereferencing pointer to incomplete type
make[1]: *** [db_res.o] Error 1
make[1]: Leaving directory
`/home/alex/foreignCvs/ser/sip_router/modules/mysql'