eclipse/paho.mqtt.c

I can not build static libraries

EmBitz opened this issue · 1 comments

If I select shared or static or both shared and static, I always end up with only dynamic libraries,
In the target list (--target help) there is also no '-static' targets to select

To Reproduce

Expected behavior
Both dynamic and static libraries if I select this via e.g. cmake-gui

Screenshots

Log files

** Environment (please complete the following information):**

  • OS: Ubuntu
  • Version 20

Additional context
Building from source

@EmBitz if it helps, I can build successfully both on Ubuntu 20.04/22.04. Here's the command that I use:

cmake -Bbuild -H. -DPAHO_ENABLE_TESTING=OFF -DPAHO_BUILD_STATIC=ON -DPAHO_WITH_SSL=ON -DPAHO_HIGH_PERFORMANCE=ON -DCMAKE_INSTALL_PREFIX=../install

Combined output for MQTT C and CPP libs

total 7852
drwxrwxr-x 3 dev dev    4096 Feb 27 15:52 ./
drwxrwxr-x 6 dev dev    4096 Feb 27 15:52 ../
drwxrwxr-x 4 dev dev    4096 Feb 27 15:52 cmake/
-rw-r--r-- 1 dev dev  373980 Feb 27 15:52 libpaho-mqtt3a.a
-rw-r--r-- 1 dev dev  411174 Feb 27 15:52 libpaho-mqtt3as.a
lrwxrwxrwx 1 dev dev      19 Feb 27 15:52 libpaho-mqtt3a.so -> libpaho-mqtt3a.so.1
lrwxrwxrwx 1 dev dev      24 Feb 27 15:52 libpaho-mqtt3a.so.1 -> libpaho-mqtt3a.so.1.3.13
-rw-r--r-- 1 dev dev  222656 Feb 27 15:52 libpaho-mqtt3a.so.1.3.13
lrwxrwxrwx 1 dev dev      20 Feb 27 15:52 libpaho-mqtt3as.so -> libpaho-mqtt3as.so.1
lrwxrwxrwx 1 dev dev      25 Feb 27 15:52 libpaho-mqtt3as.so.1 -> libpaho-mqtt3as.so.1.3.13
-rw-r--r-- 1 dev dev  249528 Feb 27 15:52 libpaho-mqtt3as.so.1.3.13
-rw-r--r-- 1 dev dev  327282 Feb 27 15:52 libpaho-mqtt3c.a
-rw-r--r-- 1 dev dev  364932 Feb 27 15:52 libpaho-mqtt3cs.a
lrwxrwxrwx 1 dev dev      19 Feb 27 15:52 libpaho-mqtt3c.so -> libpaho-mqtt3c.so.1
lrwxrwxrwx 1 dev dev      24 Feb 27 15:52 libpaho-mqtt3c.so.1 -> libpaho-mqtt3c.so.1.3.13
-rw-r--r-- 1 dev dev  196488 Feb 27 15:52 libpaho-mqtt3c.so.1.3.13
lrwxrwxrwx 1 dev dev      20 Feb 27 15:52 libpaho-mqtt3cs.so -> libpaho-mqtt3cs.so.1
lrwxrwxrwx 1 dev dev      25 Feb 27 15:52 libpaho-mqtt3cs.so.1 -> libpaho-mqtt3cs.so.1.3.13
-rw-r--r-- 1 dev dev  223304 Feb 27 15:52 libpaho-mqtt3cs.so.1.3.13
-rw-r--r-- 1 dev dev 3955774 Feb 27 15:52 libpaho-mqttpp3.a
lrwxrwxrwx 1 dev dev      20 Feb 27 15:52 libpaho-mqttpp3.so -> libpaho-mqttpp3.so.1
lrwxrwxrwx 1 dev dev      24 Feb 27 15:52 libpaho-mqttpp3.so.1 -> libpaho-mqttpp3.so.1.3.2
-rw-r--r-- 1 dev dev 1683184 Feb 27 15:52 libpaho-mqttpp3.so.1.3.2