使用websocket支持编译Mosquitto MQTT 1.4.8

时间:2016-03-25 21:31:14

标签: websocket makefile mqtt iot mosquitto

我目前正在尝试使用RHEL6.7计算机上的websocket支持编译v1.4.8。

采取的步骤:

 - 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

但是在最后一步(make install)我得到一个错误(输出如下所示)。进行了一些搜索this page。但是,我是从已发布的代码构建的,因此我不确定为什么我会收到相同的错误。

非常感谢任何信息,谢谢!

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

2 个答案:

答案 0 :(得分:0)

git存储库不包含生成的手册页,只有已发布的tar球。当你正在使用"制作二进制"由于所需xslt文件的文件路径不同,因此不会生成手册页 - 它们也不会出现在RHEL上。安装失败,因为手册页不在那里。

尝试使用已发布的tar球,这是最终用户的规范版本。

我建议不要使用过时版本的libwebsockets。

答案 1 :(得分:0)

make binary没有构建手册页,而make install假设它们已经构建并正在尝试安装它们。

构建手册页的Redhat / Fedora发行版存在问题。我以前见过这个,与其中一个docbook宏有关。

我过去已经解决了这个问题,我只需要找到我所做的改变。

编辑:修复方法是编辑man/manpage.xsl的第3行:

<xsl:import href="/usr/share/xml/docbook/stylesheet/docbook-xsl/manpages/docbook.xsl"/>

<xsl:import href="/usr/share/sgml/docbook/xsl-stylesheets-1.78.1/manpages/docbook.xsl"/>

然后在man目录中运行make,然后再运行make install

您可能需要安装 docbook-style-xsl