Page 1 of 1

Issue compiling NetworkManager from source

Posted: Sat Jan 06, 2018 3:43 pm
by UF_DoC
Good Day,

I would like to upgrade both my Network Manager and Modem Manager on my Raspberry Pi 3 (Stretch lite/headless). I am doing this in the hope that it solves a BUG I have using a 3G Modem with the pi. (*On a side note, maintaining a reliable connection with a 3G modem and a raspberry pi is seriously impossible or at least I have been failing miserably at this (for years). tried sakis3g for a long time and now NetworkManager)

Anyhow, I have been trying to install NetworkManager from source, I downloaded the source for Network Manager 1.8.4 I extracted the files and ran:

Code: Select all

./configure --with-modem-manager-1 
I had to install 10+ libxxx-dev packages but finally it completed with the following summary:

Code: Select all

System paths:
  prefix: /usr/local
  exec_prefix: ${prefix}
  systemdunitdir: $(prefix)/lib/systemd/system
  nmbinary: ${sbindir}/NetworkManager
  nmconfdir: ${sysconfdir}/NetworkManager
  nmlibdir: ${prefix}/lib/NetworkManager
  nmdatadir: ${datadir}/NetworkManager
  nmstatedir: ${localstatedir}/lib/NetworkManager
  nmrundir: ${runstatedir}/NetworkManager

Platform:
  session tracking: consolekit
  suspend/resume: consolekit
  policykit: yes (restrictive modify.system) (default: main.auth-polkit=yes)
  polkit agent: no
  selinux: no
  systemd-journald: no (default: logging.backend=syslog)
  hostname persist: default
  libaudit: no (default: logging.audit=false)

Features:
  wext: yes
  wifi: yes
  ppp: yes ${exec_prefix}/lib/pppd/2.4.5
  modemmanager-1: yes
  ofono: no
  concheck: yes
  libteamdctl: no
  libnm-glib: yes
  nmcli: yes
  nmtui: no

Configuration plugins (main.plugins=ifupdown,ibft)
  ibft: yes
  ifcfg-rh: no
  ifupdown: yes
  ifnet: no

Handlers for /etc/resolv.conf:
  resolvconf: no
  netconfig: no
  config-dns-rc-manager-default: symlink

DHCP clients (default dhclient):
  dhclient: /sbin/dhclient
  dhcpcd: /sbin/dhcpcd
  dhcpcd-supports-ipv6: yes

Miscellaneous:
  have introspection: yes
  build documentation and manpages: no
  install pregenerated documentation and manpages: yes
  tests: yes
  more-asserts: 0
  more-logging: no
  more-warnings: yes
  valgrind: no
  code coverage: no
  LTO: no
  linker garbage collection: yes
  JSON validation for libnm: yes
  sanitizers:
  Mozilla Public Suffix List: no
I then ran:

Code: Select all

make
sudo make install
First issue when I run nmcli it complained something about an incorrect version of:
libnm.so.0.1.0

So after some digging I found that this lib originally exists on the pi at /usr/lib/arm-linux-gnueabihf
however the "configure, make, make install" procedure installs libs into /usr/local/lib/

Im not sure if it is possible to setup the make process to install the libs correctly on the pi?

So as a hack I just copied the one lib from /usr/local/lib/ to /usr/lib/arm-linux-gnueabihf

NetworkManager now seems to work but when I try to add a "gsm" connection:

Code: Select all

sudo nmcli con add type gsm ifname "*" con-name 3GModem apn internet
it fails with:

Code: Select all

Error: Failed to add '3GModem' connection: No plugin supported adding this connection
Any guidance or advise will be appreciated.

Regards,

Re: Issue compiling NetworkManager from source

Posted: Tue Jan 09, 2018 7:52 am
by UF_DoC
This is the process for the Raspberry Pi after you install all supporting "dev" packages:

./autogen.sh --prefix=/usr --sysconfdir=/etc --localstatedir=/var -enable-wifi --enable-ppp --with-modem-manager-1
make
sudo make install