Trace Output showing version 1.3.9 when 1.3.13 is installed
rywager opened this issue · 3 comments
Describe the bug
Trace Output showing version 1.3.9 when 1.3.13 is installed.
Trace: [3] =========================================================
Trace: [3] Trace Output
Trace: [3] Product name: Eclipse Paho Asynchronous MQTT C Client Library
Trace: [3] Version: 1.3.9
Trace: [3] Build level: 2021-05-24T18:53:54Z
Trace: [3] OpenSSL version: OpenSSL 1.1.1w 11 Sep 2023
Trace: [3] OpenSSL flags: compiler: arm-poky-linux-gnueabi-gcc -mthumb -mfpu=neon-vfpv4 -mfloat-abi=hard -mcpu=cortex-a7 -fstack-protector-strong -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security -Wdate-time --sysroot=recipe-sysroot -O2 -pipe -g -feliminate-unused-debug-types -fmacro-prefix-map= -fdebug-prefix-map= -fdebug-prefix-map= -fdebug-prefix-map= -DOPENSSL_USE_NODELETE -DOPENSSL_PIC -DOPENSSL_CPUID_OBJ -DOPENSSL_BN_ASM_
From Dockerfile install
#8 47.70 ::::::::::::::
#8 47.70 ./version.major
#8 47.70 ::::::::::::::
#8 47.70 1::::::::::::::
#8 47.71 ./version.minor
#8 47.71 ::::::::::::::
#8 47.71 3::::::::::::::
#8 47.72 ./version.patch
#8 47.72 ::::::::::::::
#8 47.72 13
To Reproduce
wget https://github.com/eclipse/paho.mqtt.c/archive/refs/tags/v1.3.13.tar.gz &&
tar xvf v1.3.13.tar.gz &&
rm v1.3.13.tar.gz &&
cd paho.mqtt.c-1.3.13 &&
cmake -Bbuild -H. -DPAHO_WITH_SSL=ON -DPAHO_ENABLE_TESTING=OFF
-DCMAKE_INSTALL_PREFIX=/opt/axis/acapsdk/sysroots/armv7hf/usr &&
cmake --build build/ --target install &&
cd .. &&
rm -rf ./paho.mqtt.c-1.3.13
Initialize a client in C
See trace output above
Expected behavior
I would expect to see version 1.3.13 in the trace output.
Screenshots
![image](https://private-user-images.githubusercontent.com/16105303/302742146-0c0574a5-ce5c-4e1f-a42d-bc91d7ad3748.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjMyNjI4NjAsIm5iZiI6MTcyMzI2MjU2MCwicGF0aCI6Ii8xNjEwNTMwMy8zMDI3NDIxNDYtMGMwNTc0YTUtY2U1Yy00ZTFmLWE0MmQtYmM5MWQ3YWQzNzQ4LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MTAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODEwVDA0MDI0MFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPThmOTI2MjcwNzc1OGI5OTMyMmEwNzM0OTYzMTZjNDFjODFlZTU5NmQyMjkxZGQwM2IyYjlkOGQxMzM4Y2MzYTQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.6Gush6wse9-BlBhIVHoHh642eUAnuoeHhn6MFaEoN5s)
![image](https://private-user-images.githubusercontent.com/16105303/302742387-2a165fa6-3e12-4f21-9c28-aa3afb3a0267.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjMyNjI4NjAsIm5iZiI6MTcyMzI2MjU2MCwicGF0aCI6Ii8xNjEwNTMwMy8zMDI3NDIzODctMmExNjVmYTYtM2UxMi00ZjIxLTljMjgtYWEzYWZiM2EwMjY3LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MTAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODEwVDA0MDI0MFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTRiNzBhNDlhMTRlOThiZDdhYWZmYjU2YjcyM2RjZjU3MDgwYzRjOWI5ZmIwZTFiYWU2NTUzZTQ4YmE3OWZhN2QmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.EF04vdjNXvhF83kpkAy7FWSl4Aj4Lz5y574km7Ts7o8)
** Environment (please complete the following information):**
Linux axis-b8a44f278992 5.10.52-axis8 #1 PREEMPT Wed Nov 30 11:47:20 UTC 2022 armv7l GNU/Linux
You have an older version of the library somewhere on your system that is loaded first.
Try:
which libpaho-mqtt3as.so
to see all libpaho-mqtt3as.so in your system,
What @jumoog said is correct. If you have ldd available, you can use it to see exactly which one your app is linked against, like:
$ ldd async_consume | grep paho
libpaho-mqttpp3.so.1 => /usr/local/lib/libpaho-mqttpp3.so.1 (0x00007fd4fdf88000)
libpaho-mqtt3as.so.1 => /usr/local/lib/libpaho-mqtt3as.so.1 (0x00007fd4fdf52000)
(Here I see my async_consume app is linked to the Paho C and C++ libraries in /usr/local/lib).
For_ your setup, the cross-compile ldd may be arm-poky-linux-gnueabi-ldd
Seems to be the case, not sure how this was happening since i'm building from Docker and compiling but i added the flags to build static and now i'm getting the correct output.
Thank you both!
-DPAHO_BUILD_STATIC=ON -DPAHO_BUILD_SHARED=OFF \