Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I can not build static libraries #1448

Open
EmBitz opened this issue Feb 7, 2024 · 1 comment
Open

I can not build static libraries #1448

EmBitz opened this issue Feb 7, 2024 · 1 comment
Labels

Comments

@EmBitz
Copy link

EmBitz commented Feb 7, 2024

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

@icraggs icraggs added the build label Feb 9, 2024
@kaushal98
Copy link

@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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants