[jitsi-dev] Native libraries


#1

Hi all,
I'm going on trying to build native libraries, so Jitsi will finally be in official repositories of linux distributions.
Until now, I got these results:

- libgalagonotification, libhid, libhwaddressretriever, libjawtrenderer, libjg722, libjvideo4linux2, libscreencapture compile well.

- libjspeex: I have to remove location="end" from the build.xml on lines regarding -lspeex and -lspeexdsp, probably because I'm using shared libraries.

- libjnportaudio:
I have to remove location="end" from the build.xml on lines regarding -lportaudio and -lspeexdsp,
I have to remove the <compilerarg value="-std=c99" /> flag because of errors while compiling, then

it builds, but when I run Jitsi I get this error: &quot;java: symbol lookup error: /usr/lib64/jitsi/lib/native/libjnportaudio\.so: undefined symbol: Pa\_Initialize&quot;

- libsysactivitynotifications: It builds, but when I run Jitsi I get this error:
GRAVE: impl.sysactivity.SystemActivityNotifications.<clinit>().94 Error init native functions
java.lang.UnsatisfiedLinkError: /usr/lib64/jitsi/lib/native/libsysactivitynotifications.so: /usr/lib64/jitsi/lib/native/libsysactivitynotifications.so: undefined symbol: gdk_display
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1807)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1732)
at java.lang.Runtime.loadLibrary0(Runtime.java:823)
at java.lang.System.loadLibrary(System.java:1028)
at net.java.sip.communicator.impl.sysactivity.SystemActivityNotifications.<clinit>(SystemActivityNotifications.java:86)
at net.java.sip.communicator.impl.sysactivity.SystemActivityNotificationsServiceImpl$1.run(SystemActivityNotificationsServiceImpl.java:100)
at java.lang.Thread.run(Thread.java:662)

- libunix-java: could it be taken from libmatthew-java?

- libcivil, libjdic, libjdic_misc, libtray: I didn't find build target in ant, how to compile them?

- libjnffmpeg: only open source / free software in official repository, ffmpeg/lame/x264 are a pain under this aspect, so no way to get ffmpeg-related things in official repositories. Any workarounds?

Other libraries: I found that in linux folder there are a lot of libraries that are not in linux-64 folder, why? Are on 64 bit not necessary? Or are they old things that no one swept away? Are they necessary to make Jitsi working?

Regards,

Daniel


#2

Hi Daniel,

Here my answer, probably others can add it too if I missed something.

Le 30/10/11 21:54, Daniel Zucchetto a �crit :

Hi all,
  I'm going on trying to build native libraries, so Jitsi will finally be in official repositories of linux distributions.
Until now, I got these results:

- libgalagonotification, libhid, libhwaddressretriever, libjawtrenderer, libjg722, libjvideo4linux2, libscreencapture compile well.

OK.

- libjspeex: I have to remove location="end" from the build.xml on lines regarding -lspeex and -lspeexdsp, probably because I'm using shared libraries.

If you are using shared libraries only, try remove -Wl,-Bstatic and -Wl,-Bdynamic instead of "location=end".

- libjnportaudio:
     I have to remove location="end" from the build.xml on lines regarding -lportaudio and -lspeexdsp,
     I have to remove the<compilerarg value="-std=c99" /> flag because of errors while compiling, then

     it builds, but when I run Jitsi I get this error: "java: symbol lookup error: /usr/lib64/jitsi/lib/native/libjnportaudio.so: undefined symbol: Pa_Initialize"

Same as before, try remove -Wl,-Bstatic and -Wl,-Bdynamic.

- libsysactivitynotifications: It builds, but when I run Jitsi I get this error:
GRAVE: impl.sysactivity.SystemActivityNotifications.<clinit>().94 Error init native functions
java.lang.UnsatisfiedLinkError: /usr/lib64/jitsi/lib/native/libsysactivitynotifications.so: /usr/lib64/jitsi/lib/native/libsysactivitynotifications.so: undefined symbol: gdk_display
         at java.lang.ClassLoader$NativeLibrary.load(Native Method)
         at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1807)
         at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1732)
         at java.lang.Runtime.loadLibrary0(Runtime.java:823)
         at java.lang.System.loadLibrary(System.java:1028)
         at net.java.sip.communicator.impl.sysactivity.SystemActivityNotifications.<clinit>(SystemActivityNotifications.java:86)
         at net.java.sip.communicator.impl.sysactivity.SystemActivityNotificationsServiceImpl$1.run(SystemActivityNotificationsServiceImpl.java:100)
         at java.lang.Thread.run(Thread.java:662)

Try add -lgtk-x11-2.0 after -lgdk-x11-2.0.

- libunix-java: could it be taken from libmatthew-java?

- libcivil, libjdic, libjdic_misc, libtray: I didn't find build target in ant, how to compile them?

For libcivil see http://sourceforge.net/projects/lti-civil/;
For libjdic/libjdic_misc/libtray see http://java.net/projects/jdic/

- libjnffmpeg: only open source / free software in official repository, ffmpeg/lame/x264 are a pain under this aspect, so no way to get ffmpeg-related things in official repositories. Any workarounds?

We depends on ffmpeg for encoding/decoding + scaling/conversion of images and I am affraid we cannot change it simply. I personnaly don't know any workaround to avoid use of ffmpeg.

Other libraries: I found that in linux folder there are a lot of libraries that are not in linux-64 folder, why? Are on 64 bit not necessary? Or are they old things that no one swept away? Are they necessary to make Jitsi working?

I think you make reference to some library coming from JMF. As JMF is very very old SUN did not ship 64-bit binaries. But AFAIK the native libs is just used for some codecs and renderers that we don't use at the time (we implement our own visual renderer and some codecs that used native code in JMF).

Regards,

···

--
Seb

Regards,

Daniel


#3

Quick comment,

···

On Mon, Oct 31, 2011 at 9:27 AM, Sebastien Vincent <seb@jitsi.org> wrote:

that are not in linux-64 folder, why? Are on 64 bit not necessary? Or are
they old things that no one swept away? Are they necessary to make Jitsi
working?

I think you make reference to some library coming from JMF. As JMF is very
very old SUN did not ship 64-bit binaries. But AFAIK the native libs is just
used for some codecs and renderers that we don't use at the time (we
implement our own visual renderer and some codecs that used native code in
JMF).

FYI. We are ready to switch to FMJ and completely get rid of JMF here.
We'll be doing so in the following weeks or so.

Cheers,
Emil


#4

Thanks for the answer.
I now managed to build everything except the portaudio library.
If I compile portaudio and then run Jitsi, I can not make calls, because some seconds after the call is started (before ringing) Jitsi crashes and I get this error message:

00:08:59.201 GRAVE: impl.neomedia.device.DeviceConfiguration.registerCustomRenderers().1196 Failed to register custom Renderer net.java.sip.communicator.impl.neomedia.jmfext.media.renderer.video.JAWTRenderer with JMF.
00:09:26.454 GRAVE: impl.protocol.sip.CallPeerSipImpl.throwOperationFailedException().3163 An error occurred while sending invite request
java.lang.IllegalArgumentException: device must be able to capture
at net.java.sip.communicator.impl.neomedia.device.AudioMixerMediaDevice.<init>(AudioMixerMediaDevice.java:149)
at net.java.sip.communicator.impl.neomedia.MediaServiceImpl.createMixer(MediaServiceImpl.java:239)
at net.java.sip.communicator.service.protocol.media.MediaAwareCall.getDefaultDevice(MediaAwareCall.java:383)
at net.java.sip.communicator.service.protocol.media.CallPeerMediaHandler.getDefaultDevice(CallPeerMediaHandler.java:748)
at net.java.sip.communicator.impl.protocol.sip.CallPeerMediaHandlerSipImpl.createMediaDescriptions(CallPeerMediaHandlerSipImpl.java:174)
at net.java.sip.communicator.impl.protocol.sip.CallPeerMediaHandlerSipImpl.createFirstOffer(CallPeerMediaHandlerSipImpl.java:127)
at net.java.sip.communicator.impl.protocol.sip.CallPeerMediaHandlerSipImpl.createOffer(CallPeerMediaHandlerSipImpl.java:108)
at net.java.sip.communicator.impl.protocol.sip.CallPeerSipImpl.invite(CallPeerSipImpl.java:1413)
at net.java.sip.communicator.impl.protocol.sip.CallSipImpl.invite(CallSipImpl.java:195)
at net.java.sip.communicator.impl.protocol.sip.OperationSetBasicTelephonySipImpl.createOutgoingCall(OperationSetBasicTelephonySipImpl.java:192)
at net.java.sip.communicator.impl.protocol.sip.OperationSetBasicTelephonySipImpl.createCall(OperationSetBasicTelephonySipImpl.java:116)
at net.java.sip.communicator.impl.gui.main.call.CallManager$CreateCallThread.run(CallManager.java:1064)
00:09:26.486 GRAVE: impl.gui.main.call.CallManager.run().1076 The call could not be created:
net.java.sip.communicator.service.protocol.OperationFailedException: An error occurred while sending invite request
at net.java.sip.communicator.impl.protocol.sip.ProtocolProviderServiceSipImpl.throwOperationFailedException(ProtocolProviderServiceSipImpl.java:3168)
at net.java.sip.communicator.impl.protocol.sip.CallPeerSipImpl.invite(CallPeerSipImpl.java:1430)
at net.java.sip.communicator.impl.protocol.sip.CallSipImpl.invite(CallSipImpl.java:195)
at net.java.sip.communicator.impl.protocol.sip.OperationSetBasicTelephonySipImpl.createOutgoingCall(OperationSetBasicTelephonySipImpl.java:192)
at net.java.sip.communicator.impl.protocol.sip.OperationSetBasicTelephonySipImpl.createCall(OperationSetBasicTelephonySipImpl.java:116)
at net.java.sip.communicator.impl.gui.main.call.CallManager$CreateCallThread.run(CallManager.java:1064)
Caused by: java.lang.IllegalArgumentException: device must be able to capture
at net.java.sip.communicator.impl.neomedia.device.AudioMixerMediaDevice.<init>(AudioMixerMediaDevice.java:149)
at net.java.sip.communicator.impl.neomedia.MediaServiceImpl.createMixer(MediaServiceImpl.java:239)
at net.java.sip.communicator.service.protocol.media.MediaAwareCall.getDefaultDevice(MediaAwareCall.java:383)
at net.java.sip.communicator.service.protocol.media.CallPeerMediaHandler.getDefaultDevice(CallPeerMediaHandler.java:748)
at net.java.sip.communicator.impl.protocol.sip.CallPeerMediaHandlerSipImpl.createMediaDescriptions(CallPeerMediaHandlerSipImpl.java:174)
at net.java.sip.communicator.impl.protocol.sip.CallPeerMediaHandlerSipImpl.createFirstOffer(CallPeerMediaHandlerSipImpl.java:127)
at net.java.sip.communicator.impl.protocol.sip.CallPeerMediaHandlerSipImpl.createOffer(CallPeerMediaHandlerSipImpl.java:108)
at net.java.sip.communicator.impl.protocol.sip.CallPeerSipImpl.invite(CallPeerSipImpl.java:1413)
... 4 more

I also provide a simple patch for sysactivity because GDK_DISPLAY has been deprecated since version 2.22 and will not compile on new distributions.

that are not in linux-64 folder, why? Are on 64 bit not necessary? Or are

they old things that no one swept away? Are they necessary to make Jitsi

working?

I think you make reference to some library coming from JMF. As JMF is very

very old SUN did not ship 64-bit binaries. But AFAIK the native libs is just

used for some codecs and renderers that we don't use at the time (we

implement our own visual renderer and some codecs that used native code in

JMF). >

FYI. We are ready to switch to FMJ and completely get rid of JMF here.
We'll be doing so in the following weeks or so.

My reference was about (lib)mozembed-linux-gtk1.2.so and similar, too. I think they are not related to JMF.
Are they neccessary? Maybe necessary only for x86? If so, how to build them?

Regards,
Daniel

net_java_sip_communicator_impl_sysactivity_SystemActivityNotifications.c.patch (939 Bytes)


#5

Hi Daniel,

See inline.

Le 11/11/11 14:49, Daniel Zucchetto a �crit :

  Thanks for the answer.
I now managed to build everything except the portaudio library.
If I compile portaudio and then run Jitsi, I can not make calls, because some seconds after the call is started (before ringing) Jitsi crashes and I get this error message:

00:08:59.201 GRAVE: impl.neomedia.device.DeviceConfiguration.registerCustomRenderers().1196 Failed to register custom Renderer net.java.sip.communicator.impl.neomedia.jmfext.media.renderer.video.JAWTRenderer with JMF.
00:09:26.454 GRAVE: impl.protocol.sip.CallPeerSipImpl.throwOperationFailedException().3163 An error occurred while sending invite request
java.lang.IllegalArgumentException: device must be able to capture
         at net.java.sip.communicator.impl.neomedia.device.AudioMixerMediaDevice.<init>(AudioMixerMediaDevice.java:149)
         at net.java.sip.communicator.impl.neomedia.MediaServiceImpl.createMixer(MediaServiceImpl.java:239)
         at net.java.sip.communicator.service.protocol.media.MediaAwareCall.getDefaultDevice(MediaAwareCall.java:383)
         at net.java.sip.communicator.service.protocol.media.CallPeerMediaHandler.getDefaultDevice(CallPeerMediaHandler.java:748)
         at net.java.sip.communicator.impl.protocol.sip.CallPeerMediaHandlerSipImpl.createMediaDescriptions(CallPeerMediaHandlerSipImpl.java:174)
         at net.java.sip.communicator.impl.protocol.sip.CallPeerMediaHandlerSipImpl.createFirstOffer(CallPeerMediaHandlerSipImpl.java:127)
         at net.java.sip.communicator.impl.protocol.sip.CallPeerMediaHandlerSipImpl.createOffer(CallPeerMediaHandlerSipImpl.java:108)
         at net.java.sip.communicator.impl.protocol.sip.CallPeerSipImpl.invite(CallPeerSipImpl.java:1413)
         at net.java.sip.communicator.impl.protocol.sip.CallSipImpl.invite(CallSipImpl.java:195)
         at net.java.sip.communicator.impl.protocol.sip.OperationSetBasicTelephonySipImpl.createOutgoingCall(OperationSetBasicTelephonySipImpl.java:192)
         at net.java.sip.communicator.impl.protocol.sip.OperationSetBasicTelephonySipImpl.createCall(OperationSetBasicTelephonySipImpl.java:116)
         at net.java.sip.communicator.impl.gui.main.call.CallManager$CreateCallThread.run(CallManager.java:1064)
00:09:26.486 GRAVE: impl.gui.main.call.CallManager.run().1076 The call could not be created:
net.java.sip.communicator.service.protocol.OperationFailedException: An error occurred while sending invite request
         at net.java.sip.communicator.impl.protocol.sip.ProtocolProviderServiceSipImpl.throwOperationFailedException(ProtocolProviderServiceSipImpl.java:3168)
         at net.java.sip.communicator.impl.protocol.sip.CallPeerSipImpl.invite(CallPeerSipImpl.java:1430)
         at net.java.sip.communicator.impl.protocol.sip.CallSipImpl.invite(CallSipImpl.java:195)
         at net.java.sip.communicator.impl.protocol.sip.OperationSetBasicTelephonySipImpl.createOutgoingCall(OperationSetBasicTelephonySipImpl.java:192)
         at net.java.sip.communicator.impl.protocol.sip.OperationSetBasicTelephonySipImpl.createCall(OperationSetBasicTelephonySipImpl.java:116)
         at net.java.sip.communicator.impl.gui.main.call.CallManager$CreateCallThread.run(CallManager.java:1064)
Caused by: java.lang.IllegalArgumentException: device must be able to capture
         at net.java.sip.communicator.impl.neomedia.device.AudioMixerMediaDevice.<init>(AudioMixerMediaDevice.java:149)
         at net.java.sip.communicator.impl.neomedia.MediaServiceImpl.createMixer(MediaServiceImpl.java:239)
         at net.java.sip.communicator.service.protocol.media.MediaAwareCall.getDefaultDevice(MediaAwareCall.java:383)
         at net.java.sip.communicator.service.protocol.media.CallPeerMediaHandler.getDefaultDevice(CallPeerMediaHandler.java:748)
         at net.java.sip.communicator.impl.protocol.sip.CallPeerMediaHandlerSipImpl.createMediaDescriptions(CallPeerMediaHandlerSipImpl.java:174)
         at net.java.sip.communicator.impl.protocol.sip.CallPeerMediaHandlerSipImpl.createFirstOffer(CallPeerMediaHandlerSipImpl.java:127)
         at net.java.sip.communicator.impl.protocol.sip.CallPeerMediaHandlerSipImpl.createOffer(CallPeerMediaHandlerSipImpl.java:108)
         at net.java.sip.communicator.impl.protocol.sip.CallPeerSipImpl.invite(CallPeerSipImpl.java:1413)
         ... 4 more

Which version of portaudio do you use ?

IIRC we use this one http://portaudio.com/archives/pa_stable_v19_20110326.tgz (statically linked).

I also provide a simple patch for sysactivity because GDK_DISPLAY has been deprecated since version 2.22 and will not compile on new distributions.

Thank you very much. We will apply it shortly.

that are not in linux-64 folder, why? Are on 64 bit not necessary? Or are
they old things that no one swept away? Are they necessary to make Jitsi
working?

I think you make reference to some library coming from JMF. As JMF is very
very old SUN did not ship 64-bit binaries. But AFAIK the native libs is just
used for some codecs and renderers that we don't use at the time (we
implement our own visual renderer and some codecs that used native code in
JMF).>

FYI. We are ready to switch to FMJ and completely get rid of JMF here.
We'll be doing so in the following weeks or so.

My reference was about (lib)mozembed-linux-gtk1.2.so and similar, too. I think they are not related to JMF.
Are they neccessary? Maybe necessary only for x86? If so, how to build them?

This comes from JDIC (http://java.net/projects/jdic/sources/svn/show/trunk/src/jdic/src/unix/native/mozilla?rev=1736).

Regards,

···

--
Seb

Regards,
Daniel


#6

Which version of portaudio do you use ?

IIRC we use this one
http://portaudio.com/archives/pa_stable_v19_20110326.tgz (statically
linked).

I found that in openSUSE the shipped portaudio library is pa_stable_v19_20071207 (quite old).
So this could be the problem. I'll have a better look into this.

Daniel