linphone-developers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Linphone-developers] Python API Compilation problems


From: Loïc Maudou
Subject: Re: [Linphone-developers] Python API Compilation problems
Date: Fri, 5 Feb 2016 02:37:47 +0100

Hi Ghislain,
Thanks a lot for your answer.

Here is the output of 'ldd linphone.so'
linux-vdso.so.1 (0x7ef2a000)
libxml2.so.2 => /usr/lib/libxml2.so.2 (0x76915000)
libantlr3c.so => /usr/lib/libantlr3c.so (0x768f7000)
libpthread.so.0 => /usr/lib/libpthread.so.0 (0x768ce000)
librt.so.1 => /usr/lib/librt.so.1 (0x768b7000)
libdl.so.2 => /usr/lib/libdl.so.2 (0x768a1000)
libsrtp.so.0 => /usr/lib/libsrtp.so.0 (0x76883000)
libgsm.so.1 => /usr/lib/libgsm.so.1 (0x7686a000)
libopus.so.0 => /usr/lib/libopus.so.0 (0x76818000)
libm.so.6 => /usr/lib/libm.so.6 (0x7679b000)
libspeex.so.1 => /usr/lib/libspeex.so.1 (0x76777000)
libspeexdsp.so.1 => /usr/lib/libspeexdsp.so.1 (0x76756000)
libasound.so.2 => /usr/lib/libasound.so.2 (0x76678000)
libavcodec.so.53 => /usr/lib/python2.7/site-packages/linphone/./libavcodec.so.53 (0x75b71000)
libavutil.so.51 => /usr/lib/python2.7/site-packages/linphone/./libavutil.so.51 (0x75b42000)
libswscale.so.2 => /usr/lib/python2.7/site-packages/linphone/./libswscale.so.2 (0x75b0b000)
libv4l1.so.0 => /usr/lib/libv4l1.so.0 (0x75af4000)
libv4l2.so.0 => /usr/lib/libv4l2.so.0 (0x75ad8000)
libv4lconvert.so.0 => /usr/lib/libv4lconvert.so.0 (0x75a53000)
libX11.so.6 => /usr/lib/libX11.so.6 (0x75936000)
libXv.so.1 => /usr/lib/libXv.so.1 (0x7592b000)
libvpx.so.3 => /usr/lib/libvpx.so.3 (0x7579a000)
libsqlite3.so.0 => /usr/lib/libsqlite3.so.0 (0x756b9000)
libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x75575000)
libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x75548000)
libc.so.6 => /usr/lib/libc.so.6 (0x75409000)
libz.so.1 => /usr/lib/libz.so.1 (0x753e2000)
liblzma.so.5 => /usr/lib/liblzma.so.5 (0x753b2000)
/usr/lib/ld-linux-armhf.so.3 (0x54ad9000)
libjpeg.so.8 => /usr/lib/libjpeg.so.8 (0x7536d000)
libxcb.so.1 => /usr/lib/libxcb.so.1 (0x75346000)
libXext.so.6 => /usr/lib/libXext.so.6 (0x7532f000)
libXau.so.6 => /usr/lib/libXau.so.6 (0x75325000)
libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0x7530f000)

I also found with your advice that the libspeex and libspeexdsp compiled were not compiled for ARM. So I added this to the config-python-raspberry.cmake (works only for RPI2) :

# speex
set(EP_speex_CROSS_COMPILATION_OPTIONS
"--prefix=${CMAKE_INSTALL_PREFIX}"
"--disable-static"
"--with-gnu-ld"
"--enable-fixed-point"
"--enable-armv7neon-asm"
"--with-ogg=$ENV{RASPBIAN_ROOTFS}/usr"
)

# ffmpeg
set(EP_ffmpeg_CROSS_COMPILATION_OPTIONS
"--prefix=${CMAKE_INSTALL_PREFIX}"
"--enable-cross-compile"
"--cross-prefix=${RASPBERRY_TOOLCHAIN_HOST}-"
"--arch=arm"
"--cpu=cortex-a7"
"--target-os=linux"
"--sysroot=$ENV{RASPBIAN_ROOTFS}"
"--enable-libvpx"
"--enable-libspeex"
)

# vpx
set(EP_vpx_CROSS_COMPILATION_OPTIONS
"--prefix=${CMAKE_INSTALL_PREFIX}"
"--target=armv7-linux-gcc"
)

This way, I managed to get libs for RPI2 using neon for example.
But there are still 2 issues I can't solve :

The first :
-How can I properly correct the issue about the LINPHONE_SOURCE_DIR. I find a way to get along the compilation, but if I could propose you a patch for your python API for RPI2 and with support of video display, it could help I think !

-The second issue still blocks me : 
While importing with Python, I get this error now :
ImportError: /usr/lib/python2.7/site-packages/linphone/linphone.so: undefined symbol: avcodec_encode_video2

But the ffmpeg generated library libavcodec.so.53 only got :
avcodec_decode_video2
avcodec_encode_video
and there is no encode_video2 in the sources...
Where is the mistake ?

Thanks a lot for your help,

Cheers,

Loïc


2016-02-04 12:13 GMT+01:00 Ghislain MARY <address@hidden>:
Hi Loïc,

I don't think this issue comes from the nm messages. In fact, these messages are just warnings that should not even be printed. I would need to make a pass on this some day.
To understand the issue, could you run the command `ldd linphone.so` in the lib/python2.7/site-packages/linphone directory of the prefix of the python installation where you installed the wheel package?
That will list all the shared libraries on which the linphone python module depends and where they are looked for.

Cheers,
Ghislain


On 02/03/2016 11:08 AM, Loïc Maudou wrote:
Hi Ghislain,
Thanks for your answer. I think that was already what I've done because speex is part of the linphone-cmake-builder package. I tried to recompile and copy the speex librairy to /usr/lib of the raspberry, but the error remains the same. Also, by making a wrong compilation, I had a preview of the message when he can find a librairy during the python linphone import :
/usr/lib/libswresample.so.1: version `LIBSWRESAMPLE_1' not found (required by /usr/lib/libavcodec.so.56)
I believe the origin of the problem comes from the "nm" warning during pylinphone configuration. As he cannot find the librairy, the symbols stay unknown for him. Do somebody have an idea of where is indicated the path to the librairy he had to find ? (I have to admit that my knowledge of cmake is quite weak...)
Thanks a lot for your help !

Loïc
Cet e-mail a été envoyé depuis un ordinateur protégé par Avast.
www.avast.com

2016-02-02 16:45 GMT+01:00 Ghislain MARY <address@hidden>:
Hi Loïc,

You need to build the speex library from the linphone branch of the git://git.linphone.org/speex.git repository.

Cheers,
Ghislain


On 02/02/2016 16:10, Loïc Maudou wrote:
Hi,
I'm trying to compile python API for a raspberry pi 2 working with archlinux with video display support (I heard the already compiled version cannot display video).
I'm using cross compilation from an Archlinux computer using a toolchain generated by crosstool-ng.
I did manage to finish the process, but I get this strange warning during pylinphone configuration:

nm: « linphone »: pas de tel fichier (means "No such file" in french)
nm: « mediastreamer_base »: pas de tel fichier
nm: « mediastreamer_voip »: pas de tel fichier
nm: « ortp »: pas de tel fichier
nm: « bzrtp »: pas de tel fichier
nm: « bellesip »: pas de tel fichier
nm: « linphone »: pas de tel fichier
nm: « mediastreamer_base »: pas de tel fichier
nm: « mediastreamer_voip »: pas de tel fichier
nm: « ortp »: pas de tel fichier
nm: « bzrtp »: pas de tel fichier
nm: « bellesip »: pas de tel fichier

The installation of the wheel package works, but when I try to import linphone, I get this error message :

>>> from linphone import *
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.7/site-packages/linphone/__init__.py", line 1, in <module>
    from linphone import *
ImportError: /usr/lib/python2.7/site-packages/linphone/linphone.so: undefined symbol: speex_echo_state_blob_get_data
b_get_data

It looks like the librairy where not used by pylinphone... I've been looking for the cause those 3 days but did not manage to find it...

Thanks in advance for your help !

Loïc


_______________________________________________
Linphone-developers mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/linphone-developers


_______________________________________________
Linphone-developers mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/linphone-developers




_______________________________________________
Linphone-developers mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/linphone-developers


_______________________________________________
Linphone-developers mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/linphone-developers



reply via email to

[Prev in Thread] Current Thread [Next in Thread]