Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[mosquitto-dev] Building mosquitto on mac os x 10.9.4

I'm trying to build mosquitto on mac os x 10.9.4 with websocket support.

I've installed libwebsockets  without any troubles and building mosquitto with the default settings (websockets disabled) works fine.
However when I turn on websocket support (/Applications/CMake.app/Contents/bin/cmake . -DWITH_WEBSOCKETS=ON) running make results in the following error 

/Users/ddewaele/Projects/MQTT/with/mosquitto-1.4.1/src/mosquitto.c:275:101: error: expected _expression_

        _mosquitto_log_printf(NULL, MOSQ_LOG_INFO, "mosquitto version %s (build date %s) starting", VERSION, TIMESTAMP);

                                                                                                           ^

/Users/ddewaele/Projects/MQTT/with/mosquitto-1.4.1/src/mosquitto.c:290:3: error: expected _expression_

                snprintf(buf, 1024, "mosquitto version %s", VERSION);

                ^

/usr/include/secure/_stdio.h:57:73: note: expanded from macro 'snprintf'

  __builtin___snprintf_chk (str, len, 0, __darwin_obsz(str), __VA_ARGS__)

                                                                        ^

/Users/ddewaele/Projects/MQTT/with/mosquitto-1.4.1/src/mosquitto.c:368:88: error: expected _expression_

        _mosquitto_log_printf(NULL, MOSQ_LOG_INFO, "mosquitto version %s terminating", VERSION);


After commenting them out the build continues but fails with

Linking C executable mosquitto

Undefined symbols for architecture x86_64:

  "_deflate", referenced from:

      _lws_extension_callback_deflate_frame in libwebsockets.a(extension-deflate-frame.c.o)

     (maybe you meant: _lws_extension_callback_deflate_frame)

  "_deflateEnd", referenced from:

      _lws_extension_callback_deflate_frame in libwebsockets.a(extension-deflate-frame.c.o)

  "_deflateInit2_", referenced from:

      _lws_extension_callback_deflate_frame in libwebsockets.a(extension-deflate-frame.c.o)

  "_inflate", referenced from:

      _lws_extension_callback_deflate_frame in libwebsockets.a(extension-deflate-frame.c.o)

  "_inflateEnd", referenced from:

      _lws_extension_callback_deflate_frame in libwebsockets.a(extension-deflate-frame.c.o)

  "_inflateInit2_", referenced from:

      _lws_extension_callback_deflate_frame in libwebsockets.a(extension-deflate-frame.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]: *** [src/mosquitto] Error 1

make[1]: *** [src/CMakeFiles/mosquitto.dir/all] Error 2

make: *** [all] Error 2


Any ideas on how to fix this ?

Is there a guide somewhere that can help me how to get this built with websocket support ?


Thx


Back to the top