openwrt / packages

Community maintained packages for OpenWrt. Documentation for submitting pull requests is in CONTRIBUTING.md
GNU General Public License v2.0
4.01k stars 3.48k forks source link

motion: build failure on bcm27xx/bcm2711 #17571

Open stintel opened 2 years ago

stintel commented 2 years ago

Maintainer: @roger- /cc @neheb Environment: OpenWrt master r18538-8cdc356f8c on bcm27xx/bcm2711 (rpi4)

Description: Motion doesn't build.

make[3]: Entering directory '/home/stijn/Development/OpenWrt/openwrt-packages/multimedia/motion'
rm -f /home/stijn/Development/OpenWrt/openwrt/build_dir/target-aarch64_cortex-a72_musl/motion-release-4.3.2/.configured_*
rm -f /home/stijn/Development/OpenWrt/openwrt/staging_dir/target-aarch64_cortex-a72_musl/stamp/.motion_installed
(cd /home/stijn/Development/OpenWrt/openwrt/build_dir/target-aarch64_cortex-a72_musl/motion-release-4.3.2; rm -f aclocal.m4; if [ -f ./configure.ac ] || [ -f ./configure.in ]; then [ -d ./autom4te.cache ] && rm -rf autom4te.cache; [ -e ./config.rpath ] || ln -s /home/stijn/Development/OpenWrt/openwrt/scripts/config.rpath ./config.rpath; touch NEWS AUTHORS COPYING ABOUT-NLS ChangeLog; AUTOM4TE=/home/stijn/Development/OpenWrt/openwrt/staging_dir/host/bin/autom4te AUTOCONF=/home/stijn/Development/OpenWrt/openwrt/staging_dir/host/bin/autoconf AUTOMAKE=/home/stijn/Development/OpenWrt/openwrt/staging_dir/host/bin/automake ACLOCAL=/home/stijn/Development/OpenWrt/openwrt/staging_dir/host/bin/aclocal AUTOHEADER=/home/stijn/Development/OpenWrt/openwrt/staging_dir/host/bin/autoheader LIBTOOLIZE=/home/stijn/Development/OpenWrt/openwrt/staging_dir/host/bin/libtoolize LIBTOOL=/home/stijn/Development/OpenWrt/openwrt/staging_dir/host/bin/libtool M4=/home/stijn/Development/OpenWrt/openwrt/staging_dir/host/bin/m4 AUTOPOINT=true LIBTOOLIZE='/home/stijn/Development/OpenWrt/openwrt/staging_dir/host/bin/libtoolize --install' /home/stijn/Development/OpenWrt/openwrt/staging_dir/host/bin/autoreconf -v -f -i -s -B /home/stijn/Development/OpenWrt/openwrt/staging_dir/host/share/aclocal -I /home/stijn/Development/OpenWrt/openwrt/staging_dir/target-aarch64_cortex-a72_musl/host/share/aclocal -I /home/stijn/Development/OpenWrt/openwrt/staging_dir/hostpkg/share/aclocal -I /home/stijn/Development/OpenWrt/openwrt/staging_dir/target-aarch64_cortex-a72_musl/usr/share/aclocal -I m4 -I . . || true; fi; );
autoreconf: Entering directory `.'
autoreconf: running: true --force
autoreconf: running: /home/stijn/Development/OpenWrt/openwrt/staging_dir/host/bin/aclocal -I /home/stijn/Development/OpenWrt/openwrt/staging_dir/target-aarch64_cortex-a72_musl/host/share/aclocal -I /home/stijn/Development/OpenWrt/openwrt/staging_dir/hostpkg/share/aclocal -I /home/stijn/Development/OpenWrt/openwrt/staging_dir/target-aarch64_cortex-a72_musl/usr/share/aclocal -I m4 -I . --force -I m4
configure.ac:12: warning: macro 'AM_GNU_GETTEXT' not found in library
configure.ac:13: warning: macro 'AM_GNU_GETTEXT_VERSION' not found in library
autoreconf: configure.ac: tracing
autoreconf: configure.ac: AM_GNU_GETTEXT_VERSION is used, but not AM_GNU_GETTEXT
autoreconf: configure.ac: not using Libtool
autoreconf: running: /home/stijn/Development/OpenWrt/openwrt/staging_dir/host/bin/autoconf --include=/home/stijn/Development/OpenWrt/openwrt/staging_dir/target-aarch64_cortex-a72_musl/host/share/aclocal --include=/home/stijn/Development/OpenWrt/openwrt/staging_dir/hostpkg/share/aclocal --include=/home/stijn/Development/OpenWrt/openwrt/staging_dir/target-aarch64_cortex-a72_musl/usr/share/aclocal --include=m4 --include=. --prepend-include=/home/stijn/Development/OpenWrt/openwrt/staging_dir/host/share/aclocal --force
configure.ac:12: error: possibly undefined macro: AM_GNU_GETTEXT
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.
configure.ac:13: error: possibly undefined macro: AM_GNU_GETTEXT_VERSION
autoreconf: /home/stijn/Development/OpenWrt/openwrt/staging_dir/host/bin/autoconf failed with exit status: 1
(cd /home/stijn/Development/OpenWrt/openwrt/build_dir/target-aarch64_cortex-a72_musl/motion-release-4.3.2/./; if [ -x ./configure ]; then find /home/stijn/Development/OpenWrt/openwrt/build_dir/target-aarch64_cortex-a72_musl/motion-release-4.3.2/ -name config.guess | xargs -r chmod u+w; find /home/stijn/Development/OpenWrt/openwrt/build_dir/target-aarch64_cortex-a72_musl/motion-release-4.3.2/ -name config.guess | xargs -r -n1 cp --remove-destination /home/stijn/Development/OpenWrt/openwrt/scripts/config.guess; find /home/stijn/Development/OpenWrt/openwrt/build_dir/target-aarch64_cortex-a72_musl/motion-release-4.3.2/ -name config.sub | xargs -r chmod u+w; find /home/stijn/Development/OpenWrt/openwrt/build_dir/target-aarch64_cortex-a72_musl/motion-release-4.3.2/ -name config.sub | xargs -r -n1 cp --remove-destination /home/stijn/Development/OpenWrt/openwrt/scripts/config.sub; AR="aarch64-openwrt-linux-musl-gcc-ar" AS="aarch64-openwrt-linux-musl-gcc -c -Os -pipe -g3 -fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -fmacro-prefix-map=/home/stijn/Development/OpenWrt/openwrt/build_dir/target-aarch64_cortex-a72_musl/motion-release-4.3.2=motion-release-4.3.2 -Wformat -Werror=format-security -DPIC -fPIC -fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wl,-z,now -Wl,-z,relro -I/home/stijn/Development/OpenWrt/openwrt/staging_dir/target-aarch64_cortex-a72_musl/usr/lib/libiconv-stub/include -I/home/stijn/Development/OpenWrt/openwrt/staging_dir/target-aarch64_cortex-a72_musl/usr/lib/libintl-stub/include" LD=aarch64-openwrt-linux-musl-ld NM="aarch64-openwrt-linux-musl-gcc-nm" CC="aarch64-openwrt-linux-musl-gcc" GCC="aarch64-openwrt-linux-musl-gcc" CXX="aarch64-openwrt-linux-musl-g++" RANLIB="aarch64-openwrt-linux-musl-gcc-ranlib" STRIP=aarch64-openwrt-linux-musl-strip OBJCOPY=aarch64-openwrt-linux-musl-objcopy OBJDUMP=aarch64-openwrt-linux-musl-objdump SIZE=aarch64-openwrt-linux-musl-size CFLAGS="-Os -pipe -g3 -fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -fmacro-prefix-map=/home/stijn/Development/OpenWrt/openwrt/build_dir/target-aarch64_cortex-a72_musl/motion-release-4.3.2=motion-release-4.3.2 -Wformat -Werror=format-security -DPIC -fPIC -fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wl,-z,now -Wl,-z,relro -I/home/stijn/Development/OpenWrt/openwrt/staging_dir/target-aarch64_cortex-a72_musl/usr/lib/libiconv-stub/include -I/home/stijn/Development/OpenWrt/openwrt/staging_dir/target-aarch64_cortex-a72_musl/usr/lib/libintl-stub/include " CXXFLAGS="-Os -pipe -g3 -fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -fmacro-prefix-map=/home/stijn/Development/OpenWrt/openwrt/build_dir/target-aarch64_cortex-a72_musl/motion-release-4.3.2=motion-release-4.3.2 -Wformat -Werror=format-security -DPIC -fPIC -fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wl,-z,now -Wl,-z,relro -I/home/stijn/Development/OpenWrt/openwrt/staging_dir/target-aarch64_cortex-a72_musl/usr/lib/libiconv-stub/include -I/home/stijn/Development/OpenWrt/openwrt/staging_dir/target-aarch64_cortex-a72_musl/usr/lib/libintl-stub/include " CPPFLAGS="-I/home/stijn/Development/OpenWrt/openwrt/staging_dir/toolchain-aarch64_cortex-a72_gcc-11.2.0_musl/usr/include -I/home/stijn/Development/OpenWrt/openwrt/staging_dir/toolchain-aarch64_cortex-a72_gcc-11.2.0_musl/include/fortify -I/home/stijn/Development/OpenWrt/openwrt/staging_dir/toolchain-aarch64_cortex-a72_gcc-11.2.0_musl/include -I/home/stijn/Development/OpenWrt/openwrt/staging_dir/target-aarch64_cortex-a72_musl/usr/lib/libiconv-stub/include -I/home/stijn/Development/OpenWrt/openwrt/staging_dir/target-aarch64_cortex-a72_musl/usr/lib/libintl-stub/include " LDFLAGS="-L/home/stijn/Development/OpenWrt/openwrt/staging_dir/toolchain-aarch64_cortex-a72_gcc-11.2.0_musl/usr/lib -L/home/stijn/Development/OpenWrt/openwrt/staging_dir/toolchain-aarch64_cortex-a72_gcc-11.2.0_musl/lib -DPIC -fPIC -specs=/home/stijn/Development/OpenWrt/openwrt/include/hardened-ld-pie.specs -znow -zrelro -L/home/stijn/Development/OpenWrt/openwrt/staging_dir/target-aarch64_cortex-a72_musl/usr/lib/libiconv-stub/lib -Wl,-rpath-link=/home/stijn/Development/OpenWrt/openwrt/staging_dir/target-aarch64_cortex-a72_musl/usr/lib/libiconv-stub/lib -L/home/stijn/Development/OpenWrt/openwrt/staging_dir/target-aarch64_cortex-a72_musl/usr/lib/libintl-stub/lib -Wl,-rpath-link=/home/stijn/Development/OpenWrt/openwrt/staging_dir/target-aarch64_cortex-a72_musl/usr/lib/libintl-stub/lib "   ./configure --target=aarch64-openwrt-linux --host=aarch64-openwrt-linux --build=x86_64-pc-linux-gnu --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  --without-bktr --without-webp --without-mmal --without-ffmpeg --without-mariadb --without-mysql --without-pgsql --without-sqlite3 --without-optimizecpu ; fi; )
configure: WARNING: unrecognized options: --disable-nls
configure: loading site script /home/stijn/Development/OpenWrt/openwrt/include/site/aarch64
configure: error: cannot find install-sh, install.sh, or shtool in "." "./.." "./../.."
make[3]: *** [Makefile:68: /home/stijn/Development/OpenWrt/openwrt/build_dir/target-aarch64_cortex-a72_musl/motion-release-4.3.2/.configured_a17fb5ef857664f03cd0ce37cc5ea591] Error 1
make[3]: Leaving directory '/home/stijn/Development/OpenWrt/openwrt-packages/multimedia/motion'
time: package/feeds/packages/motion/compile#2.50#0.58#4.00
NightBlues commented 2 years ago

I've run into the same trouble. After a small investigation I've found that the real problem here is that autoreconf can not generate proper configure script because of missing gettext, motion's Makefile has include for nls.mk and adds +BUILD_NLS:libintl-full into dependencies list, docs for BUILD_NLS symbols says that it enables gettext support instead of the default OpenWrt stubs. Not sure how these stubs should work and where they are, but it seems it doesn't work for motion:(

TLDR: to fix it - go to make menuconfig -> Global build settings and enable Compile with full language support