<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:courier,monaco,monospace,sans-serif;font-size:12pt">export ZAP_CFLAGS="-fPIC"<br><br>will let you do the same with no patch since this is a gcc <br>specific flag.<br><br>cd libs/openzap<br>export ZAP_CFLAGS="-fPIC"<br>
make clean<br>make<br>cd ../..<br>make mod_openzap-install<br><br><br><div>&nbsp;</div><div>Anthony Minessale II<br><br><span>FreeSWITCH <a target="_blank" href="http://www.freeswitch.org/">http://www.freeswitch.org/</a></span><br><span>ClueCon <a target="_blank" href="http://www.cluecon.com/">http://www.cluecon.com/</a></span><br><br>AIM: anthm<br>MSN:anthony_minessale@hotmail.com<br>GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com<br>IRC: irc.freenode.net #freeswitch</div><div><br>FreeSWITCH Developer Conference<br>sip:888@conference.freeswitch.org<br>iax:guest@conference.freeswitch.org/888<br>googletalk:conf+888@conference.freeswitch.org<br>pstn:213-799-1400</div><div style="font-family: courier,monaco,monospace,sans-serif; font-size: 12pt;"><br><br><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;">----- Original Message ----<br>From: Brian West &lt;brian.west@mac.com&gt;<br>To:
 freeswitch-users@lists.freeswitch.org<br>Sent: Wednesday, November 7, 2007 5:27:37 AM<br>Subject: Re: [Freeswitch-users] openzap compiling issue.<br><br>
This should let me know if this is the issue.&nbsp; But I have the correct&nbsp; <br>fix ready to go once you tell me this works.<br><br>/b<br><br>On Nov 7, 2007, at 11:12 AM, Brian West wrote:<br><br>&gt; I would suspect that libopenzap wsn't compiled with -fPIC, which can<br>&gt; result in this error when you try to compile against a lib that
 wasn't<br>&gt; compiled with -fPIC<br>&gt;<br>&gt; please try this:<br>&gt;<br>&gt; Index: general.makefile<br>&gt; ===================================================================<br>&gt; --- general.makefile&nbsp;&nbsp;&nbsp; (revision 320)<br>&gt; +++ general.makefile&nbsp;&nbsp;&nbsp; (working copy)<br>&gt; @@ -1,3 +1,3 @@<br>&gt;&nbsp; CC=gcc<br>&gt; -CC_CFLAGS += -Wall -Werror -Wextra -Wno-unused-parameter #-std=c99 -<br>&gt; pedantic -Wno-unused-parameter<br>&gt; +CC_CFLAGS += -fPIC -Wall -Werror -Wextra -Wno-unused-parameter #-<br>&gt; std=c99 -pedantic -Wno-unused-parameter<br>&gt;<br>&gt;<br>&gt;<br>&gt; Thanks,<br>&gt; Brian<br>&gt;<br>&gt;<br>&gt; On Nov 7, 2007, at 10:56 AM, John Bittner wrote:<br>&gt;<br>&gt;&gt; Guys,<br>&gt;&gt; Any idea why openzap will not compile under freeswitch ?<br>&gt;&gt; This is the error I am getting. FYI ... I am running 64bit Redhat&nbsp; <br>&gt;&gt; 5 ..<br>&gt;&gt;<br>&gt;&gt; Compiling
 mod_openzap.c...<br>&gt;&gt; gcc -w -I../src/include -I../src/isdn/include -I/usr/src/freeswitch/<br>&gt;&gt; src/include -I/usr/src/freeswitch/libs/libteletone/src -fPIC -Werror<br>&gt;&gt; -g -O2 -Wall -std=c99 -pedantic -D_GNU_SOURCE -DHAVE_CONFIG_H -c -o<br>&gt;&gt; mod_openzap.o mod_openzap.c<br>&gt;&gt; Creating <a target="_blank" href="http://mod_openzap.so">mod_openzap.so</a>...<br>&gt;&gt; /usr/bin/ld: ../libopenzap.a(zap_io.o): relocation R_X86_64_32S<br>&gt;&gt; against `a local symbol' can not be used when making a shared<br>&gt;&gt; object; recompile with -fPIC<br>&gt;&gt; ../libopenzap.a: could not read symbols: Bad value<br>&gt;&gt; collect2: ld returned 1 exit status<br>&gt;&gt; gcc -w -I../src/include -I../src/isdn/include -I/usr/src/freeswitch/<br>&gt;&gt; src/include -I/usr/src/freeswitch/libs/libteletone/src -fPIC -Werror<br>&gt;&gt; -g -O2 -Wall -std=c99 -pedantic -D_GNU_SOURCE -o .libs/<br>&gt;&gt; <a target="_blank"
 href="http://mod_openzap.so">mod_openzap.so</a> -shared -Wl,-x mod_openzap.o -o .libs/mod_openzap.so<br>&gt;&gt; -lm -L/usr/local/lib /usr/src/freeswitch/.libs/libfreeswitch.so -<br>&gt;&gt; lsqlite3 /usr/src/freeswitch/libs/apr/.libs/libapr-1.a -luuid -lrt -<br>&gt;&gt; ldl -lcrypt -lpthread -L/usr/src/freeswitch/libs/srtp ../<br>&gt;&gt; libopenzap.a&nbsp; -Wl,--rpath -Wl,/usr/local/freeswitch/lib<br>&gt;&gt; make[5]: *** [<a target="_blank" href="http://mod_openzap.so">mod_openzap.so</a>] Error 1<br>&gt;&gt; make[4]: *** [all] Error 1<br>&gt;&gt;<br>&gt;&gt; Any help appreciated.<br>&gt;&gt;<br>&gt;&gt; Thanks<br>&gt;&gt;<br>&gt;&gt; John Bittner<br>&gt;&gt; <a target="_blank" href="http://Simlab.net">Simlab.net</a><br>&gt;&gt;<br>&gt;&gt;<br>&gt;&gt;<br>&gt;&gt; _______________________________________________<br>&gt;&gt; Freeswitch-users mailing list<br>&gt;&gt; <a ymailto="mailto:Freeswitch-users@lists.freeswitch.org"
 href="mailto:Freeswitch-users@lists.freeswitch.org">Freeswitch-users@lists.freeswitch.org</a><br>&gt;&gt; <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>&gt;&gt;
 UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>&gt;&gt; <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>&gt;<br>&gt;<br>&gt; _______________________________________________<br>&gt; Freeswitch-users mailing list<br>&gt; <a ymailto="mailto:Freeswitch-users@lists.freeswitch.org" href="mailto:Freeswitch-users@lists.freeswitch.org">Freeswitch-users@lists.freeswitch.org</a><br>&gt; <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>&gt;
 UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>&gt; <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br><br><br>_______________________________________________<br>Freeswitch-users mailing list<br><a ymailto="mailto:Freeswitch-users@lists.freeswitch.org" href="mailto:Freeswitch-users@lists.freeswitch.org">Freeswitch-users@lists.freeswitch.org</a><br><a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br><a href="http://www.freeswitch.org"
 target="_blank">http://www.freeswitch.org</a><br></div><br></div></div><br>__________________________________________________<br>Do You Yahoo!?<br>Tired of spam?  Yahoo! Mail has the best spam protection around <br>http://mail.yahoo.com </body></html>