I tried to build mosquitto v2.0.12 in MacOS Big Sur (version 11.5.2) with the following steps but failed with the following error message:
mosquitto % cmake -Bbuild
...
...
-- Build files have been written to: /Users/lchen/git/mosquitto/build
mosquitto % cmake --build build
...
...
[ 91%] Building C object plugins/message-timestamp/CMakeFiles/mosquitto_message_timestamp.dir/mosquitto_message_timestamp.c.o
[ 91%] Linking C shared module mosquitto_message_timestamp.so
Undefined symbols for architecture x86_64:
"_mosquitto_callback_register", referenced from:
_mosquitto_plugin_init in mosquitto_message_timestamp.c.o
"_mosquitto_callback_unregister", referenced from:
_mosquitto_plugin_cleanup in mosquitto_message_timestamp.c.o
"_mosquitto_property_add_string_pair", referenced from:
_callback_message in mosquitto_message_timestamp.c.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [plugins/message-timestamp/mosquitto_message_timestamp.so] Error 1
make[1]: *** [plugins/message-timestamp/CMakeFiles/mosquitto_message_timestamp.dir/all] Error 2
make: *** [all] Error 2
Any help?
Thanks,
Luke