Search code examples
websocketmakefilemqttiotmosquitto

Compiling Mosquitto MQTT 1.4.8 with websocket support


I am currently trying to compile v1.4.8 with websocket support on a RHEL6.7 machine.

Steps taken:

 - yum groupinstall "Development Tools"'
 - yum install wget mercurial cmake openssl-devel c-ares-devel libuuid-devel
 - wget https://github.com/warmcat/libwebsockets/archive/v1.3-chrome37-firefox30.tar.gz
 - tar zxvf v1.3-chrome37-firefox30.tar.gz
 - cd libwebsockets-1.3-chrome37-firefox30
 - mkdir build; cd build;
 - cmake .. -DLIB_SUFFIX=64
 - make install
 - git clone https://git.eclipse.org/r/mosquitto/org.eclipse.mosquitto
 - cd org.eclipse.mosquitto/
 - git checkout tags/v1.4.8
 - //edited config.mk ==> WITH_SRV=no, WITH_WEBSOCKETS:=yes
 - make binary
 - make install

However on the last step (make install) I get an error (output shown below). Doing some searching brought up this page. However I'm building from a released tag so I'm not sure why I'm getting the same error.

Any information would be greatly appreciated, thanks!

ERROR

set -e; for d in lib client src; do make -C ${d}; done
make[1]: Entering directory `/root/org.eclipse.mosquitto-1.4.8/lib'
make -C cpp
make[2]: Entering directory `/root/org.eclipse.mosquitto-1.4.8/lib/cpp'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/root/org.eclipse.mosquitto-1.4.8/lib/cpp'
make[1]: Leaving directory `/root/org.eclipse.mosquitto-1.4.8/lib'
make[1]: Entering directory `/root/org.eclipse.mosquitto-1.4.8/client'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/root/org.eclipse.mosquitto-1.4.8/client'
make[1]: Entering directory `/root/org.eclipse.mosquitto-1.4.8/src'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/root/org.eclipse.mosquitto-1.4.8/src'
set -e; for d in lib client src; do make -C ${d} install; done
make[1]: Entering directory `/root/org.eclipse.mosquitto-1.4.8/lib'
make -C cpp
make[2]: Entering directory `/root/org.eclipse.mosquitto-1.4.8/lib/cpp'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/root/org.eclipse.mosquitto-1.4.8/lib/cpp'
install -d /usr/local/lib/
install -s --strip-program=strip libmosquitto.so.1 /usr/local/lib/libmosquitto.so.1
ln -sf libmosquitto.so.1 /usr/local/lib/libmosquitto.so
install -d /usr/local/include/
install mosquitto.h /usr/local/include/mosquitto.h
make -C cpp install
make[2]: Entering directory `/root/org.eclipse.mosquitto-1.4.8/lib/cpp'
install -d /usr/local/lib/
install -s --strip-program=strip libmosquittopp.so.1 /usr/local/lib/libmosquittopp.so.1
ln -sf libmosquittopp.so.1 /usr/local/lib/libmosquittopp.so
install -d /usr/local/include/
install mosquittopp.h /usr/local/include/mosquittopp.h
make[2]: Leaving directory `/root/org.eclipse.mosquitto-1.4.8/lib/cpp'
make[1]: Leaving directory `/root/org.eclipse.mosquitto-1.4.8/lib'
make[1]: Entering directory `/root/org.eclipse.mosquitto-1.4.8/client'
install -d /usr/local/bin
install -s --strip-program=strip mosquitto_pub /usr/local/bin/mosquitto_pub
install -s --strip-program=strip mosquitto_sub /usr/local/bin/mosquitto_sub
make[1]: Leaving directory `/root/org.eclipse.mosquitto-1.4.8/client'
make[1]: Entering directory `/root/org.eclipse.mosquitto-1.4.8/src'
install -d /usr/local/sbin
install -s --strip-program=strip mosquitto /usr/local/sbin/mosquitto
install mosquitto_plugin.h /usr/local/include/mosquitto_plugin.h
install -s --strip-program=strip mosquitto_passwd /usr/local/bin/mosquitto_passwd
make[1]: Leaving directory `/root/org.eclipse.mosquitto-1.4.8/src'
set -e; for d in man; do make -C ${d} install; done
make[1]: Entering directory `/root/org.eclipse.mosquitto-1.4.8/man'
install -d /usr/local/share/man/man8
install -m 644 mosquitto.8 /usr/local/share/man/man8/mosquitto.8
install: cannot stat `mosquitto.8': No such file or directory
make[1]: *** [install] Error 1
make[1]: Leaving directory `/root/org.eclipse.mosquitto-1.4.8/man'
make: *** [install] Error 2

Solution

  • The git repository doesn't include the generated man pages, only the released tar balls do. As you are using "make binary" the man pages are not generated - nor would they be on RHEL due to differing file paths for the needed xslt files. Install fails because the man pages aren't there.

    Try using the released tar ball instead, that is the canonical release for end users.

    I'd suggest not using an obsolete version of libwebsockets as well.