QMICLI/symbol lookup error

Aleksander Morgado aleksander at aleksander.es
Sun Mar 13 16:28:53 UTC 2016


On Sun, Mar 13, 2016 at 4:10 PM, Sebastian Sjoholm
<sebastian.sjoholm at gmail.com> wrote:
>
>> On Mar 13, 2016, at 11:52 , Aleksander Morgado <aleksander at aleksander.es> wrote:
>>
>> On Sun, Mar 13, 2016 at 8:48 AM, Sebastian Sjoholm
>> <sebastian.sjoholm at gmail.com> wrote:
>>> Regarding the issue with qmicli. I have removed the apt installed qmicli package and compiled from GIT master the latest version.
>>>
>>>>
>>>> Looks like qmicli from git master, trying to use libqmi-glib from your
>>>> system-installed package. If you installed libqmi somewhere else not
>>>> in /usr, you'll need LD_LIBRARY_PATH; e.g.:
>>>>
>>>> $ LD_LIBRARY_PATH=/path/somewhere/lib /path/somewhere/bin/qmicli --version
>>>>
>>>
>>>
>>> root at SBC13:/opt/libqmi# qmicli -d /dev/cdc-wdm0 -e -v
>>> [13 Mar 2016, 08:22:38] [Debug] [/dev/cdc-wdm0] Opening device with flags 'none'...
>>> [13 Mar 2016, 08:22:38] [Debug] QMI Device at '/dev/cdc-wdm0' ready
>>> [13 Mar 2016, 08:22:38] [Debug] Getting expected WWAN data format this control port...
>>> qmicli: symbol lookup error: qmicli: undefined symbol: qmi_device_get_expected_data_format
>>> root at SBC05:~#
>>>
>>> When using the “LD_LIBRARY_PATH” in front, then it will work as specified.
>>>
>>> root at SBC05:~# LD_LIBRARY_PATH=/usr/lib/ /usr/bin/qmicli -d /dev/cdc-wdm0 -e
>>> 802-3
>>> root at SBC05:~#
>>>
>>> So basically by setting the LD_LIBRARY_PATH like:
>>>
>>> export LD_LIBRARY_PATH=/usr/lib/
>>>
>>> will fix it.
>>
>> This is really an issue with your own setup, not something we can fix
>> in libqmi. A mixup with where lib/cli are installed or something.
>>
>> What's the output of this? This should tell you where qmicli is
>> looking for libqmi by default.
>> $ ldd /usr/bin/qmicli | grep libqmi
>>
>
>
> yes, you are right, it is my setup. As the lld printout show, it seems to be pointed to a directory with old version of the file.
>
> root at SBC05:/opt/libqmi# ldd /usr/bin/qmicli | grep libqmi
>         libqmi-glib.so.1 => /usr/lib/arm-linux-gnueabihf/libqmi-glib.so.1 (0x76c10000)
> root at SBC05:/opt/libqmi#
>
> root at SBC05:/opt/libqmi# ls -la /usr/lib/arm-linux-gnueabihf/libqmi-glib.so.1
> lrwxrwxrwx 1 root root 20 Sep 17  2014 /usr/lib/arm-linux-gnueabihf/libqmi-glib.so.1 -> libqmi-glib.so.1.2.0
> root at SBC05:/opt/libqmi#
>
> The new version is located at /usr/lib/
>
> root at SBC05:/opt/libqmi# ls -la /usr/lib/libqmi-glib.so.1
> lrwxrwxrwx 1 root root 20 Mar 10 11:47 /usr/lib/libqmi-glib.so.1 -> libqmi-glib.so.1.3.0
> root at SBC05:/opt/libqmi#
>
> After some digging, I added the “—libdir” parameter to the autogen command, like following;
>
> $ ./autogen.sh --prefix=/usr --libdir=/usr/lib/arm-linux-gnueabihf/
>
> root at SBC05:/opt/libqmi# ldd /usr/bin/qmicli | grep libqmi
>         libqmi-glib.so.1 => /usr/lib/arm-linux-gnueabihf/libqmi-glib.so.1 (0x76c91000)
> root at SBC05:/opt/libqmi#
>
> Now I can see that new version is located in the directory which the ldd printout is pointed to.
>
> root at SBC05:/opt/libqmi# ls -la /usr/lib/arm-linux-gnueabihf/libqmi-glib.so.1
> lrwxrwxrwx 1 root root 20 Mar 13 16:01 /usr/lib/arm-linux-gnueabihf/libqmi-glib.so.1 -> libqmi-glib.so.1.3.0
> root at SBC05:/opt/libqmi#
>
> And qmicli is working as it should.
>
> root at SBC05:/opt/libqmi# /usr/bin/qmicli -d /dev/cdc-wdm0 -e
> 802-3
> root at SBC05:/opt/libqmi#
>
> Thank you for all help. I guess I have learned a thing or two :)

Heh :)

-- 
Aleksander
https://aleksander.es


More information about the libqmi-devel mailing list