Hello Hans,
yes, I get the compiler warning in the begining too. But that is easy too fix, as the Makefile just does not recognize the Mac OS X specific gcc version as supported. I added small patch for this to the following bug report: http://bugs.sip-router.org/browse/SER-65
An open question to me is, why the mysql module one time include <mysql.h> (in db_mod.c), which works in my system, but in all other files tries to include <mysql/mysql.h> which does not work on my system until I manually added a link so that the headers can be found on my system too. Jan, any reason for that?
In my enviroment (see below) I get only the following warnings:
gcc -O9 -funroll-loops -Wall -ftree-vectorize -mtune=powerpc -maltivec -DNAME='"ser"' -DVERSION='"0.10.99-dev16-tcp" ' -DARCH='"ppc"' -DOS='"darwin"' -DCOMPILER='"gcc powerpc-apple-darwin8-gcc-4.0.0 (GCC) 4.0.0 20041026 (Apple Computer, Inc . build 4061)"' -D__CPU_ppc -D__OS_darwin -DCFG_DIR='"/usr/local/etc/ser/"' -DPKG_MALLOC -DSHM_MEM -DSHM_MMAP -DDNS_IP_HAC K -DUSE_IPV6 -DUSE_MCAST -DUSE_TCP -DDISABLE_NAGLE -DHAVE_RESOLV_RES -DDBG_QM_MALLOC -DFAST_LOCK -DADAPTIVE_WAIT -DADAPTIV E_WAIT_LOOPS=1024 -DHAVE_SOCKADDR_SA_LEN -DHAVE_GETHOSTBYNAME2 -DHAVE_UNION_SEMUN -DHAVE_SCHED_YIELD -DHAVE_MSGHDR_MSG_CON TROL -DUSE_ANON_MMAP -DNDEBUG -DHAVE_CONNECT_ECONNRESET_BUG -DHAVE_KQUEUE -DHAVE_SELECT -c mem/shm_mem.c -o mem/shm_mem.o mem/shm_mem.c: In function 'shm_getmem': mem/shm_mem.c:131: warning: unused variable 'fd'
gcc -O9 -funroll-loops -Wall -ftree-vectorize -mtune=powerpc -maltivec -DNAME='"ser"' -DVERSION='"0.10.99-dev16-tcp" ' -DARCH='"ppc"' -DOS='"darwin"' -DCOMPILER='"gcc powerpc-apple-darwin8-gcc-4.0.0 (GCC) 4.0.0 20041026 (Apple Computer, Inc . build 4061)"' -D__CPU_ppc -D__OS_darwin -DCFG_DIR='"/usr/local/etc/ser/"' -DPKG_MALLOC -DSHM_MEM -DSHM_MMAP -DDNS_IP_HAC K -DUSE_IPV6 -DUSE_MCAST -DUSE_TCP -DDISABLE_NAGLE -DHAVE_RESOLV_RES -DDBG_QM_MALLOC -DFAST_LOCK -DADAPTIVE_WAIT -DADAPTIV E_WAIT_LOOPS=1024 -DHAVE_SOCKADDR_SA_LEN -DHAVE_GETHOSTBYNAME2 -DHAVE_UNION_SEMUN -DHAVE_SCHED_YIELD -DHAVE_MSGHDR_MSG_CON TROL -DUSE_ANON_MMAP -DNDEBUG -DHAVE_CONNECT_ECONNRESET_BUG -DHAVE_KQUEUE -DHAVE_SELECT -c lex.yy.c -o lex.yy.o lex.yy.c:2783: warning: 'yyunput' defined but not used
gcc -fPIC -DPIC -O9 -funroll-loops -Wall -ftree-vectorize -mtune=powerpc -maltivec -DNAME='"ser"' -DVERSION='"0.10.9 9-dev16-tcp"' -DARCH='"ppc"' -DOS='"darwin"' -DCOMPILER='"gcc powerpc-apple-darwin8-gcc-4.0.0 (GCC) 4.0.0 20041026 (Apple C omputer, Inc. build 4061)"' -D__CPU_ppc -D__OS_darwin -DCFG_DIR='"/usr/local/etc/ser/"' -DPKG_MALLOC -DSHM_MEM -DSHM_MMAP -DDNS_IP_HACK -DUSE_IPV6 -DUSE_MCAST -DUSE_TCP -DDISABLE_NAGLE -DHAVE_RESOLV_RES -DDBG_QM_MALLOC -DFAST_LOCK -DADAPTIVE_WA IT -DADAPTIVE_WAIT_LOOPS=1024 -DHAVE_SOCKADDR_SA_LEN -DHAVE_GETHOSTBYNAME2 -DHAVE_UNION_SEMUN -DHAVE_SCHED_YIELD -DHAVE_MS GHDR_MSG_CONTROL -DUSE_ANON_MMAP -DNDEBUG -DHAVE_CONNECT_ECONNRESET_BUG -DHAVE_KQUEUE -DHAVE_SELECT -c message.c -o message .o message.c: In function 'AAATranslateMessage': message.c:192: warning: 'msg' may be used uninitialized in this function
gcc --version powerpc-apple-darwin8-gcc-4.0.0 (GCC) 4.0.0 20041026 (Apple Computer, Inc. build 4061) Copyright (C) 2004 Free Software Foundation, Inc.
/usr/local/mysql/bin/mysql --version /usr/local/mysql/bin/mysql Ver 14.7 Distrib 4.1.12, for apple-darwin6.8 (powerpc) using readline 4.3
On Saturday 03 September 2005 13:10, Hans Eriksson wrote:
Also, I get a lot of warnings like:
msg_translator.c: In function 'build_res_buf_from_sip_req': msg_translator.c:1599: warning: 'to_tag$len' may be used uninitialized in this function msg_translator.c:1599: warning: 'to_tag$s' may be used uninitialized in this function
Did you get those too? Maybe that is a general issue, not a MacOSX specific (or gcc-4x)
/hans
3 sep 2005 kl. 02.52 skrev Nils Ohlmeier:
Hi Hans,
I never tried to compile the mysql module on OS X before. In my case it even does not compile, because the mysql headers can not be found (because of completely different paths then on other OS). But after fixing the headers paths the mysql module links fine on my system.
From where, how and to which location did you installed MySQL?
BTW are you running the old gcc compiler version on Tiger by intention?
Nils
On Friday 02 September 2005 19:16, Hans Eriksson wrote:
Hi, I am trying to compile ser on my Mac OS X but it fails with:
... gcc -bundle -bundle_loader ../../ser db_con.o db_mod.o dbase.o my_con.o my_id.o my_pool.o res.o row.o utils.o val.o -L/usr/lib/ mysql -L/usr/local/lib -L/usr/local/lib/mysql -L/usr/local/mysql/lib/ mysql/ -L/usr/local/mysql/lib -L/usr/lib64/mysql -lmysqlclient -lz -o mysql.so ld: warning -L: directory name (/usr/lib/mysql) does not exist ld: warning -L: directory name (/usr/local/mysql/lib/mysql/) does not exist ld: warning -L: directory name (/usr/lib64/mysql) does not exist ld: Undefined symbols: _fprintf$LDBLStub _sprintf$LDBLStub _printf$LDBLStub _vsprintf$LDBLStub make[1]: *** [mysql.so] Error 1 ...
All the other modules compile and link fine. Anyone got any ideas?
/hans
[kuben:~/ser2] hans% gcc -v Reading specs from /usr/libexec/gcc/darwin/ppc/3.3/specs Thread model: posix gcc version 3.3 20030304 (Apple Computer, Inc. build 1495) ... Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 450 to server version: 4.1.14-standard
Serusers mailing list serusers@lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers