Hi, Know there has been numerous posts on the subject of asterisk-addons and OS X. We have other uses for MySQL on the machine so changing over to Postgres at this point (which apparently works for CDRs) is not really an option. Have also contemplated a cron job to simply poll the csv cdrs and insert them into MySQL. Messy but gets over the short term problem. Compilation problem does not appear to be mysql related, as make install fails on format_mp3.so. The linking is trying to include dct64_i386.o which could be the problem, but I'm not sure. Anyone with any ideas would be much appreciated. Dump from make clean; make install: apsvr1:/usr/local/asterisk-addons-1.0.4 root# make install ./mkdep -fPIC -I../asterisk -D_GNU_SOURCE -I/usr/include/mysql `ls *.c` cdr_addon_mysql.c:24:22: asterisk.h: No such file or directory make -C format_mp3 all gcc -pipe -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -D_REENTRANT -D_GNU_SOURCE -O6 -c -o common.o common.c gcc -pipe -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -D_REENTRANT -D_GNU_SOURCE -O6 -c -o dct64_i386.o dct64_i386.c gcc -pipe -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -D_REENTRANT -D_GNU_SOURCE -O6 -c -o decode_ntom.o decode_ntom.c gcc -pipe -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -D_REENTRANT -D_GNU_SOURCE -O6 -c -o layer3.o layer3.c gcc -pipe -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -D_REENTRANT -D_GNU_SOURCE -O6 -c -o tabinit.o tabinit.c gcc -pipe -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -D_REENTRANT -D_GNU_SOURCE -O6 -c -o interface.o interface.c gcc -pipe -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -D_REENTRANT -D_GNU_SOURCE -O6 -c -o format_mp3.o format_mp3.c gcc -pipe -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -D_REENTRANT -D_GNU_SOURCE -O6 -shared -Xlinker -x -o format_mp3.so common.o dct64_i386.o decode_ntom.o layer3.o tabinit.o interface.o format_mp3.o gcc: unrecognized option `-shared' ld: Undefined symbols: _main _ast_log _ast_format_register _ast_format_unregister _ast_update_use_count make[1]: *** [format_mp3.so] Error 1 make: *** [format_mp3/format_mp3.so] Error 2 Cheers Rob Rob Gillan Director DZhoN Pty. Ltd. rob@dzhon.com www.dzhon.com M:+61(402) 332 087 F: +61(2) 9383 8386 -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/enriched Size: 2601 bytes Desc: not available Url : http://lists.digium.com/pipermail/asterisk-users/attachments/20050322/0023fbb8/attachment.bin
I've been having the same problem... The trouble is, the version of gcc that Apple releases for OS X does not support the "-shared" option, so any makefile directive which uses that can't be built. This includes zaptel, libpri, format_mp3, and maybe more. I don't know if there is a workaround... hopefully someone else on the list will have something more. -- Zach On Tue, 22 Mar 2005 21:59:54 +1100, Rob Gillan <rob_gillan@optusnet.com.au> wrote:> Hi, > > Know there has been numerous posts on the subject of asterisk-addons > and OS X. We have other uses for MySQL on the machine so changing over > to Postgres at this point (which apparently works for CDRs) is not > really an option. Have also contemplated a cron job to simply poll the > csv cdrs and insert them into MySQL. Messy but gets over the short > term problem. > > Compilation problem does not appear to be mysql related, as make > install fails on format_mp3.so. The linking is trying to include > dct64_i386.o which could be the problem, but I'm not sure. Anyone with > any ideas would be much appreciated. Dump from make clean; make > install: > > apsvr1:/usr/local/asterisk-addons-1.0.4 root# make install > ./mkdep -fPIC -I../asterisk -D_GNU_SOURCE -I/usr/include/mysql `ls > *.c` > cdr_addon_mysql.c:24:22: asterisk.h: No such file or directory > make -C format_mp3 all > gcc -pipe -Wall -Wstrict-prototypes -Wmissing-prototypes > -Wmissing-declarations -D_REENTRANT -D_GNU_SOURCE -O6 -c -o > common.o common.c > gcc -pipe -Wall -Wstrict-prototypes -Wmissing-prototypes > -Wmissing-declarations -D_REENTRANT -D_GNU_SOURCE -O6 -c -o > dct64_i386.o dct64_i386.c > gcc -pipe -Wall -Wstrict-prototypes -Wmissing-prototypes > -Wmissing-declarations -D_REENTRANT -D_GNU_SOURCE -O6 -c -o > decode_ntom.o decode_ntom.c > gcc -pipe -Wall -Wstrict-prototypes -Wmissing-prototypes > -Wmissing-declarations -D_REENTRANT -D_GNU_SOURCE -O6 -c -o > layer3.o layer3.c > gcc -pipe -Wall -Wstrict-prototypes -Wmissing-prototypes > -Wmissing-declarations -D_REENTRANT -D_GNU_SOURCE -O6 -c -o > tabinit.o tabinit.c > gcc -pipe -Wall -Wstrict-prototypes -Wmissing-prototypes > -Wmissing-declarations -D_REENTRANT -D_GNU_SOURCE -O6 -c -o > interface.o interface.c > gcc -pipe -Wall -Wstrict-prototypes -Wmissing-prototypes > -Wmissing-declarations -D_REENTRANT -D_GNU_SOURCE -O6 -c -o > format_mp3.o format_mp3.c > gcc -pipe -Wall -Wstrict-prototypes -Wmissing-prototypes > -Wmissing-declarations -D_REENTRANT -D_GNU_SOURCE -O6 -shared > -Xlinker -x -o format_mp3.so common.o dct64_i386.o decode_ntom.o > layer3.o tabinit.o interface.o format_mp3.o > gcc: unrecognized option `-shared' > ld: Undefined symbols: > _main > _ast_log > _ast_format_register > _ast_format_unregister > _ast_update_use_count > make[1]: *** [format_mp3.so] Error 1 > make: *** [format_mp3/format_mp3.so] Error 2 > > Cheers > Rob > > Rob Gillan > Director > DZhoN Pty. Ltd. > rob@dzhon.com > www.dzhon.com > M:+61(402) 332 087 > F: +61(2) 9383 8386 > > _______________________________________________ > Asterisk-Users mailing list > Asterisk-Users@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 > >
Begin forwarded message:> From: Ray Gauss II <ray@photoassist.com> > Date: March 30, 2005 6:27:45 PM EST > To: Asterisk Users Mailing List - Non-Commercial Discussion > <asterisk-users@lists.digium.com> > Subject: Re: [Asterisk-Users] Re: Asterisk-addons/OS X woes > > Many, many thanks for this! > > When compiling from today's -r v1-0 cvs I had to add a symlink in my > mysql include directory. > > app_addon seemed to be looking for a hard coded mysql/mysql.h file: > > app_addon_sql_mysql.c:31:25: mysql/mysql.h: No such file or directory > > my include is at /usr/local/mysql/include, so: > > ln -s /usr/local/mysql/include /usr/local/mysql/include/mysql > > seemed to do the trick. > > > On Mar 22, 2005, at 3:42 PM, Zach Scott wrote: > >> Thanks! I took the advice on that website, and by changing the line: >> >> format_mp3.so: $(MP3OBJS) >> $(CC) $(CFLAGS) -shared -Xlinker -x -o $@ $(MP3OBJS) >> >> to >> >> format_mp3.so: $(MP3OBJS) >> $(CC) $(CFLAGS) -bundle -flat_namespace -undefined suppress >> -Xlinker -x -o $@ $(MP3OBJS) >> >> in /usr/src/asterisk-addons/format_mp3/Makefile, I was able to get it >> to compile and link under OS X. >> >> Unfortunately, this didn't fix the problem I was hoping it would. I >> get constant messages from MoH about "request to schedule in the >> past?!?!" and this message: >> >> http://lists.digium.com/pipermail/asterisk-users/2005-January/ >> 082434.html >> recommends switching to format_mp3 to eliminate that. I probably >> missed something along the way though, pointers are certainly welcomed >> :-) >> >> >> On Tue, 22 Mar 2005 09:09:57 -0800, TC <trclark@shaw.ca> wrote: >>> >>>> I've been having the same problem... The trouble is, the version of >>>> gcc that Apple releases for OS X does not support the "-shared" >>>> option, so any makefile directive which uses that can't be built. >>> I have never done any OS X compiles but >>> http://fink.sourceforge.net/doc/porting/shared.php?phpLang=en >>> see section 2.4 it looks like you might just be able to use the >>> -dynamiclib in place of the -shared flag >>> >>> and it still looks like any so file that is , >>> loadable using dlopen will also need some xtra flags >>> need special handling >>> >>> _______________________________________________ >>> Asterisk-Users mailing list >>> Asterisk-Users@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 >>> >> _______________________________________________ >> Asterisk-Users mailing list >> Asterisk-Users@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 >> >-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/enriched Size: 2968 bytes Desc: not available Url : http://lists.digium.com/pipermail/asterisk-users/attachments/20050330/4de500dc/attachment.bin