[SR-Users] MYSQL Compilation Kamailio 3.1.4

Daniel-Constantin Mierla miconda at gmail.com
Fri Jun 24 09:58:25 CEST 2011


Can you try adding

#include <netinet/in.h>

before first #include in modules/db_mysql/my_cmd.c file?

If not working, try to grep in /usr/include/ to see which is the file 
where sin6 is defined.

Cheers,
Daniel

On 6/23/11 3:03 AM, Omar wrote:
> bash-3.00# make clean
> bash-3.00# make quiet=0
> /opt/SUNWgccfss/gcc/bin/gcc -m64 -fPIC -DPIC -g -O9 -funroll-loops -m64 -mcpu=ultrasparc -mtune=ultrasparc -fno-strict-overflow -ftree-vectorize -Wall    -DNAME='"kamailio"' -DVERSION='"3.1.4"' -DARCH='"sparc64"' -DOS='solaris_' -DOS_QUOTED='"solaris"' -DCOMPILER='"/opt/SUNWgccfss/gcc/bin/gcc 4.2.0"' -D__CPU_sparc64 -D__OS_solaris -DSER_VER=3001004 -DCFG_DIR='"/opt/kamailio3/etc/kamailio/"' -DPKG_MALLOC -DSHM_MEM -DSHM_MMAP -DDNS_IP_HACK -DUSE_IPV6 -DUSE_MCAST -DUSE_TCP -DDISABLE_NAGLE -DHAVE_RESOLV_RES -DUSE_DNS_CACHE -DUSE_DNS_FAILOVER -DUSE_DST_BLACKLIST -DUSE_NAPTR -DDBG_QM_MALLOC -DUSE_TLS -DTLS_HOOKS -DUSE_CORE_STATS -DSTATISTICS -DMALLOC_STATS -DWITH_AS_SUPPORT -DFAST_LOCK -DADAPTIVE_WAIT -DADAPTIVE_WAIT_LOOPS=1024 -DCC_GCC_LIKE_ASM -DSPARC64_MODE -DHAVE_GETIPNODEBYNAME -DHAVE_SYS_SOCKIO_H -DHAVE_SCHED_YIELD -DHAVE_ALLOCA_H -DUSE_SIGACTION -DHAVE_DEVPOLL -DHAVE_SELECT -DHAVE_FILIO_H  -DSER_MOD_INTERFACE -DSER_MOD_INTERFACE -I/opt/openser/include -I/opt/openser/include/mysql -I/opt/openser/mysql/include -I/usr/include/mysql -DMOD_NAME='"db_mysql"' -c km_db_mysql.c -o km_db_mysql.o -MMD -MP
> /opt/SUNWgccfss/gcc/bin/gcc -m64 -fPIC -DPIC -g -O9 -funroll-loops -m64 -mcpu=ultrasparc -mtune=ultrasparc -fno-strict-overflow -ftree-vectorize -Wall    -DNAME='"kamailio"' -DVERSION='"3.1.4"' -DARCH='"sparc64"' -DOS='solaris_' -DOS_QUOTED='"solaris"' -DCOMPILER='"/opt/SUNWgccfss/gcc/bin/gcc 4.2.0"' -D__CPU_sparc64 -D__OS_solaris -DSER_VER=3001004 -DCFG_DIR='"/opt/kamailio3/etc/kamailio/"' -DPKG_MALLOC -DSHM_MEM -DSHM_MMAP -DDNS_IP_HACK -DUSE_IPV6 -DUSE_MCAST -DUSE_TCP -DDISABLE_NAGLE -DHAVE_RESOLV_RES -DUSE_DNS_CACHE -DUSE_DNS_FAILOVER -DUSE_DST_BLACKLIST -DUSE_NAPTR -DDBG_QM_MALLOC -DUSE_TLS -DTLS_HOOKS -DUSE_CORE_STATS -DSTATISTICS -DMALLOC_STATS -DWITH_AS_SUPPORT -DFAST_LOCK -DADAPTIVE_WAIT -DADAPTIVE_WAIT_LOOPS=1024 -DCC_GCC_LIKE_ASM -DSPARC64_MODE -DHAVE_GETIPNODEBYNAME -DHAVE_SYS_SOCKIO_H -DHAVE_SCHED_YIELD -DHAVE_ALLOCA_H -DUSE_SIGACTION -DHAVE_DEVPOLL -DHAVE_SELECT -DHAVE_FILIO_H  -DSER_MOD_INTERFACE -DSER_MOD_INTERFACE -I/opt/openser/include -I/opt/openser/include/mysql -I/opt/openser/mysql/include -I/usr/include/mysql -DMOD_NAME='"db_mysql"' -c my_uri.c -o my_uri.o -MMD -MP
> /opt/SUNWgccfss/gcc/bin/gcc -m64 -fPIC -DPIC -g -O9 -funroll-loops -m64 -mcpu=ultrasparc -mtune=ultrasparc -fno-strict-overflow -ftree-vectorize -Wall    -DNAME='"kamailio"' -DVERSION='"3.1.4"' -DARCH='"sparc64"' -DOS='solaris_' -DOS_QUOTED='"solaris"' -DCOMPILER='"/opt/SUNWgccfss/gcc/bin/gcc 4.2.0"' -D__CPU_sparc64 -D__OS_solaris -DSER_VER=3001004 -DCFG_DIR='"/opt/kamailio3/etc/kamailio/"' -DPKG_MALLOC -DSHM_MEM -DSHM_MMAP -DDNS_IP_HACK -DUSE_IPV6 -DUSE_MCAST -DUSE_TCP -DDISABLE_NAGLE -DHAVE_RESOLV_RES -DUSE_DNS_CACHE -DUSE_DNS_FAILOVER -DUSE_DST_BLACKLIST -DUSE_NAPTR -DDBG_QM_MALLOC -DUSE_TLS -DTLS_HOOKS -DUSE_CORE_STATS -DSTATISTICS -DMALLOC_STATS -DWITH_AS_SUPPORT -DFAST_LOCK -DADAPTIVE_WAIT -DADAPTIVE_WAIT_LOOPS=1024 -DCC_GCC_LIKE_ASM -DSPARC64_MODE -DHAVE_GETIPNODEBYNAME -DHAVE_SYS_SOCKIO_H -DHAVE_SCHED_YIELD -DHAVE_ALLOCA_H -DUSE_SIGACTION -DHAVE_DEVPOLL -DHAVE_SELECT -DHAVE_FILIO_H  -DSER_MOD_INTERFACE -DSER_MOD_INTERFACE -I/opt/openser/include -I/opt/openser/include/mysql -I/opt/openser/mysql/include -I/usr/include/mysql -DMOD_NAME='"db_mysql"' -c my_res.c -o my_res.o -MMD -MP
> /opt/SUNWgccfss/gcc/bin/gcc -m64 -fPIC -DPIC -g -O9 -funroll-loops -m64 -mcpu=ultrasparc -mtune=ultrasparc -fno-strict-overflow -ftree-vectorize -Wall    -DNAME='"kamailio"' -DVERSION='"3.1.4"' -DARCH='"sparc64"' -DOS='solaris_' -DOS_QUOTED='"solaris"' -DCOMPILER='"/opt/SUNWgccfss/gcc/bin/gcc 4.2.0"' -D__CPU_sparc64 -D__OS_solaris -DSER_VER=3001004 -DCFG_DIR='"/opt/kamailio3/etc/kamailio/"' -DPKG_MALLOC -DSHM_MEM -DSHM_MMAP -DDNS_IP_HACK -DUSE_IPV6 -DUSE_MCAST -DUSE_TCP -DDISABLE_NAGLE -DHAVE_RESOLV_RES -DUSE_DNS_CACHE -DUSE_DNS_FAILOVER -DUSE_DST_BLACKLIST -DUSE_NAPTR -DDBG_QM_MALLOC -DUSE_TLS -DTLS_HOOKS -DUSE_CORE_STATS -DSTATISTICS -DMALLOC_STATS -DWITH_AS_SUPPORT -DFAST_LOCK -DADAPTIVE_WAIT -DADAPTIVE_WAIT_LOOPS=1024 -DCC_GCC_LIKE_ASM -DSPARC64_MODE -DHAVE_GETIPNODEBYNAME -DHAVE_SYS_SOCKIO_H -DHAVE_SCHED_YIELD -DHAVE_ALLOCA_H -DUSE_SIGACTION -DHAVE_DEVPOLL -DHAVE_SELECT -DHAVE_FILIO_H  -DSER_MOD_INTERFACE -DSER_MOD_INTERFACE -I/opt/openser/include -I/opt/openser/include/mysql -I/opt/openser/mysql/include -I/usr/include/mysql -DMOD_NAME='"db_mysql"' -c my_cmd.c -o my_cmd.o -MMD -MP
> In file included from ../../globals.h:37,
>                   from ../../pt.h:42,
>                   from ../../counters.h:43,
>                   from mysql_mod.h:39,
>                   from my_cmd.c:40:
> ../../ip_addr.h:86: error: field 'sin6' has incomplete type
> ../../ip_addr.h: In function 'ip_addr_loopback':
> ../../ip_addr.h:283: warning: implicit declaration of function 'htonl'
> ../../ip_addr.h:286: warning: implicit declaration of function 'IN6_IS_ADDR_LOOPBACK'
> ../../ip_addr.h: In function 'sockaddr2ip_addr':
> ../../ip_addr.h:353: error: dereferencing pointer to incomplete type
> ../../ip_addr.h: In function 'su_getport':
> ../../ip_addr.h:399: warning: implicit declaration of function 'ntohs'
> ../../ip_addr.h: In function 'su_setport':
> ../../ip_addr.h:418: warning: implicit declaration of function 'htons'
> make: *** [my_cmd.o] Error 1
>
>
> the onyl thing i did is uncomment the CROSSCOMPILE line
>
> regards
>
> O
> _______________________________________________
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-users at lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users

-- 
Daniel-Constantin Mierla -- http://www.asipto.com
http://linkedin.com/in/miconda -- http://twitter.com/miconda





More information about the sr-users mailing list