我一直在尝试成功构建OpenWrt图像。但是当我尝试用mosquitto-client
作为包构建它时,我得到以下错误:
make[3]: Entering directory `/Volumes/OpenWrt/openwrt/feeds/packages/net/mosquitto'
. /Volumes/OpenWrt/openwrt/include/shell.sh; gzip -dc /Volumes/OpenWrt/openwrt/dl/mosquitto-1.4.10.tar.gz | trapret 2 tar -C /Volumes/OpenWrt/openwrt/build_dir/target-arm_cortex-a7+vfp_uClibc-0.9.33.2_eabi/mosquitto-ssl/mosquitto-1.4.10/.. -xf -
Applying ./patches/0001-websockets-fix-compatibility-with-older-lws-versions.patch using plaintext:
patching file src/mosquitto_broker.h
patching file src/websockets.c
touch /Volumes/OpenWrt/openwrt/build_dir/target-arm_cortex-a7+vfp_uClibc-0.9.33.2_eabi/mosquitto-ssl/mosquitto-1.4.10/.prepared_df8154ff7dec8a8a9e5687f50791b264
rm -f /Volumes/OpenWrt/openwrt/staging_dir/target-arm_cortex-a7+vfp_uClibc-0.9.33.2_eabi/stamp/.mosquitto.ssl_installed
(cd /Volumes/OpenWrt/openwrt/build_dir/target-arm_cortex-a7+vfp_uClibc-0.9.33.2_eabi/mosquitto-ssl/mosquitto-1.4.10/./; if [ -x ./configure ]; then find /Volumes/OpenWrt/openwrt/build_dir/target-arm_cortex-a7+vfp_uClibc-0.9.33.2_eabi/mosquitto-ssl/mosquitto-1.4.10/ -name config.guess | xargs -r chmod u+w; find /Volumes/OpenWrt/openwrt/build_dir/target-arm_cortex-a7+vfp_uClibc-0.9.33.2_eabi/mosquitto-ssl/mosquitto-1.4.10/ -name config.guess | xargs -r -n1 cp --remove-destination /Volumes/OpenWrt/openwrt/scripts/config.guess; find /Volumes/OpenWrt/openwrt/build_dir/target-arm_cortex-a7+vfp_uClibc-0.9.33.2_eabi/mosquitto-ssl/mosquitto-1.4.10/ -name config.sub | xargs -r chmod u+w; find /Volumes/OpenWrt/openwrt/build_dir/target-arm_cortex-a7+vfp_uClibc-0.9.33.2_eabi/mosquitto-ssl/mosquitto-1.4.10/ -name config.sub | xargs -r -n1 cp --remove-destination /Volumes/OpenWrt/openwrt/scripts/config.sub; AR="arm-openwrt-linux-uclibcgnueabi-gcc-ar" AS="arm-openwrt-linux-uclibcgnueabi-gcc -c -Os -pipe -march=armv7-a -mtune=cortex-a7 -mfpu=vfp -fno-caller-saves -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -mfloat-abi=soft" LD=arm-openwrt-linux-uclibcgnueabi-ld NM="arm-openwrt-linux-uclibcgnueabi-gcc-nm" CC="arm-openwrt-linux-uclibcgnueabi-gcc" GCC="arm-openwrt-linux-uclibcgnueabi-gcc" CXX="arm-openwrt-linux-uclibcgnueabi-g++" RANLIB="arm-openwrt-linux-uclibcgnueabi-gcc-ranlib" STRIP=arm-openwrt-linux-uclibcgnueabi-strip OBJCOPY=arm-openwrt-linux-uclibcgnueabi-objcopy OBJDUMP=arm-openwrt-linux-uclibcgnueabi-objdump SIZE=arm-openwrt-linux-uclibcgnueabi-size CFLAGS="-Os -pipe -march=armv7-a -mtune=cortex-a7 -mfpu=vfp -fno-caller-saves -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -mfloat-abi=soft " CXXFLAGS="-Os -pipe -march=armv7-a -mtune=cortex-a7 -mfpu=vfp -fno-caller-saves -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -mfloat-abi=soft " CPPFLAGS="-I/Volumes/OpenWrt/openwrt/staging_dir/target-arm_cortex-a7+vfp_uClibc-0.9.33.2_eabi/usr/include -I/Volumes/OpenWrt/openwrt/staging_dir/target-arm_cortex-a7+vfp_uClibc-0.9.33.2_eabi/include -I/Volumes/OpenWrt/openwrt/staging_dir/toolchain-arm_cortex-a7+vfp_gcc-4.8-linaro_uClibc-0.9.33.2_eabi/usr/include -I/Volumes/OpenWrt/openwrt/staging_dir/toolchain-arm_cortex-a7+vfp_gcc-4.8-linaro_uClibc-0.9.33.2_eabi/include " LDFLAGS="-L/Volumes/OpenWrt/openwrt/staging_dir/target-arm_cortex-a7+vfp_uClibc-0.9.33.2_eabi/usr/lib -L/Volumes/OpenWrt/openwrt/staging_dir/target-arm_cortex-a7+vfp_uClibc-0.9.33.2_eabi/lib -L/Volumes/OpenWrt/openwrt/staging_dir/toolchain-arm_cortex-a7+vfp_gcc-4.8-linaro_uClibc-0.9.33.2_eabi/usr/lib -L/Volumes/OpenWrt/openwrt/staging_dir/toolchain-arm_cortex-a7+vfp_gcc-4.8-linaro_uClibc-0.9.33.2_eabi/lib " ./configure --target=arm-openwrt-linux --host=arm-openwrt-linux --build=x86_64-apple-darwin15.6.0 --program-prefix="" --program-suffix="" --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --libexecdir=/usr/lib --sysconfdir=/etc --datadir=/usr/share --localstatedir=/var --mandir=/usr/man --infodir=/usr/info --disable-nls ; fi; )
rm -f /Volumes/OpenWrt/openwrt/build_dir/target-arm_cortex-a7+vfp_uClibc-0.9.33.2_eabi/mosquitto-ssl/mosquitto-1.4.10/.configured_*
touch /Volumes/OpenWrt/openwrt/build_dir/target-arm_cortex-a7+vfp_uClibc-0.9.33.2_eabi/mosquitto-ssl/mosquitto-1.4.10/.configured_yyyyyyyy
CFLAGS="-Os -pipe -march=armv7-a -mtune=cortex-a7 -mfpu=vfp -fno-caller-saves -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -mfloat-abi=soft -I/Volumes/OpenWrt/openwrt/staging_dir/target-arm_cortex-a7+vfp_uClibc-0.9.33.2_eabi/usr/include -I/Volumes/OpenWrt/openwrt/staging_dir/target-arm_cortex-a7+vfp_uClibc-0.9.33.2_eabi/include -I/Volumes/OpenWrt/openwrt/staging_dir/toolchain-arm_cortex-a7+vfp_gcc-4.8-linaro_uClibc-0.9.33.2_eabi/usr/include -I/Volumes/OpenWrt/openwrt/staging_dir/toolchain-arm_cortex-a7+vfp_gcc-4.8-linaro_uClibc-0.9.33.2_eabi/include " CXXFLAGS="-Os -pipe -march=armv7-a -mtune=cortex-a7 -mfpu=vfp -fno-caller-saves -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -mfloat-abi=soft -I/Volumes/OpenWrt/openwrt/staging_dir/target-arm_cortex-a7+vfp_uClibc-0.9.33.2_eabi/usr/include -I/Volumes/OpenWrt/openwrt/staging_dir/target-arm_cortex-a7+vfp_uClibc-0.9.33.2_eabi/include -I/Volumes/OpenWrt/openwrt/staging_dir/toolchain-arm_cortex-a7+vfp_gcc-4.8-linaro_uClibc-0.9.33.2_eabi/usr/include -I/Volumes/OpenWrt/openwrt/staging_dir/toolchain-arm_cortex-a7+vfp_gcc-4.8-linaro_uClibc-0.9.33.2_eabi/include " LDFLAGS="-L/Volumes/OpenWrt/openwrt/staging_dir/target-arm_cortex-a7+vfp_uClibc-0.9.33.2_eabi/usr/lib -L/Volumes/OpenWrt/openwrt/staging_dir/target-arm_cortex-a7+vfp_uClibc-0.9.33.2_eabi/lib -L/Volumes/OpenWrt/openwrt/staging_dir/toolchain-arm_cortex-a7+vfp_gcc-4.8-linaro_uClibc-0.9.33.2_eabi/usr/lib -L/Volumes/OpenWrt/openwrt/staging_dir/toolchain-arm_cortex-a7+vfp_gcc-4.8-linaro_uClibc-0.9.33.2_eabi/lib " /Library/Developer/CommandLineTools/usr/bin/make -j1 -C /Volumes/OpenWrt/openwrt/build_dir/target-arm_cortex-a7+vfp_uClibc-0.9.33.2_eabi/mosquitto-ssl/mosquitto-1.4.10/. AR="arm-openwrt-linux-uclibcgnueabi-gcc-ar" AS="arm-openwrt-linux-uclibcgnueabi-gcc -c -Os -pipe -march=armv7-a -mtune=cortex-a7 -mfpu=vfp -fno-caller-saves -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -mfloat-abi=soft" LD=arm-openwrt-linux-uclibcgnueabi-ld NM="arm-openwrt-linux-uclibcgnueabi-gcc-nm" CC="arm-openwrt-linux-uclibcgnueabi-gcc" GCC="arm-openwrt-linux-uclibcgnueabi-gcc" CXX="arm-openwrt-linux-uclibcgnueabi-g++" RANLIB="arm-openwrt-linux-uclibcgnueabi-gcc-ranlib" STRIP=arm-openwrt-linux-uclibcgnueabi-strip OBJCOPY=arm-openwrt-linux-uclibcgnueabi-objcopy OBJDUMP=arm-openwrt-linux-uclibcgnueabi-objdump SIZE=arm-openwrt-linux-uclibcgnueabi-size CROSS="arm-openwrt-linux-uclibcgnueabi-" ARCH="arm" WITH_DOCS=no WITH_WEBSOCKETS="no" ;
Makefile:18: *** Please compile using CMake on Mac OS X. Stop.
make[3]: *** [/Volumes/OpenWrt/openwrt/build_dir/target-arm_cortex-a7+vfp_uClibc-0.9.33.2_eabi/mosquitto-ssl/mosquitto-1.4.10/.built] Error 2
make[3]: Leaving directory `/Volumes/OpenWrt/openwrt/feeds/packages/net/mosquitto'
make[2]: *** [package/feeds/packages/mosquitto/compile] Error 2
make[2]: Leaving directory `/Volumes/OpenWrt/openwrt'
make[1]: *** [/Volumes/OpenWrt/openwrt/staging_dir/target-arm_cortex-a7+vfp_uClibc-0.9.33.2_eabi/stamp/.package_compile] Error 2
make[1]: Leaving directory `/Volumes/OpenWrt/openwrt'
make: *** [world] Error 2
我已经安装了CMake,但仍然没有工作。我正在运行OS X 10.11.6
Target System: Broadcom BCM2708/BCM2709
Subtarget: BCM2709 based boards
Target Profile: Raspberry Pi 2
Version: 15.05 (chaos_calmer)
答案 0 :(得分:0)
问题是我需要在使用mosquitto-client
之前使用cmake
单独构建make
。
我在cmake . -DWITH_SRV=OFF
中调用了/Volumes/OpenWrt/openwrt/build_dir/target-arm_cortex-a7+vfp_uClibc-0.9.33.2_eabi/mosquitto-nossl/mosquitto-1.4.10/client
。
之后我又在make
中尝试了/Volumes/OpenWrt/openwrt/
,这次没有错误。