Skip to content

Installation of paho dependency

Seems there is wrong libpaho dependency when installinq iqrf-gateway-daemon

When upgraded from 2.2.0-beta to 2.3.0-beta there is problem:

From log:

20-03-2020 09:07:21.891109 WAR 0  MqttService.cpp:147 create() 
Throwing std::logic_error: MQTTClient_create() failed: retval="-8" 
20-03-2020 09:07:21.891308 WAR 0  ComponentInstance.cpp:305 checkActivate() 
Caught std::exception: MQTTClient_create() failed: retval="-8" 

From paho src code:

/**
 * Return code: A structure parameter does not have the correct eyecatcher
 * and version number.
 */
#define MQTTCLIENT_BAD_STRUCTURE -8

Installed paho:

root@aurora-gateway:~/install/lersengw-pckg/scripts# apt list --installed | grep paho                                                                                                                 
                                                                                                                                                                                                      
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.                                                                                                                       
                                                                                                                                                                                                      
libpaho-mqtt1.3/now 1.3.0-2~debian9 armhf [installed,upgradable to: 1.3.1-1~debian9]                                                                                                                  
root@aurora-gateway:~/install/lersengw-pckg/scripts#                                                                                                                                                  

Needs to be manually upgraded:

root@aurora-gateway:~/install/lersengw-pckg/scripts# apt-get --only-upgrade install libpaho-mqtt1.3                                                                                                   
Reading package lists... Done
Building dependency tree                                                                                                                                                                              
Reading state information... Done                                                                                                                                                                     
The following packages were automatically installed and are no longer required:                                                                                                                       
  fontconfig-config fonts-dejavu-core libargon2-1 libfontconfig1 libfreetype6 libgd3 libjbig0 libnginx-mod-http-auth-pam libnginx-mod-http-dav-ext libnginx-mod-http-echo libnginx-mod-http-geoip     
  libnginx-mod-http-image-filter libnginx-mod-http-subs-filter libnginx-mod-http-upstream-fair libnginx-mod-http-xslt-filter libnginx-mod-mail libnginx-mod-stream libpcre2-8-0 libpng16-16           
  libsodium23 libtiff5 libwebp6 libx11-6 libx11-data libxau6 libxcb1 libxdmcp6 libxpm4 libzip4 nginx-common nginx-full php-cli php-common php7.3-cli php7.3-common php7.3-curl php7.3-fpm             
  php7.3-json php7.3-mbstring php7.3-opcache php7.3-readline php7.3-sqlite3 php7.3-xml php7.3-zip sudo                                                                                                
Use 'apt autoremove' to remove them.                                                                                                                                                                  
The following packages will be upgraded:                                                                                                                                                              
  libpaho-mqtt1.3                                                                                                                                                                                     
1 upgraded, 0 newly installed, 0 to remove and 100 not upgraded.                                                                                                                                      
Need to get 134 kB of archives.                                                                                                                                                                       
After this operation, 8192 B of additional disk space will be used.                                                                                                                                   
Get:1 https://repos.iqrf.org/debian stretch/stable armhf libpaho-mqtt1.3 armhf 1.3.1-1~debian9 [134 kB]
Fetched 134 kB in 0s (142 kB/s)
(Reading database ... 33837 files and directories currently installed.)                                                                                                                               
Preparing to unpack .../libpaho-mqtt1.3_1.3.1-1~debian9_armhf.deb ...                                                                                                                                 
Unpacking libpaho-mqtt1.3:armhf (1.3.1-1~debian9) over (1.3.0-2~debian9) ...                                                                                                                          
Setting up libpaho-mqtt1.3:armhf (1.3.1-1~debian9) ...                                                                                                                                                
Processing triggers for libc-bin (2.24-11+deb9u4) ...                                                                                                                                                 
root@aurora-gateway:~/install/lersengw-pckg/scripts#                                                                                                                                                  

After that paho works with iqrf-gateway-daemon correctly