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

Trace Output showing version 1.3.9 when 1.3.13 is installed #1447

Closed
rywager opened this issue Feb 6, 2024 · 3 comments
Closed

Trace Output showing version 1.3.9 when 1.3.13 is installed #1447

rywager opened this issue Feb 6, 2024 · 3 comments

Comments

@rywager
Copy link

rywager commented Feb 6, 2024

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 image

** 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

@jumoog
Copy link
Contributor

jumoog commented Feb 6, 2024

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,

@fpagliughi
Copy link
Contributor

fpagliughi commented Feb 6, 2024

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

@rywager
Copy link
Author

rywager commented Feb 7, 2024

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 \

@rywager rywager closed this as completed Feb 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants