I have tried to compile Mosquitto on both Arch and CentOS 7, but everytime I get the same error. I want to test the Websocket feature.
This is the procedure I am using for CentOS:
yum group install "Development Tools"
yum install cmake openssl-devel cmake
yum install uuid-devel libxslt docbook5-style-xsl.noarch docbook-style-xsl.noarch
mkdir build;cd build
git checkout origin/1.4
And this is where it dies on Arch and CentOS:
make: Entering directory '/home/install/org.eclipse.mosquitto/src' cc -Wall -ggdb -O2 -I. -I.. -I../lib -DVERSION="\"1.4\"" -DTIMESTAMP="\"2015-05-04 17:17:55+0200\"" -DWITH_BROKER -DWITH_TLS -DWITH_TLS_PSK -DWITH_UUID -DWITH_BRIDGE -DWITH_PERSISTENCE -DWITH_MEMORY_TRACKING -DWITH_SYS_TREE -DWITH_WEBSOCKETS -DWITH_EC -c mosquitto.c -o mosquitto.o In file included from /usr/include/unistd.h:25:0, from mosquitto.c:22: /usr/include/features.h:148:3: warning: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-Wcpp] # warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" mosquitto.c: In function ‘main’: mosquitto.c:275:101: error: expected expression before ‘,’ token _mosquitto_log_printf(NULL, MOSQ_LOG_INFO, "mosquitto version %s (build date %s) starting", VERSION, TIMESTAMP); mosquitto.c:290:54: error: expected expression before ‘)’ token snprintf(buf, 1024, "mosquitto version %s", VERSION); mosquitto.c:368:88: error: expected expression before ‘)’ token _mosquitto_log_printf(NULL, MOSQ_LOG_INFO, "mosquitto version %s terminating", VERSION); Makefile:15: recipe for target 'mosquitto.o' failed make: *** [mosquitto.o] Error 1 make: Leaving directory '/home/install/org.eclipse.mosquitto/src' Makefile:21: recipe for target 'mosquitto' failed make: *** [mosquitto] Error 2
If someone can please point out what I am doing wrong or missing ?