[Freeswitch-users] Building Java ESL bindings
Daniel Wilson
daniel.a.wilson at gmail.com
Sun Dec 4 00:38:46 MSK 2016
I got an esl.jar to build successfully on the same machine as I was using
for the failed build in my original post, on a clean master by doing -
- ./bootstrap -j
- ./configure (with no options this time)
- make
- cd libs/esl
- make
- edit java/Makefile to manually correct the includes for my java
installation. it now reads -
LOCAL_CFLAGS=-I../src/include -I/usr/lib/jvm/java-6-openjdk-amd64/include/
-I/usr/lib/jvm/java-6-openjdk-amd64/include/linux/
- make javamod
I'm going to work back from here and see if I can get it building on 1.6...
Cheers,
Dan
On 3 December 2016 at 00:04, Daniel Wilson <daniel.a.wilson at gmail.com>
wrote:
> 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/6f149625/attachment.html
Join us at ClueCon 2016 Aug 8-12, 2016
More information about the FreeSWITCH-users
mailing list