[Freeswitch-users] Building Java ESL bindings

Daniel Wilson daniel.a.wilson at gmail.com
Sat Dec 3 03:04:02 MSK 2016


Hi all,

I'm having trouble getting the ESL "javamod" to build -

:/usr/src/fs/v1.6/freeswitch/libs/esl# make javamod
make MYLIB=".././.libs/libesl.a" SOLINK="-shared -Xlinker -x"
CFLAGS="-I/usr/src/fs/v1.6/freeswitch/libs/esl/src/include
-I/usr/include/uuid  -I/usr/src/fs/v1.6/freeswitch/src/include
-I/usr/src/fs/v1.6/freeswitch/src/include
-I/usr/src/fs/v1.6/freeswitch/libs/libteletone/src -fPIC -Werror
-Wno-unused-result -fvisibility=hidden -DSWITCH_API_VISIBILITY=1
-DHAVE_VISIBILITY=1 -g -ggdb -DHAVE_OPENSSL"
CXXFLAGS="-I/usr/src/fs/v1.6/freeswitch/libs/esl/src/include
-I/usr/include/postgresql  -I/usr/src/fs/v1.6/freeswitch/src/include
-I/usr/src/fs/v1.6/freeswitch/src/include
-I/usr/src/fs/v1.6/freeswitch/libs/libteletone/src -fPIC
-fvisibility=hidden -DSWITCH_API_VISIBILITY=1 -DHAVE_VISIBILITY=1"
CXX_CFLAGS="" -C java
make[1]: Entering directory '/usr/src/fs/v1.6/freeswitch/libs/esl/java'
g++ -shared -Xlinker -x -o libesljni.so esl_wrap.o .././.libs/libesl.a
/usr/bin/ld: esl_wrap.o: relocation R_X86_64_32S against `.rodata' can not
be used when making a shared object; recompile with -fPIC
esl_wrap.o: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
Makefile:14: recipe for target 'libesljni.so' failed
make[1]: *** [libesljni.so] Error 1
make[1]: Leaving directory '/usr/src/fs/v1.6/freeswitch/libs/esl/java'
Makefile:1371: recipe for target 'javamod' failed
make: *** [javamod] Error 2


I'm building on a stock Debian 8 but with openjdk-6-jdk installed (have
tried against openjdk-7-jdk but with same results).

I'm configuring the build as so -
./configure --enable-shared --enable-core-pgsql-support
--with-java=/usr/lib/jvm/java-6-openjdk-amd64/

I've tried without --enable-shared also, to no avail.

Please can someone point me in the right direction to get this working ?

Thanks in advance,

Dan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20161203/deadc18c/attachment.html 


Join us at ClueCon 2016 Aug 8-12, 2016
More information about the FreeSWITCH-users mailing list