[Freeswitch-users] openzap compiling issue.

John Bittner john at simlab.net
Wed Nov 7 08:59:51 PST 2007


Thanks Brian  that worked.

John B

-----Original Message-----
I would suspect that libopenzap wsn't compiled with -fPIC, which can  
result in this error when you try to compile against a lib that wasn't  
compiled with -fPIC

please try this:

Index: general.makefile
===================================================================
--- general.makefile    (revision 320)
+++ general.makefile    (working copy)
@@ -1,3 +1,3 @@
  CC=gcc
-CC_CFLAGS += -Wall -Werror -Wextra -Wno-unused-parameter #-std=c99 - 
pedantic -Wno-unused-parameter
+CC_CFLAGS += -fPIC -Wall -Werror -Wextra -Wno-unused-parameter #- 
std=c99 -pedantic -Wno-unused-parameter



Thanks,
Brian


On Nov 7, 2007, at 10:56 AM, John Bittner wrote:

> Guys,
> Any idea why openzap will not compile under freeswitch ?
> This is the error I am getting. FYI ... I am running 64bit Redhat 5 ..
>
> Compiling mod_openzap.c...
> gcc -w -I../src/include -I../src/isdn/include -I/usr/src/freeswitch/ 
> src/include -I/usr/src/freeswitch/libs/libteletone/src -fPIC -Werror  
> -g -O2 -Wall -std=c99 -pedantic -D_GNU_SOURCE -DHAVE_CONFIG_H -c -o  
> mod_openzap.o mod_openzap.c
> Creating mod_openzap.so...
> /usr/bin/ld: ../libopenzap.a(zap_io.o): relocation R_X86_64_32S  
> against `a local symbol' can not be used when making a shared  
> object; recompile with -fPIC
> ../libopenzap.a: could not read symbols: Bad value
> collect2: ld returned 1 exit status
> gcc -w -I../src/include -I../src/isdn/include -I/usr/src/freeswitch/ 
> src/include -I/usr/src/freeswitch/libs/libteletone/src -fPIC -Werror  
> -g -O2 -Wall -std=c99 -pedantic -D_GNU_SOURCE -o .libs/ 
> mod_openzap.so -shared -Wl,-x mod_openzap.o -o .libs/mod_openzap.so   
> -lm -L/usr/local/lib /usr/src/freeswitch/.libs/libfreeswitch.so - 
> lsqlite3 /usr/src/freeswitch/libs/apr/.libs/libapr-1.a -luuid -lrt - 
> ldl -lcrypt -lpthread -L/usr/src/freeswitch/libs/srtp ../ 
> libopenzap.a  -Wl,--rpath -Wl,/usr/local/freeswitch/lib
> make[5]: *** [mod_openzap.so] Error 1
> make[4]: *** [all] Error 1
>
> Any help appreciated.
>
> Thanks
>
> John Bittner
> Simlab.net
>
>
>
> _______________________________________________
> Freeswitch-users mailing list
> Freeswitch-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org


_______________________________________________
Freeswitch-users mailing list
Freeswitch-users at lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org


-- 
BEGIN-ANTISPAM-VOTING-LINKS
------------------------------------------------------

Teach CanIt if this mail (ID 10762933) is spam:
Spam:        https://mx1.simlab.net/b.php?i=10762933&m=13381366eb54&c=s
Not spam:    https://mx1.simlab.net/b.php?i=10762933&m=13381366eb54&c=n
Forget vote: https://mx1.simlab.net/b.php?i=10762933&m=13381366eb54&c=f
------------------------------------------------------
END-ANTISPAM-VOTING-LINKS






More information about the FreeSWITCH-users mailing list