[vz-users] vzlogger-Cross-Compile für OpenWrt
Matthias Behr
mbehr at mcbehr.de
Sun Nov 17 21:38:47 CET 2019
Hmm. Code schaut ok aus. glob.h wird eingebunden.
Lt. https://linux.die.net/man/3/glob <https://linux.die.net/man/3/glob> gibt es da auch GLOB_BRACE.
Ich glaube das liegt an der Build-Umgebung. Siehe z.B. hier:
https://github.com/openwrt/packages-abandoned/blob/master/net/asterisk-11.x/patches/050-musl-glob-compat.patch <https://github.com/openwrt/packages-abandoned/blob/master/net/asterisk-11.x/patches/050-musl-glob-compat.patch>
> Am 17.11.2019 um 17:21 schrieb Winfried Peters <winfried.peters at gmail.com>:
>
> Hallo,
>
> ich möchte ein neues Installationspaket der aktuellen vzlogger-Version für Udo's YPORT+-OpenWrt-System erstellen. Dazu habe ich die OpenWrt-Umgebung mit den erforderlichen Paketen und Zielsystem eingerichtet. Der Compile bricht immer beim Stand von 7% beim Build von MeterW1therm.cpp.o ab. Hier der Logausschnitt:
> [ 6%] Building CXX object src/protocols/CMakeFiles/proto.dir/MeterRandom.cpp.o
> cd /home/romokerkid/openwrt/build_dir/target-mips_24kc_musl-1.1.16/vzlogger-master/src/protocols && /home/romokerkid/openwrt/staging_dir/toolchain-mips_24kc_gcc-5.4.0_musl-1.1.16/bin/mips-openwrt-linux-musl-g++ -DHAVE_CONFIG_HPP -DNDEBUG -I/home/romokerkid/openwrt/staging_dir/target-mips_24kc_musl-1.1.16/usr/include -I/home/romokerkid/openwrt/build_dir/target-mips_24kc_musl-1.1.16/vzlogger-master -I/home/romokerkid/openwrt/build_dir/target-mips_24kc_musl-1.1.16/vzlogger-master/include -W -Wall -Wextra -Werror -Wnon-virtual-dtor -Wno-system-headers -Winit-self -Wmissing-include-dirs -Wno-pragmas -Wredundant-decls -Wno-unused-parameter -std=c++11 -fpermissive -Wno-error=redundant-decls -Wno-ignored-qualifiers -O3 -Wno-unused-parameter -Wno-redundant-decls -g3 -o CMakeFiles/proto.dir/MeterRandom.cpp.o -c /home/romokerkid/openwrt/build_dir/target-mips_24kc_musl-1.1.16/vzlogger-master/src/protocols/MeterRandom.cpp
> [ 7%] Building CXX object src/protocols/CMakeFiles/proto.dir/MeterW1therm.cpp.o
> cd /home/romokerkid/openwrt/build_dir/target-mips_24kc_musl-1.1.16/vzlogger-master/src/protocols && /home/romokerkid/openwrt/staging_dir/toolchain-mips_24kc_gcc-5.4.0_musl-1.1.16/bin/mips-openwrt-linux-musl-g++ -DHAVE_CONFIG_HPP -DNDEBUG -I/home/romokerkid/openwrt/staging_dir/target-mips_24kc_musl-1.1.16/usr/include -I/home/romokerkid/openwrt/build_dir/target-mips_24kc_musl-1.1.16/vzlogger-master -I/home/romokerkid/openwrt/build_dir/target-mips_24kc_musl-1.1.16/vzlogger-master/include -W -Wall -Wextra -Werror -Wnon-virtual-dtor -Wno-system-headers -Winit-self -Wmissing-include-dirs -Wno-pragmas -Wredundant-decls -Wno-unused-parameter -std=c++11 -fpermissive -Wno-error=redundant-decls -Wno-ignored-qualifiers -O3 -Wno-unused-parameter -Wno-redundant-decls -g3 -o CMakeFiles/proto.dir/MeterW1therm.cpp.o -c /home/romokerkid/openwrt/build_dir/target-mips_24kc_musl-1.1.16/vzlogger-master/src/protocols/MeterW1therm.cpp
> /home/romokerkid/openwrt/build_dir/target-mips_24kc_musl-1.1.16/vzlogger-master/src/protocols/MeterW1therm.cpp: In member function 'virtual bool MeterW1therm::W1sysHWif::scanW1devices()':
> /home/romokerkid/openwrt/build_dir/target-mips_24kc_musl-1.1.16/vzlogger-master/src/protocols/MeterW1therm.cpp:35:58: error: 'GLOB_BRACE' was not declared in this scope
> if (0 == glob("/sys/bus/w1/devices/{10,22,28,3b,42}-*", GLOB_BRACE|GLOB_NOSORT, NULL, &glob_res) ) {
> ^
> src/protocols/CMakeFiles/proto.dir/build.make:209: recipe for target 'src/protocols/CMakeFiles/proto.dir/MeterW1therm.cpp.o' failed
> make[5]: *** [src/protocols/CMakeFiles/proto.dir/MeterW1therm.cpp.o] Error 1
> make[5]: Leaving directory '/home/romokerkid/openwrt/build_dir/target-mips_24kc_musl-1.1.16/vzlogger-master'
> CMakeFiles/Makefile2:1172: recipe for target 'src/protocols/CMakeFiles/proto.dir/all' failed
> make[4]: *** [src/protocols/CMakeFiles/proto.dir/all] Error 2
> make[4]: Leaving directory '/home/romokerkid/openwrt/build_dir/target-mips_24kc_musl-1.1.16/vzlogger-master'
> Makefile:163: recipe for target 'all' failed
> make[3]: *** [all] Error 2
> make[3]: Leaving directory '/home/romokerkid/openwrt/build_dir/target-mips_24kc_musl-1.1.16/vzlogger-master'
> Makefile:46: recipe for target '/home/romokerkid/openwrt/build_dir/target-mips_24kc_musl-1.1.16/vzlogger-master/.built' failed
> make[2]: *** [/home/romokerkid/openwrt/build_dir/target-mips_24kc_musl-1.1.16/vzlogger-master/.built] Error 2
> make[2]: Leaving directory '/home/romokerkid/openwrt/package/utils/vzlogger'
> package/Makefile:109: recipe for target 'package/utils/vzlogger/compile' failed
> make[1]: *** [package/utils/vzlogger/compile] Error 2
> make[1]: Leaving directory '/home/romokerkid/openwrt'
> /home/romokerkid/openwrt/include/toplevel.mk:205 <http://toplevel.mk:205/>: recipe for target 'package/vzlogger/compile' failed
> make: *** [package/vzlogger/compile] Error 2
>
> Hier mein Makefile dazu:
> ---------------------------------------------------------------------------------------------
> include $(TOPDIR)/rules.mk <http://rules.mk/>
> PKG_NAME:=vzlogger
> PKG_VERSION:=master
> PKG_RELEASE:=1
> PKG_REV:=master
> PKG_FIXUP:=autoreconf
> PKG_BUILD_DEPENDS:=libmosquitto libsml libmicrohttpd libjson libcurl libopenssl libstdcpp libgcrypt librt libsasl2
> #PKG_BUILD_DEPENDS:=sml microhttpd json curl openssl stdcpp gcrypt rt sasl2
> #PKG_BUILD_PARALLEL:=1
>
> PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
> PKG_SOURCE_URL:=git://github.com/volkszaehler/vzlogger.git <http://github.com/volkszaehler/vzlogger.git>
> PKG_SOURCE_VERSION:=$(PKG_REV)
> PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
> PKG_SOURCE_PROTO:=git
>
> CMAKE_INSTALL:=1
>
> include $(INCLUDE_DIR)/package.mk <http://package.mk/>
> include $(INCLUDE_DIR)/cmake.mk <http://cmake.mk/>
>
> define Package/vzlogger
> SECTION:=utils
> CATEGORY:=Utilities
> DEPENDS:=+libmosquitto +libsml +libmicrohttpd +libjson +libcurl +libopenssl +libstdcpp +libgcrypt +librt +libsasl2
> URL:=https://github.com/volkszaehler/vzlogger <https://github.com/volkszaehler/vzlogger>
> TITLE:=Logging utility for several meters & sensors
> endef
>
> define Package/vzlogger/description
> Logging utility for several meters & sensors
> endef
>
> define Build/InstallDev
> $(CP) $(PKG_INSTALL_DIR)/* $(1)/
> endef
>
> define Package/vzlogger/install
> $(INSTALL_DIR) $(1)/usr/bin
> $(CP) $(PKG_INSTALL_DIR)/usr/bin/vzlogger $(1)/usr/bin
> #$(INSTALL_DIR) $(1)/etc
> #$(CP) $(PKG_INSTALL_DIR)/etc/vzlogger.conf $(1)/etc
> endef
>
> $(eval $(call BuildPackage,vzlogger,+libmosquitto +libsml,+libmicrohttpd,+libjson,+libcurl,+libopenssl,+libstdcpp,+libgcrypt,+librt,+libsasl2))
> ---------------------------------------------------------------------------------------------
>
> Liegt die Ursache im MeterW1therm.cpp-Code oder an meiner Umgebung/Makefile-Konfiguration?
> Ich komme hier leider nicht mehr weiter. Ich bin dankbar für Vorschläge und Ideen.
>
> Viele Grüße
> Winfried
Gruß
Matthias
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://demo.volkszaehler.org/pipermail/volkszaehler-users/attachments/20191117/4f97af6d/attachment-0001.html>
More information about the volkszaehler-users
mailing list