Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [mosquitto-dev] Linking C shared module mosquitto_message_timestamp.so failed in MacOS

Hi Luke,

Could you try adding the following line to
plugins/message-timestamp/CMakeLists.txt after the add_library line
please?

target_link_libraries(mosquitto_message_timestamp mosquitto)

Alternatively, comment out the message-timestamp line in
plugins/CMakeLists.txt, it's only an example plugin.

Regards,

Roger

On Fri, 3 Sept 2021 at 02:55, Luke Chen <lchen.dev@xxxxxxxxx> wrote:
>
> Hi,
>
> 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
>
>
>
> _______________________________________________
> mosquitto-dev mailing list
> mosquitto-dev@xxxxxxxxxxx
> To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/mosquitto-dev


Back to the top