Skip to content

Instantly share code, notes, and snippets.

@alvaro893
Last active May 10, 2021 10:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save alvaro893/f5b8dd026eb98959e8c6c59a45b63cc2 to your computer and use it in GitHub Desktop.
Save alvaro893/f5b8dd026eb98959e8c6c59a45b63cc2 to your computer and use it in GitHub Desktop.
script to compile and run libqmi (works in raspberry pi)
#!/bin/bash
# instructions in INSTALL file on repository https://github.com/freedesktop/libqmi/
git clone https://github.com/freedesktop/libqmi/
cd libqmi
git checkout 1.28.2
# get dependencies libraries (Ubuntu)
sudo apt-get install glib-networking libmbim-glib-dev autoconf-archive python
# compilation
NOCONFIGURE=1 ./autogen.sh
./configure --without-udev
make
sudo make install
# start module (assuming /dev/cdc-wdm0)
sudo qmi-network /dev/cdc-wdm0 start
@rma153
Copy link

rma153 commented May 7, 2021

I successfully follow the above commands, but after the last step make && sudo make install, I get the following error. Can you recommend a solution?

CC libqmi_glib_la-qmi-device.lo
qmi-device.c: In function ‘initable_init_async’:
qmi-device.c:3056:15: error: assignment to ‘QmiDevice *’ {aka ‘struct _QmiDevice *’} from incompatible pointer type ‘GAsyncInitable *’ {aka ‘struct _GAsyncInitable *’} [-Werror=incompatible-pointer-types]
ctx->self = g_object_ref (initable);
^
cc1: all warnings being treated as errors
make[4]: *** [Makefile:609: libqmi_glib_la-qmi-device.lo] Error 1
make[4]: Leaving directory '/home/pi/libqmi-1.16.0/src/libqmi-glib'
make[3]: *** [Makefile:663: all-recursive] Error 1
make[3]: Leaving directory '/home/pi/libqmi-1.16.0/src/libqmi-glib'
make[2]: *** [Makefile:375: all-recursive] Error 1
make[2]: Leaving directory '/home/pi/libqmi-1.16.0/src'
make[1]: *** [Makefile:432: all-recursive] Error 1
make[1]: Leaving directory '/home/pi/libqmi-1.16.0'
make: *** [Makefile:364: all] Error 2

@alvaro893
Copy link
Author

@rma153 That's pretty old, it seems it doesn´t compile anymore on my desktop. However there is a github repo here https://github.com/freedesktop/libqmi/ and the last version is 1.28.2

It works if you follow the instructions on the repo, anyway I updated the script with what worked for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment