eclipse-mosquitto / mosquitto

Eclipse Mosquitto - An open source MQTT broker
https://mosquitto.org
Other
9.12k stars 2.41k forks source link

Cross compiling mosquitto 2.0.19 fails, cannot find opensslconf.h #3129

Closed arpadrozsa closed 1 month ago

arpadrozsa commented 1 month ago

The PR #3044 introduced a similar problem as in #2160. The ${OPENSSL_INCLUDE_DIR} include was removed from the CMakeLists.txt file of the lib directory: https://github.com/eclipse/mosquitto/commit/a3e5deb95235f64ca6aa5b53cf30d7ca0584c2d8#diff-4803677bd280f4dded52c428e3c8ac6c618508dcabcbe880b68be85897c2ad41L9

This causes that the openssl/opensslconf.h cannot be found in config.h when compiling lib/actions.c while using a cross-compiler and having the openssl library in a non-standard dir. Adding back ${OPENSSL_INCLUDE_DIR} to the include_directories function fixes this problem.

acode-x commented 1 month ago

Faced the same issue today when cross-compiling for alpine arm64.

ralight commented 1 month ago

Thank you, it looks like that was removed by mistake along with the pthreads directory.