From 76e64a175aef5cfbdf24bd457f3568b4ba159b6f Mon Sep 17 00:00:00 2001 From: Frank Hunleth Date: Mon, 2 Aug 2021 09:52:03 -0400 Subject: [PATCH 01/44] package/erlang: risc-v should only add risc-v This restricts the Erlang RISC-V update from 0bab8c1089983a4b5f0f2acfe5cad77b02d6f654 to only enabling RISCV_64 rather than enabling builds on all platforms with toolchains that include atomics. This fixes build errors on SPARCv8 and other platforms that look like this: /tmp/ccD9Q9F7.s: Assembler messages: /tmp/ccD9Q9F7.s:230: Error: Architecture mismatch on "cas [%g3],%g2,%g1". /tmp/ccD9Q9F7.s:230: (Requires v9|v9a|v9b|v9c|v9d|v9e|v9v|v9m|m8; requested architecture is v8.) Fixes: http://autobuild.buildroot.net/results/a57/a5779e22c41eb63b8400409f26f96b924fdde1bc/ Signed-off-by: Frank Hunleth Signed-off-by: Arnout Vandecappelle (Essensium/Mind) --- package/erlang/Config.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/erlang/Config.in b/package/erlang/Config.in index b6b100f38b..15931b5896 100644 --- a/package/erlang/Config.in +++ b/package/erlang/Config.in @@ -10,7 +10,7 @@ config BR2_PACKAGE_ERLANG_ARCH_SUPPORTS # __atomic_* builtins default y if BR2_i386 || BR2_x86_64 || BR2_powerpc || \ BR2_sparc_v9 || BR2_arm || BR2_aarch64 || BR2_mipsel || \ - BR2_TOOLCHAIN_HAS_ATOMIC + BR2_RISCV_64 # erlang needs host-erlang depends on BR2_PACKAGE_HOST_ERLANG_ARCH_SUPPORTS From a484c19721f2591b41062b87356a3c7ff1c969e2 Mon Sep 17 00:00:00 2001 From: Fabrice Fontaine Date: Mon, 2 Aug 2021 22:44:00 +0200 Subject: [PATCH 02/44] package/openzwave: set back -fPIC Set back -fPIC in CFLAGS which was wrongly removed as a side effect of commit c5ca521e232eae31276e7a12d17f0cf9d9c0108f. Another side-effect of that commit was to remove -DSYSCONFDIR="\"$(PREFIX)/etc/openzwave/\"" - however, we don't need SYSCONFDIR to be set, since /etc/openzwave is checked first anyway (see cpp/src/Options.cpp). Fixes: - http://autobuild.buildroot.org/results/161f53574697016ab8bdb91aaaf4a2be5410ebb0 Signed-off-by: Fabrice Fontaine Signed-off-by: Arnout Vandecappelle (Essensium/Mind) --- package/openzwave/openzwave.mk | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package/openzwave/openzwave.mk b/package/openzwave/openzwave.mk index 9c28c0a13b..0f639635dd 100644 --- a/package/openzwave/openzwave.mk +++ b/package/openzwave/openzwave.mk @@ -23,7 +23,7 @@ OPENZWAVE_INSTALL_STAGING = YES # the correct directory otherwise openzwave will install configuration files in # $(PREFIX)/etc/openzwave. # Disable doxygen documentation. -# Set {DEBUG,RELEASE}_CFLAGS to an empty value to remove -Werror. +# Set {DEBUG,RELEASE}_CFLAGS to remove -Werror. OPENZWAVE_MAKE_OPTS = \ CROSS_COMPILE="$(TARGET_CROSS)" \ PREFIX=/usr \ @@ -31,8 +31,8 @@ OPENZWAVE_MAKE_OPTS = \ pkgconfigdir=/usr/lib/pkgconfig \ sysconfdir=/etc/openzwave \ DOXYGEN= \ - DEBUG_CFLAGS= \ - RELEASE_CFLAGS= \ + DEBUG_CFLAGS="-fPIC" \ + RELEASE_CFLAGS="-fPIC" \ USE_BI_TXML=0 ifeq ($(BR2_PACKAGE_HAS_UDEV),y) From 53b25aa393bfefc9487b814af0f55a8a4235c3df Mon Sep 17 00:00:00 2001 From: James Hilliard Date: Tue, 3 Aug 2021 02:45:03 -0600 Subject: [PATCH 03/44] package/pipewire: add libdrm dependency The libcamera option requires libdrm, require and depend on it when available for libcamera plugin. Fixes: - http://autobuild.buildroot.net/results/e3bc1d9aa69af1d2cdeee7709df318fccbaa5476 Signed-off-by: James Hilliard Signed-off-by: Arnout Vandecappelle (Essensium/Mind) --- package/pipewire/pipewire.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package/pipewire/pipewire.mk b/package/pipewire/pipewire.mk index b316d482d9..2317398088 100644 --- a/package/pipewire/pipewire.mk +++ b/package/pipewire/pipewire.mk @@ -95,9 +95,9 @@ else PIPEWIRE_CONF_OPTS += -Dv4l2=disabled endif -ifeq ($(BR2_PACKAGE_LIBCAMERA)$(BR2_PACKAGE_HAS_UDEV),yy) +ifeq ($(BR2_PACKAGE_LIBCAMERA)$(BR2_PACKAGE_LIBDRM)$(BR2_PACKAGE_HAS_UDEV),yyy) PIPEWIRE_CONF_OPTS += -Dlibcamera=enabled -PIPEWIRE_DEPENDENCIES += libcamera +PIPEWIRE_DEPENDENCIES += libcamera libdrm else PIPEWIRE_CONF_OPTS += -Dlibcamera=disabled endif From 922cd6f64c6923793f136b7cbe00e456575defd0 Mon Sep 17 00:00:00 2001 From: Fabrice Fontaine Date: Tue, 3 Aug 2021 14:07:14 +0200 Subject: [PATCH 04/44] package/gpsd: fix workaround for gcc bug 68485 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Workaround for gcc bug 68485 doesn't work anymore since bump to version 3.21 in commit 5b3e72139952e0c953c8649cca55571cec5f3836 because CXXFLAGS is appended after CFLAGS and does not contain -O0: /tmp/instance-7/output-1/host/bin/microblazeel-linux-gcc -o rtcm2_json.os -c --sysroot=/tmp/instance-7/output-1/host/microblazeel-buildroot-linux-uclibc/sysroot -pthread -Wall -Wcast-align -Wextra -Wimplicit-fallthrough -Wmissing-declarations -Wmissing-prototypes -Wno-missing-field-initializers -Wno-uninitialized -Wpointer-arith -Wreturn-type -Wstrict-prototypes -Wvla -O0 -Os -g0 -pthread -fPIC -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -I/tmp/instance-7/output-1/host/microblazeel-buildroot-linux-uclibc/sysroot/usr/include/dbus-1.0 -I/tmp/instance-7/output-1/host/microblazeel-buildroot-linux-uclibc/sysroot/usr/lib/dbus-1.0/include rtcm2_json.c during RTL pass: reload rtcm2_json.c: In function ‘json_rtcm2_read’: rtcm2_json.c:267:1: internal compiler error: in gen_reg_rtx, at emit-rtl.c:1155 267 | } | ^ It should be noted that GPSD_CXXFLAGS was added 5 years ago with commit b4c050e9afed7a8dc302e6e1014cc4ffb508590d but was not actually used in that commit or any later. Fixes: - http://autobuild.buildroot.org/results/fab33f25b08fa218af91640fdbd8c0dcf1d07228 Signed-off-by: Fabrice Fontaine Reviewed-by: Giulio Benetti Signed-off-by: Arnout Vandecappelle (Essensium/Mind) --- package/gpsd/gpsd.mk | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/package/gpsd/gpsd.mk b/package/gpsd/gpsd.mk index 0fbb5dfa1d..45f6d35ef8 100644 --- a/package/gpsd/gpsd.mk +++ b/package/gpsd/gpsd.mk @@ -16,6 +16,7 @@ GPSD_DEPENDENCIES = host-python3 host-scons host-pkgconf GPSD_LDFLAGS = $(TARGET_LDFLAGS) GPSD_CFLAGS = $(TARGET_CFLAGS) +GPSD_CXXFLAGS = $(TARGET_CXXFLAGS) GPSD_SCONS_ENV = $(TARGET_CONFIGURE_OPTS) @@ -46,6 +47,7 @@ endif ifeq ($(BR2_TOOLCHAIN_HAS_GCC_BUG_68485),y) GPSD_CFLAGS += -O0 +GPSD_CXXFLAGS += -O0 endif # If libusb is available build it before so the package can use it @@ -203,7 +205,8 @@ endif GPSD_SCONS_ENV += \ LDFLAGS="$(GPSD_LDFLAGS)" \ CFLAGS="$(GPSD_CFLAGS)" \ - CCFLAGS="$(GPSD_CFLAGS)" + CCFLAGS="$(GPSD_CFLAGS)" \ + CXXFLAGS="$(GPSD_CXXFLAGS)" define GPSD_BUILD_CMDS (cd $(@D); \ From 0344be5299259c9f3e2e928b51af6868948e78bc Mon Sep 17 00:00:00 2001 From: Fabrice Fontaine Date: Tue, 3 Aug 2021 10:26:01 +0200 Subject: [PATCH 05/44] package/wireshark: link with -latomic if needed Fix the following build failure raised since bump to version 3.4.7 in commit bb75c4b541fac144b53b63248e235f22ba1d25ad: /tmp/instance-5/output-1/host/opt/ext-toolchain/bin/../lib/gcc/sparc-buildroot-linux-uclibc/9.3.0/../../../../sparc-buildroot-linux-uclibc/bin/ld: ui/qt/CMakeFiles/qtui.dir/sequence_diagram.cpp.o: undefined reference to symbol '__atomic_compare_exchange_4@@LIBATOMIC_1.0' /tmp/instance-5/output-1/host/opt/ext-toolchain/bin/../lib/gcc/sparc-buildroot-linux-uclibc/9.3.0/../../../../sparc-buildroot-linux-uclibc/bin/ld: /tmp/instance-5/output-1/host/sparc-buildroot-linux-uclibc/sysroot/lib/libatomic.so.1: error adding symbols: DSO missing from command line Fixes: - http://autobuild.buildroot.org/results/6617ee0e0046a0452a1515b89e9c704b1c125ec4 Signed-off-by: Fabrice Fontaine Signed-off-by: Arnout Vandecappelle (Essensium/Mind) --- package/wireshark/wireshark.mk | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/package/wireshark/wireshark.mk b/package/wireshark/wireshark.mk index e852083de6..6ee4b20391 100644 --- a/package/wireshark/wireshark.mk +++ b/package/wireshark/wireshark.mk @@ -43,6 +43,10 @@ endef WIRESHARK_PRE_BUILD_HOOKS += WIRESHARK_BUILD_LEMON_TOOL +ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y) +WIRESHARK_CONF_OPTS += -DCMAKE_EXE_LINKER_FLAGS=-latomic +endif + ifeq ($(BR2_GCC_ENABLE_LTO),y) WIRESHARK_CONF_OPTS += -DENABLE_LTO=ON else From 0aea8427108bef1610cfd4dcf6241959b207adaa Mon Sep 17 00:00:00 2001 From: Michael Nosthoff Date: Tue, 3 Aug 2021 14:33:27 +0200 Subject: [PATCH 06/44] package/bluez5_utils: hid2hci needs tools Fixes: http://autobuild.buildroot.net/results/9f91d530c22cad053d89a7bf54c4567d3012d05e http://autobuild.buildroot.net/results/80b90e1b6fee99ed7bf4aed87a14311a12469993 http://autobuild.buildroot.net/results/444eaab22b140b26a730c7fdd4bada71a8d6fef2 Signed-off-by: Michael Nosthoff Signed-off-by: Arnout Vandecappelle (Essensium/Mind) --- package/bluez5_utils/Config.in | 1 + 1 file changed, 1 insertion(+) diff --git a/package/bluez5_utils/Config.in b/package/bluez5_utils/Config.in index a8232279bd..2eea8c7ced 100644 --- a/package/bluez5_utils/Config.in +++ b/package/bluez5_utils/Config.in @@ -143,6 +143,7 @@ config BR2_PACKAGE_BLUEZ5_UTILS_TOOLS_HID2HCI bool "build hid2hci tool" depends on BR2_PACKAGE_HAS_UDEV select BR2_PACKAGE_BLUEZ5_UTILS_PLUGINS_HID # runtime + select BR2_PACKAGE_BLUEZ5_UTILS_TOOLS help Build hid2hci tool From f299fbd955344fe86e60a8dac6c9cb0fda22da6e Mon Sep 17 00:00:00 2001 From: Fabrice Fontaine Date: Tue, 3 Aug 2021 15:01:10 +0200 Subject: [PATCH 07/44] package/s390-tools: fix build with binutils 2.36 Fix the following build failure with binutils 2.36: /tmp/instance-16/output-1/host/bin/s390x-buildroot-linux-gnu-ld: Error: unable to disambiguate: -no-pie (did you mean --no-pie ?) make[3]: *** [Makefile:113: data.o] Error 1 Fixes: - http://autobuild.buildroot.org/results/90100519d696c49441669117276fb8084796544b Signed-off-by: Fabrice Fontaine Signed-off-by: Arnout Vandecappelle (Essensium/Mind) --- ...kefile-no-pie-is-not-a-valid-ld-flag.patch | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 package/s390-tools/0004-zipl-boot-Makefile-no-pie-is-not-a-valid-ld-flag.patch diff --git a/package/s390-tools/0004-zipl-boot-Makefile-no-pie-is-not-a-valid-ld-flag.patch b/package/s390-tools/0004-zipl-boot-Makefile-no-pie-is-not-a-valid-ld-flag.patch new file mode 100644 index 0000000000..fcdf06088a --- /dev/null +++ b/package/s390-tools/0004-zipl-boot-Makefile-no-pie-is-not-a-valid-ld-flag.patch @@ -0,0 +1,29 @@ +From 9fd3c733c645be13a2e39a3bae3983f88530b48d Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Lukas=20M=C3=A4rdian?= +Date: Thu, 7 Jan 2021 12:46:22 +0100 +Subject: [PATCH] zipl/boot/Makefile: -no-pie is not a valid ld flag + +The "-no-pie" option never has been a valid flag of ld. It breaks the build with newer binutils. +See: +https://sourceware.org/bugzilla/show_bug.cgi?id=27050 +https://bugs.launchpad.net/ubuntu/+source/s390-tools/+bug/1907789 + +[Retrieved from: https://github.com/ibm-s390-linux/s390-tools/pull/106] +Signed-off-by: Fabrice Fontaine +--- + zipl/boot/Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/zipl/boot/Makefile b/zipl/boot/Makefile +index a2e5f190..b81df778 100644 +--- a/zipl/boot/Makefile ++++ b/zipl/boot/Makefile +@@ -109,7 +109,7 @@ stage3.bin: stage3.exec + $< $@ + + data.o: $(FILES) +- $(LD) $(NO_PIE_LDFLAGS) -r -b binary -o data.o $(FILES) ++ $(LD) -r -b binary -o data.o $(FILES) + + data.h: data.o + rm -f data.h From b62a72a7a75450417596588557cdd5bcb7787cb7 Mon Sep 17 00:00:00 2001 From: Fabrice Fontaine Date: Tue, 3 Aug 2021 15:46:33 +0200 Subject: [PATCH 08/44] package/libodb-pqsql: fix build with gcc 11 GCC 11 defaults to C++17. Fix the following build failure with gcc 11: configure:13698: checking for libodb configure:13772: /tmp/instance-1/output-1/host/bin/arm-buildroot-linux-gnueabihf-g++ -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=2 -D_REENTRANT -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.cpp >&5 In file included from /tmp/instance-1/output-1/host/arm-buildroot-linux-gnueabihf/sysroot/usr/include/odb/exception.hxx:15, from conftest.cpp:26: /tmp/instance-1/output-1/host/arm-buildroot-linux-gnueabihf/sysroot/usr/include/odb/details/shared-ptr/base.hxx:38:49: error: ISO C++17 does not allow dynamic exception specifications 38 | operator new (std::size_t, odb::details::share) throw (std::bad_alloc); | ^~~~~ Fixes: - http://autobuild.buildroot.org/results/73b06d7f923e5a7294377951f212b89b6cb0946a Signed-off-by: Fabrice Fontaine Signed-off-by: Arnout Vandecappelle (Essensium/Mind) --- package/libodb-pgsql/libodb-pgsql.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/package/libodb-pgsql/libodb-pgsql.mk b/package/libodb-pgsql/libodb-pgsql.mk index 038f7878c0..014116883f 100644 --- a/package/libodb-pgsql/libodb-pgsql.mk +++ b/package/libodb-pgsql/libodb-pgsql.mk @@ -12,5 +12,6 @@ LIBODB_PGSQL_LICENSE = GPL-2.0 LIBODB_PGSQL_LICENSE_FILES = LICENSE LIBODB_PGSQL_INSTALL_STAGING = YES LIBODB_PGSQL_DEPENDENCIES = postgresql libodb +LIBODB_PGSQL_CONF_ENV = CXXFLAGS="$(TARGET_CXXFLAGS) -std=c++11" $(eval $(autotools-package)) From 25d602a6a66bfecf17da0ca5edf589ace95e58db Mon Sep 17 00:00:00 2001 From: Fabrice Fontaine Date: Tue, 3 Aug 2021 15:54:47 +0200 Subject: [PATCH 09/44] package/libodb-boost: fix build with gcc 11 Fixes: - No autobuilder failures yet Signed-off-by: Fabrice Fontaine Signed-off-by: Arnout Vandecappelle (Essensium/Mind) --- package/libodb-boost/libodb-boost.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/package/libodb-boost/libodb-boost.mk b/package/libodb-boost/libodb-boost.mk index 679c9d7a38..bac5f1e78f 100644 --- a/package/libodb-boost/libodb-boost.mk +++ b/package/libodb-boost/libodb-boost.mk @@ -12,5 +12,6 @@ LIBODB_BOOST_INSTALL_STAGING = YES LIBODB_BOOST_LICENSE = GPL-2.0 LIBODB_BOOST_LICENSE_FILES = LICENSE LIBODB_BOOST_DEPENDENCIES = boost libodb +LIBODB_BOOST_CONF_ENV = CXXFLAGS="$(TARGET_CXXFLAGS) -std=c++11" $(eval $(autotools-package)) From 8dfd7a1f903d86584e7942ead1ad79e0185a3391 Mon Sep 17 00:00:00 2001 From: Fabrice Fontaine Date: Thu, 1 Jul 2021 21:29:59 +0200 Subject: [PATCH 10/44] package/zstd: fix dynamic build without threads Dynamic build without threads is broken since bump to version 1.5.0 in commit aad8bbf58842dd62a4911d2c671ad9598e26b459 Indeed, dynamic library is built with threads support since https://github.com/facebook/zstd/commit/91465e23b2710de031a762874cafb417f8b7556e To fix this build failure, add -nomt if needed however libzstd-nomt is a "special target that builds a library in single-thread mode _and_ without zstdmt_compress.c". For an unknown reason, this target fails to build and don't create any symlinks so replace libzstd-{mt,nomt} by lib-{mt,nomt} even if this will have the side effect of building a shared and a static version of the library. Move the existing HAVE_THREAD setting in the same condition. While at it, also replace "libzstd.a libzstd" by "lib" Fixes: - http://autobuild.buildroot.org/results/e609601a0fc91c44d88a12c35b29ce937381462f Signed-off-by: Fabrice Fontaine [Arnout: move HAVE_THREAD in the same condition] Signed-off-by: Arnout Vandecappelle (Essensium/Mind) --- package/zstd/zstd.mk | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/package/zstd/zstd.mk b/package/zstd/zstd.mk index 2a876376a2..a0976b0701 100644 --- a/package/zstd/zstd.mk +++ b/package/zstd/zstd.mk @@ -12,12 +12,6 @@ ZSTD_LICENSE_FILES = LICENSE COPYING ZSTD_CPE_ID_VENDOR = facebook ZSTD_CPE_ID_PRODUCT = zstandard -ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),y) -ZSTD_OPTS += HAVE_THREAD=1 -else -ZSTD_OPTS += HAVE_THREAD=0 -endif - ifeq ($(BR2_PACKAGE_ZLIB),y) ZSTD_DEPENDENCIES += zlib ZSTD_OPTS += HAVE_ZLIB=1 @@ -43,19 +37,24 @@ ifeq ($(BR2_STATIC_LIBS),y) ZSTD_BUILD_LIBS = libzstd.a ZSTD_INSTALL_LIBS = install-static else ifeq ($(BR2_SHARED_LIBS),y) -ZSTD_BUILD_LIBS = libzstd +ZSTD_BUILD_LIBS = lib ZSTD_INSTALL_LIBS = install-shared else -ZSTD_BUILD_LIBS = libzstd.a libzstd +ZSTD_BUILD_LIBS = lib ZSTD_INSTALL_LIBS = install-static install-shared endif # The HAVE_THREAD flag is read by the 'programs' makefile but not by the 'lib' -# one. Building a multi-threaded binary with a library (which defaults to -# single-threaded) gives a runtime error when compressing files. -# The 'lib' makefile provides specific '%-mt' targets for this purpose. +# one. Building a multi-threaded binary with a static library (which defaults +# to single-threaded) gives a runtime error when compressing files. +# The 'lib' makefile provides specific '%-mt' and '%-nomt' targets for this +# purpose. ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),y) +ZSTD_OPTS += HAVE_THREAD=1 ZSTD_BUILD_LIBS := $(addsuffix -mt,$(ZSTD_BUILD_LIBS)) +else +ZSTD_OPTS += HAVE_THREAD=0 +ZSTD_BUILD_LIBS := $(addsuffix -nomt,$(ZSTD_BUILD_LIBS)) endif define ZSTD_BUILD_CMDS From 8d56423d3d2308c620e61a952e36999c89e4d682 Mon Sep 17 00:00:00 2001 From: Norbert Lange Date: Thu, 17 Jun 2021 11:14:54 +0200 Subject: [PATCH 11/44] package/zstd: observe Buildroot optimisation flags Use Buildroot's setting for optimization, zstd's build system overrides CFLAGS (adds -O3), but MOREFLAGS can override again. Quick tests show that using -O2 (like buildroot) is actually a little faster than -O3 on x86_64 Atoms. Disable the legacy format, these are just needed for decompressing files created with pre-release version. Signed-off-by: Norbert Lange Signed-off-by: Arnout Vandecappelle (Essensium/Mind) --- package/zstd/zstd.mk | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/package/zstd/zstd.mk b/package/zstd/zstd.mk index a0976b0701..5a96c11309 100644 --- a/package/zstd/zstd.mk +++ b/package/zstd/zstd.mk @@ -12,6 +12,7 @@ ZSTD_LICENSE_FILES = LICENSE COPYING ZSTD_CPE_ID_VENDOR = facebook ZSTD_CPE_ID_PRODUCT = zstandard +ZSTD_OPTS += ZSTD_LEGACY_SUPPORT=0 ifeq ($(BR2_PACKAGE_ZLIB),y) ZSTD_DEPENDENCIES += zlib ZSTD_OPTS += HAVE_ZLIB=1 @@ -33,6 +34,9 @@ else ZSTD_OPTS += HAVE_LZ4=0 endif +# zstd will append -O3 after $(CFLAGS), use MOREFLAGS to override again +ZSTD_OPTS += MOREFLAGS="$(TARGET_OPTIMIZATION)" + ifeq ($(BR2_STATIC_LIBS),y) ZSTD_BUILD_LIBS = libzstd.a ZSTD_INSTALL_LIBS = install-static From f23129ee1e3ceb2cdbe751efed9faedbfae67d56 Mon Sep 17 00:00:00 2001 From: Fabrice Fontaine Date: Tue, 3 Aug 2021 18:44:42 +0200 Subject: [PATCH 12/44] package/sysdig: fix C++ comment Replace libjson by jsoncpp for C++ dependency which was wrongly added by commit 74fc60a267341879ca71f8eaa64a80f5b5aaf78b Signed-off-by: Fabrice Fontaine Signed-off-by: Yann E. MORIN --- package/sysdig/Config.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/sysdig/Config.in b/package/sysdig/Config.in index 7d3c570392..06d20c7f7b 100644 --- a/package/sysdig/Config.in +++ b/package/sysdig/Config.in @@ -1,7 +1,7 @@ config BR2_PACKAGE_SYSDIG bool "sysdig" depends on BR2_LINUX_KERNEL - depends on BR2_INSTALL_LIBSTDCPP # libjson + depends on BR2_INSTALL_LIBSTDCPP # jsoncpp depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 depends on BR2_TOOLCHAIN_HAS_THREADS # elfutils, jq depends on !BR2_STATIC_LIBS # elfutils From e17946b409c84afd15c7de47df2c8ad4dd648fae Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Mon, 2 Aug 2021 23:10:39 +0200 Subject: [PATCH 13/44] package/python3: add patch to fix highly parallel builds Highly parallel host-python3 builds sometimes fail with: Exception in thread Thread-1: Traceback (most recent call last): File "/tmp/instance-3/output-1/host/lib/python3.9/threading.py", line 973, in _bootstrap_inner self.run() File "/tmp/instance-3/output-1/host/lib/python3.9/concurrent/futures/process.py", line 317, in run result_item, is_broken, cause = self.wait_result_broken_or_wakeup() File "/tmp/instance-3/output-1/host/lib/python3.9/concurrent/futures/process.py", line 376, in wait_result_broken_or_wakeup worker_sentinels = [p.sentinel for p in self.processes.values()] File "/tmp/instance-3/output-1/host/lib/python3.9/concurrent/futures/process.py", line 376, in worker_sentinels = [p.sentinel for p in self.processes.values()] RuntimeError: dictionary changed size during iteration During the compile_all.py step of host-python3. This issue is reported upstream at https://bugs.python.org/issue43498, and while not yet fixed upstream, a PR was proposed with a possible fix for it. Seems the PR seems reasonable, let's give it a chance and see if it improves the situation. Hopefully Fixes: http://autobuild.buildroot.net/results/ae6c4ab292589a4e4442dfb0a1286349a9bf4d29/ Signed-off-by: Thomas Petazzoni Signed-off-by: Yann E. MORIN --- ...teration-error-in-_ExecutorManagerTh.patch | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 package/python3/0036-Fix-dictionary-iteration-error-in-_ExecutorManagerTh.patch diff --git a/package/python3/0036-Fix-dictionary-iteration-error-in-_ExecutorManagerTh.patch b/package/python3/0036-Fix-dictionary-iteration-error-in-_ExecutorManagerTh.patch new file mode 100644 index 0000000000..fbe44c7753 --- /dev/null +++ b/package/python3/0036-Fix-dictionary-iteration-error-in-_ExecutorManagerTh.patch @@ -0,0 +1,29 @@ +From 331966be70c371b268a4fcce9e97280cd869f137 Mon Sep 17 00:00:00 2001 +From: Jakub Kulik +Date: Mon, 15 Mar 2021 08:49:28 +0100 +Subject: [PATCH] Fix dictionary iteration error in _ExecutorManagerThread + +[Thomas: Taken from upstream pull request +https://github.com/python/cpython/pull/24868, which is aimed at fixing +https://bugs.python.org/issue43498] +Signed-off-by: Thomas Petazzoni +--- + Lib/concurrent/futures/process.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Lib/concurrent/futures/process.py b/Lib/concurrent/futures/process.py +index 90bc98bf2ec..e3b36dff572 100644 +--- a/Lib/concurrent/futures/process.py ++++ b/Lib/concurrent/futures/process.py +@@ -373,7 +373,7 @@ class _ExecutorManagerThread(threading.Thread): + assert not self.thread_wakeup._closed + wakeup_reader = self.thread_wakeup._reader + readers = [result_reader, wakeup_reader] +- worker_sentinels = [p.sentinel for p in self.processes.values()] ++ worker_sentinels = [p.sentinel for p in self.processes.copy().values()] + ready = mp.connection.wait(readers + worker_sentinels) + + cause = None +-- +2.31.1 + From 506bace2fe1f1236b9888f4cc7bd32d1c81760f0 Mon Sep 17 00:00:00 2001 From: Fabrice Fontaine Date: Tue, 3 Aug 2021 15:50:41 +0200 Subject: [PATCH 14/44] package/libodb-mysql: fix build with gcc 11 Fixes: http://autobuild.buildroot.net/results/8f0/8f0e3b604ff9809e3b415036b8d99521db33c4db http://autobuild.buildroot.net/results/d03/d038b79e719c37a93d635c6b61443033094d8716 Signed-off-by: Fabrice Fontaine Signed-off-by: Arnout Vandecappelle (Essensium/Mind) --- package/libodb-mysql/libodb-mysql.mk | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/package/libodb-mysql/libodb-mysql.mk b/package/libodb-mysql/libodb-mysql.mk index a9040c65f8..88b6f4cb31 100644 --- a/package/libodb-mysql/libodb-mysql.mk +++ b/package/libodb-mysql/libodb-mysql.mk @@ -12,6 +12,8 @@ LIBODB_MYSQL_INSTALL_STAGING = YES LIBODB_MYSQL_LICENSE = GPL-2.0 LIBODB_MYSQL_LICENSE_FILES = LICENSE LIBODB_MYSQL_DEPENDENCIES = libodb mysql -LIBODB_MYSQL_CONF_ENV = LIBS=`$(STAGING_DIR)/usr/bin/mysql_config --libs` +LIBODB_MYSQL_CONF_ENV = \ + CXXFLAGS="$(TARGET_CXXFLAGS) -std=c++11" \ + LIBS=`$(STAGING_DIR)/usr/bin/mysql_config --libs` $(eval $(autotools-package)) From 03889590606e4a5aa3adf990e5b31c82c49ccf12 Mon Sep 17 00:00:00 2001 From: Fabrice Fontaine Date: Wed, 4 Aug 2021 22:23:54 +0200 Subject: [PATCH 15/44] package/libuhttpd: fix build with wolfssl Fix the following build failure with wolfssl raised since bump to version 3.12.1 in commit 4d85defa7103aadc74223868fb83ed0bed144f4d: /tmp/instance-4/output-1/build/libuhttpd-3.12.1/src/ssl/openssl.c: In function 'ssl_context_new': /tmp/instance-4/output-1/build/libuhttpd-3.12.1/src/ssl/openssl.c:174:33: error: 'tls13_ciphersuites' undeclared (first use in this function) 174 | SSL_CTX_set_ciphersuites(c, tls13_ciphersuites); | ^~~~~~~~~~~~~~~~~~ Fixes: - http://autobuild.buildroot.org/results/25db1e999950bbee069ba7364a228184a6a77808 Note: we have a reference to a pull request on the 'ssl' repository, because it is a git submodule of libuhttpd. Signed-off-by: Fabrice Fontaine [yann.morin.1998@free.fr: explain the reference to ssl/pull/1] Signed-off-by: Yann E. MORIN --- ...001-openssl.c-fix-build-with-wolfssl.patch | 47 +++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 package/libuhttpd/0001-openssl.c-fix-build-with-wolfssl.patch diff --git a/package/libuhttpd/0001-openssl.c-fix-build-with-wolfssl.patch b/package/libuhttpd/0001-openssl.c-fix-build-with-wolfssl.patch new file mode 100644 index 0000000000..deb1a0f93b --- /dev/null +++ b/package/libuhttpd/0001-openssl.c-fix-build-with-wolfssl.patch @@ -0,0 +1,47 @@ +From e5c5ed1c64cfc715729c9bfbfdcc4be225f344ff Mon Sep 17 00:00:00 2001 +From: Fabrice Fontaine +Date: Wed, 4 Aug 2021 11:32:39 +0200 +Subject: [PATCH] openssl.c: fix build with wolfssl + +Fix the following build failure with wolfssl: + +/tmp/instance-4/output-1/build/libuhttpd-3.12.1/src/ssl/openssl.c: In function 'ssl_context_new': +/tmp/instance-4/output-1/build/libuhttpd-3.12.1/src/ssl/openssl.c:174:33: error: 'tls13_ciphersuites' undeclared (first use in this function) + 174 | SSL_CTX_set_ciphersuites(c, tls13_ciphersuites); + | ^~~~~~~~~~~~~~~~~~ + +Fixes: + - http://autobuild.buildroot.org/results/d0fb629b40b05ad828775894fabed878692bb222 + +Signed-off-by: Fabrice Fontaine +[Upstream status: https://github.com/zhaojh329/ssl/pull/1] +--- + openssl.c | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/openssl.c b/openssl.c +index 8f3d8b7..c42638c 100644 +--- a/src/ssl/openssl.c ++++ b/src/ssl/openssl.c +@@ -71,14 +71,14 @@ + "TLS13-AES256-GCM-SHA384:" \ + ecdhe_aead_ciphers + #else +-# define tls13_ciphersuites "TLS_CHACHA20_POLY1305_SHA256:" \ +- "TLS_AES_128_GCM_SHA256:" \ +- "TLS_AES_256_GCM_SHA384" +- + # define top_ciphers \ + ecdhe_aead_ciphers + #endif + ++# define tls13_ciphersuites "TLS_CHACHA20_POLY1305_SHA256:" \ ++ "TLS_AES_128_GCM_SHA256:" \ ++ "TLS_AES_256_GCM_SHA384" ++ + #define ecdhe_aead_ciphers \ + "ECDHE-ECDSA-CHACHA20-POLY1305:" \ + "ECDHE-ECDSA-AES128-GCM-SHA256:" \ +-- +2.30.2 + From 5227649cb63fb26d62ef17d78a6df69eab9bef18 Mon Sep 17 00:00:00 2001 From: Fabrice Fontaine Date: Tue, 3 Aug 2021 16:23:47 +0200 Subject: [PATCH 16/44] package/azure-iot-sdk-c: fix build with gcc 11 Fix the following build failure with gcc 11: /tmp/instance-7/output-1/build/azure-iot-sdk-c-LTS_01_2021_Ref01/c-utility/src/hmac.c:211:43: error: argument 2 of type 'uint8_t *' {aka 'unsigned char *'} declared as a pointer [-Werror=array-parameter=] 211 | int hmacResult(HMACContext *ctx, uint8_t *digest) | ~~~~~~~~~^~~~~~ In file included from /tmp/instance-7/output-1/build/azure-iot-sdk-c-LTS_01_2021_Ref01/c-utility/src/hmac.c:13: /tmp/instance-7/output-1/build/azure-iot-sdk-c-LTS_01_2021_Ref01/c-utility/inc/azure_c_shared_utility/sha.h:252:42: note: previously declared as an array 'uint8_t[64]' {aka 'unsigned char[64]'} 252 | int hmacResult(HMACContext *ctx, uint8_t digest[USHAMaxHashSize]); | ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~ Fixes: - http://autobuild.buildroot.org/results/11a6eebd0deea679683a93a5c8355d00acdfe51e Signed-off-by: Fabrice Fontaine Signed-off-by: Arnout Vandecappelle (Essensium/Mind) --- ...c-fix-mismatching-function-prototype.patch | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 package/azure-iot-sdk-c/0001-hmac-c-fix-mismatching-function-prototype.patch diff --git a/package/azure-iot-sdk-c/0001-hmac-c-fix-mismatching-function-prototype.patch b/package/azure-iot-sdk-c/0001-hmac-c-fix-mismatching-function-prototype.patch new file mode 100644 index 0000000000..0c262e6c46 --- /dev/null +++ b/package/azure-iot-sdk-c/0001-hmac-c-fix-mismatching-function-prototype.patch @@ -0,0 +1,35 @@ +From 3a7997af72e7a4f70109d1639e6725b39046443e Mon Sep 17 00:00:00 2001 +From: Francesco Giancane <30423178+fgiancane8@users.noreply.github.com> +Date: Fri, 2 Jul 2021 20:47:38 +0200 +Subject: [PATCH] hmac.c: fix mismatching function prototype (#537) + +The reported function raises a warning when compilers assert the flag +`-Warray-parameter=`, signaling that an array-type argument was promoted +to a pointer-type argument. + +While in practice in most C implementations this is correct, fixing the +warning (and, in this case, indicating the maximum size for the array) +would represent a best-practice for finding out-of-bound accesses or +identifying wrongly-sized arrays passed in the function. + +Signed-off-by: Francesco Giancane +[Retrieved from: +https://github.com/Azure/azure-c-shared-utility/commit/3a7997af72e7a4f70109d1639e6725b39046443e] +Signed-off-by: Fabrice Fontaine +--- + src/hmac.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/hmac.c b/src/hmac.c +index 53f2411f8..160af9d2f 100644 +--- a/c-utility/src/hmac.c ++++ b/c-utility/src/hmac.c +@@ -208,7 +208,7 @@ int hmacFinalBits(HMACContext *ctx, + * sha Error Code. + * + */ +-int hmacResult(HMACContext *ctx, uint8_t *digest) ++int hmacResult(HMACContext *ctx, uint8_t digest[USHAMaxHashSize]) + { + if (!ctx) return shaNull; + From 967219ee7f48a77a36a1298be9667b8b3b66a3dc Mon Sep 17 00:00:00 2001 From: Joel Stanley Date: Tue, 3 Aug 2021 17:46:15 +0930 Subject: [PATCH 17/44] package/pdbg: Fix alignment error on autobuilder The autobuilder fails when building for sh because of an alignment issue in assembly that includes an external data file. Fixes: http://autobuild.buildroot.net/results/457b88c4ba85edb42b3a36cce48bf90712f590bf/ This fix has been submitted upstream. Signed-off-by: Joel Stanley Signed-off-by: Arnout Vandecappelle (Essensium/Mind) --- .../pdbg/0001-template-Fix-alignment.patch | 39 +++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 package/pdbg/0001-template-Fix-alignment.patch diff --git a/package/pdbg/0001-template-Fix-alignment.patch b/package/pdbg/0001-template-Fix-alignment.patch new file mode 100644 index 0000000000..e95d8344e2 --- /dev/null +++ b/package/pdbg/0001-template-Fix-alignment.patch @@ -0,0 +1,39 @@ +From 0080d0a64da274207bc341491f87863952bb6e3b Mon Sep 17 00:00:00 2001 +From: Joel Stanley +Date: Tue, 3 Aug 2021 17:28:17 +0930 +Subject: [PATCH] template: Fix alignment + +The assembler complains about unaliged data: + + ./template.S: Assembler messages: + ./template.S:21: Error: misaligned data + +If the included data is not an aligned size, the the symbols following +will be unaligned. + +We lost the alignment directive in commit 5f3deee1289e ("template: new +libfdt requires 8-byte aligned fdt"), so add it back as it was before +that commit. + +Reported by the buildroot autobuilder. + +Signed-off-by: Joel Stanley +--- + template.S | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/template.S b/template.S +index ecf9bba0656d..df8c064d6bc0 100644 +--- a/template.S ++++ b/template.S +@@ -17,6 +17,7 @@ + SYM_START(SYMBOL_PREFIX): + .incbin FILENAME + SYM_END(SYMBOL_PREFIX): ++.align 4 + SYM_SIZE(SYMBOL_PREFIX): + .long SYM_END(SYMBOL_PREFIX) - SYM_START(SYMBOL_PREFIX) + .globl SYM_START(SYMBOL_PREFIX) +-- +2.32.0 + From 7e783d3e4704d770120da8bbbd6acad168b69625 Mon Sep 17 00:00:00 2001 From: Bartosz Bilas Date: Tue, 3 Aug 2021 16:36:54 +0200 Subject: [PATCH 18/44] package/cegui: disable OpenGLES renderer Support of OpenGLES generates tons of autobuilders failures so let's disable it till upstream finds a solution for that. Fixes: http://autobuild.buildroot.net/results/41d/41d10c09472fbb8481a72c4f8bed789bb15bb3c2// http://autobuild.buildroot.net/results/9a8/9a8122b4d3d0aa9d71cdf8d21359411b130741f8// http://autobuild.buildroot.net/results/7e5/7e5dd79b48abde09bf4633b196579da5561f9fa1// and many more... Signed-off-by: Bartosz Bilas Signed-off-by: Arnout Vandecappelle (Essensium/Mind) --- package/cegui/cegui.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/package/cegui/cegui.mk b/package/cegui/cegui.mk index 127d3b0fad..2e56322374 100644 --- a/package/cegui/cegui.mk +++ b/package/cegui/cegui.mk @@ -13,6 +13,7 @@ CEGUI_CONF_OPTS = \ -DCEGUI_HAS_MINIZIP_RESOURCE_PROVIDER=OFF \ -DCEGUI_BUILD_RENDERER_IRRLICHT=OFF \ -DCEGUI_BUILD_RENDERER_OGRE=OFF \ + -DCEGUI_BUILD_RENDERER_OPENGLES=OFF \ -DCEGUI_BUILD_XMLPARSER_XERCES=OFF \ -DCEGUI_USE_FRIBIDI=OFF \ -DCEGUI_SAMPLES_ENABLED=OFF \ From 17e7863ba9c3b1946754e0f3d29cae00dc6e4d0d Mon Sep 17 00:00:00 2001 From: Fabrice Fontaine Date: Tue, 3 Aug 2021 19:06:02 +0200 Subject: [PATCH 19/44] package/php: opcache needs dynamic library opcache needs dynamic library since version 8.0.0 and https://github.com/php/php-src/commit/9a06876072b9ccb023d4a14426ccb587f10882f3 otherwise the build will fail on: /tmp/instance-4/output-1/host/opt/ext-toolchain/bin/../lib/gcc/arm-buildroot-linux-uclibcgnueabi/9.3.0/../../../../arm-buildroot-linux-uclibcgnueabi/bin/ld: /tmp/instance-4/output-1/host/bin/../arm-buildroot-linux-uclibcgnueabi/sysroot/usr/lib/libc.a(__uClibc_main.os): in function `__uClibc_fini': __uClibc_main.c:(.text+0x15c): undefined reference to `__fini_array_start' /tmp/instance-4/output-1/host/opt/ext-toolchain/bin/../lib/gcc/arm-buildroot-linux-uclibcgnueabi/9.3.0/../../../../arm-buildroot-linux-uclibcgnueabi/bin/ld: __uClibc_main.c:(.text+0x160): undefined reference to `__fini_array_end' Fixes: - http://autobuild.buildroot.org/results/526d2e3108ff2506482d1665bcc3ed083961430f Signed-off-by: Fabrice Fontaine Signed-off-by: Arnout Vandecappelle (Essensium/Mind) --- package/php/Config.ext | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/package/php/Config.ext b/package/php/Config.ext index 83bb3c481f..4dfdb37f87 100644 --- a/package/php/Config.ext +++ b/package/php/Config.ext @@ -10,8 +10,12 @@ config BR2_PACKAGE_PHP_EXT_FILEINFO help File Information support +comment "OPcache needs a toolchain w/ dynamic library" + depends on BR2_STATIC_LIBS + config BR2_PACKAGE_PHP_EXT_OPCACHE bool "OPcache" + depends on !BR2_STATIC_LIBS help Enable the Zend OPcache accelerator. From 6ff6b065041c3c5fbe8d1bad248b8cf67930f70c Mon Sep 17 00:00:00 2001 From: Fabrice Fontaine Date: Tue, 3 Aug 2021 23:19:56 +0200 Subject: [PATCH 20/44] package/syslog-ng: fix static build Fix static build failure raised since bump to version 3.33.1 in commit a9e405b07976815a5b7202a5fe50c8797e754178 Fixes: - http://autobuild.buildroot.org/results/ccd0a954f6e0676db67026f8b8c89823f3e5c510 Signed-off-by: Fabrice Fontaine Signed-off-by: Arnout Vandecappelle (Essensium/Mind) --- ...ules-diskq-dqtool.c-fix-static-build.patch | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 package/syslog-ng/0002-modules-diskq-dqtool.c-fix-static-build.patch diff --git a/package/syslog-ng/0002-modules-diskq-dqtool.c-fix-static-build.patch b/package/syslog-ng/0002-modules-diskq-dqtool.c-fix-static-build.patch new file mode 100644 index 0000000000..3332b12e9e --- /dev/null +++ b/package/syslog-ng/0002-modules-diskq-dqtool.c-fix-static-build.patch @@ -0,0 +1,33 @@ +From 04c8fe720d09bd6e53c4bcea9ad72ff131925ce6 Mon Sep 17 00:00:00 2001 +From: Fabrice Fontaine +Date: Fri, 23 Jul 2021 18:41:29 +0200 +Subject: [PATCH] modules/diskq/dqtool.c: fix static build + +Fix the following static build failure: + +/data/buildroot-autobuilder/instance-0/output-1/host/opt/ext-toolchain/bin/../lib/gcc/riscv64-buildroot-linux-musl/10.2.0/../../../../riscv64-buildroot-linux-musl/bin/ld: ./lib/.libs/libsyslog-ng.a(lib_libsyslog_ng_la-messages.o):(.sbss+0x2c): multiple definition of `verbose_flag'; modules/diskq/dqtool.o:(.sbss+0x4): first defined here +/data/buildroot-autobuilder/instance-0/output-1/host/opt/ext-toolchain/bin/../lib/gcc/riscv64-buildroot-linux-musl/10.2.0/../../../../riscv64-buildroot-linux-musl/bin/ld: ./lib/.libs/libsyslog-ng.a(lib_libsyslog_ng_la-messages.o):(.sbss+0x30): multiple definition of `debug_flag'; modules/diskq/dqtool.o:(.sbss+0x8): first defined here + +Fixes: + - http://autobuild.buildroot.org/results/ccd0a954f6e0676db67026f8b8c89823f3e5c510 + +Signed-off-by: Fabrice Fontaine +[Retrieved from: +https://github.com/syslog-ng/syslog-ng/commit/04c8fe720d09bd6e53c4bcea9ad72ff131925ce6] +--- + modules/diskq/dqtool.c | 2 -- + 1 file changed, 2 deletions(-) + +diff --git a/modules/diskq/dqtool.c b/modules/diskq/dqtool.c +index 6105f2ec68..50be452453 100644 +--- a/modules/diskq/dqtool.c ++++ b/modules/diskq/dqtool.c +@@ -49,8 +49,6 @@ gchar *persist_file_path; + gchar *assign_persist_name; + gboolean relocate_all; + gboolean display_version; +-gboolean debug_flag; +-gboolean verbose_flag; + gboolean assign_help; + + static GOptionEntry cat_options[] = From 7122a484b248e20714a0852e341f10adba82e713 Mon Sep 17 00:00:00 2001 From: Giulio Benetti Date: Wed, 4 Aug 2021 00:41:06 +0200 Subject: [PATCH 21/44] package/libfuse3: fix build failure on Microblaze due to wrong symver attribute detection Add a patch to fix symver wrong detection. As explained into the patch pending upstream[1] __has attribute() gives false positive when an attribute is not supported[2] and this leads to assuming symver attribute is present but it's not. This consequentely leads to build failure. I.e. Microblaze doesn't really support it since it doesn't include elfos.h in config.gcc that determines symver to be available. [1]: https://github.com/libfuse/libfuse/pull/620 [2]: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101766 Fixes: http://autobuild.buildroot.net/results/d6c/d6cfaf2aafaeda3c12d127f6a2d2e175b25e654f Signed-off-by: Giulio Benetti Signed-off-by: Arnout Vandecappelle (Essensium/Mind) --- ...on.build-fix-wrong-.symver-detection.patch | 61 +++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 package/libfuse3/0001-meson.build-fix-wrong-.symver-detection.patch diff --git a/package/libfuse3/0001-meson.build-fix-wrong-.symver-detection.patch b/package/libfuse3/0001-meson.build-fix-wrong-.symver-detection.patch new file mode 100644 index 0000000000..da20c26f19 --- /dev/null +++ b/package/libfuse3/0001-meson.build-fix-wrong-.symver-detection.patch @@ -0,0 +1,61 @@ +From 3aba09a5c56e017746c5c1652dbc845f4db7374a Mon Sep 17 00:00:00 2001 +From: Giulio Benetti +Date: Tue, 3 Aug 2021 23:39:46 +0200 +Subject: [PATCH] meson.build: fix wrong .symver detection + +As pointed here [1] __has_attribute() is broken for many attributes and +if it doesn't support the specific attribute it returns true, so we +can't really rely on that for this check. This lead to Buildroot +libfuse3 build failure [2] where that shows up with: +``` +error: symver is only supported on ELF platforms +``` +Indeed Microblaze doesn't support ELF since it doesn't include elfos.h, +but __has_attribute(symver) returns true. + +So let's substitute the #ifdef __has_attribute() with a stronger test on +a function foo() with __attribute__((symver ("test@TEST"))). + +[1]: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101766 +[2]: http://autobuild.buildroot.net/results/d6c/d6cfaf2aafaeda3c12d127f6a2d2e175b25e654f/build-end.log + +Signed-off-by: Giulio Benetti +--- + meson.build | 16 +++++++--------- + 1 file changed, 7 insertions(+), 9 deletions(-) + +diff --git a/meson.build b/meson.build +index b0250ee..a7281f3 100644 +--- a/meson.build ++++ b/meson.build +@@ -96,20 +96,18 @@ endif + # to have __has_attribute, then they are too old to support symver) + # other compilers might not have __has_attribute, but in those cases + # it is safe for this check to fail and for us to fallback to the old _asm_ +-# method for symver ++# method for symver. Anyway the attributes not supported by __has_attribute() ++# unfortunately return true giving a false positive. So let's try to build ++# using __attribute__ ((symver )) and see the result. + code = ''' +-#if defined __has_attribute +-# if !__has_attribute (symver) +-# error symver attribute not supported +-# endif +-#else +-#error __has_attribute not defined, assume we do not have symver +-#endif ++__attribute__ ((symver ("test@TEST"))) ++void foo(void) { ++} + + int main(void) { + return 0; + }''' +-if cc.compiles(code, args: [ '-O0', '-c']) ++if cc.compiles(code, args: [ '-O0', '-c', '-Werror']) + message('Compiler supports symver attribute') + add_project_arguments('-DHAVE_SYMVER_ATTRIBUTE', language: 'c') + else +-- +2.25.1 + From 135945c6c325c3b8e22038a984270e542c1f579e Mon Sep 17 00:00:00 2001 From: James Hilliard Date: Tue, 3 Aug 2021 17:21:09 -0600 Subject: [PATCH 22/44] package/desktop-file-utils: new package Signed-off-by: James Hilliard Signed-off-by: Arnout Vandecappelle (Essensium/Mind) --- package/desktop-file-utils/desktop-file-utils.hash | 3 +++ package/desktop-file-utils/desktop-file-utils.mk | 14 ++++++++++++++ 2 files changed, 17 insertions(+) create mode 100644 package/desktop-file-utils/desktop-file-utils.hash create mode 100644 package/desktop-file-utils/desktop-file-utils.mk diff --git a/package/desktop-file-utils/desktop-file-utils.hash b/package/desktop-file-utils/desktop-file-utils.hash new file mode 100644 index 0000000000..48623831cc --- /dev/null +++ b/package/desktop-file-utils/desktop-file-utils.hash @@ -0,0 +1,3 @@ +# Locally calculated: +sha256 b26dbde79ea72c8c84fb7f9d870ffd857381d049a86d25e0038c4cef4c747309 desktop-file-utils-0.26.tar.xz +sha256 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643 COPYING diff --git a/package/desktop-file-utils/desktop-file-utils.mk b/package/desktop-file-utils/desktop-file-utils.mk new file mode 100644 index 0000000000..12f000edf2 --- /dev/null +++ b/package/desktop-file-utils/desktop-file-utils.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# desktop-file-utils +# +################################################################################ + +DESKTOP_FILE_UTILS_VERSION = 0.26 +DESKTOP_FILE_UTILS_SOURCE = desktop-file-utils-$(DESKTOP_FILE_UTILS_VERSION).tar.xz +DESKTOP_FILE_UTILS_SITE = https://www.freedesktop.org/software/desktop-file-utils/releases +DESKTOP_FILE_UTILS_LICENSE = GPL-2.0+ +DESKTOP_FILE_UTILS_LICENSE_FILES = COPYING +HOST_DESKTOP_FILE_UTILS_DEPENDENCIES = host-libglib2 + +$(eval $(host-meson-package)) From a4951aac074801e147c2c46b022a4847c7a8dff8 Mon Sep 17 00:00:00 2001 From: James Hilliard Date: Tue, 3 Aug 2021 17:21:10 -0600 Subject: [PATCH 23/44] package/system-config-printer: add host desktop-file-utils dependency Fixes: - http://autobuild.buildroot.net/results/33f/33f00aa38d55e5d3acb7171428a7ef23532afa94 Signed-off-by: James Hilliard Signed-off-by: Arnout Vandecappelle (Essensium/Mind) --- package/system-config-printer/system-config-printer.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/system-config-printer/system-config-printer.mk b/package/system-config-printer/system-config-printer.mk index b20bea7dc4..e275743026 100644 --- a/package/system-config-printer/system-config-printer.mk +++ b/package/system-config-printer/system-config-printer.mk @@ -9,7 +9,7 @@ SYSTEM_CONFIG_PRINTER_SOURCE = system-config-printer-$(SYSTEM_CONFIG_PRINTER_VER SYSTEM_CONFIG_PRINTER_SITE = https://github.com/OpenPrinting/system-config-printer/releases/download/v$(SYSTEM_CONFIG_PRINTER_VERSION) SYSTEM_CONFIG_PRINTER_LICENSE = GPL-2.0+ SYSTEM_CONFIG_PRINTER_LICENSE_FILES = COPYING -SYSTEM_CONFIG_PRINTER_DEPENDENCIES = cups host-intltool host-pkgconf +SYSTEM_CONFIG_PRINTER_DEPENDENCIES = cups host-desktop-file-utils host-intltool host-pkgconf # 0001-Add-option-to-disable-xmlto-manual-generation.patch # 0002-configure-accept-non-system-cups-config.patch From c8bf39be4b89b4cdd3870ceef8b505bae53cb1c5 Mon Sep 17 00:00:00 2001 From: Fabrice Fontaine Date: Wed, 4 Aug 2021 10:31:37 +0200 Subject: [PATCH 24/44] package/openzwave: fix example build -std=c++11 has been wrongly removed from CFLAGS since commit c5ca521e232eae31276e7a12d17f0cf9d9c0108f resulting in the following build failure: In file included from /home/buildroot/autobuild/run/instance-1/output-1/build/openzwave-62444b0f979c337d2091d77d89cf63c2ae9775cf/cpp/src/Driver.h:38:0, from /home/buildroot/autobuild/run/instance-1/output-1/build/openzwave-62444b0f979c337d2091d77d89cf63c2ae9775cf/cpp/src/Manager.h:39, from Main.cpp:37: /home/buildroot/autobuild/run/instance-1/output-1/build/openzwave-62444b0f979c337d2091d77d89cf63c2ae9775cf/cpp/src/Node.h:566:32: error: 'std::shared_ptr' has not been declared void SetProductDetails(std::shared_ptr product); ^ Fixes: - http://autobuild.buildroot.org/results/a7999ffe3b93391b9a20dcfa3ddd9d21daf0cace Signed-off-by: Fabrice Fontaine Signed-off-by: Arnout Vandecappelle (Essensium/Mind) --- package/openzwave/openzwave.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package/openzwave/openzwave.mk b/package/openzwave/openzwave.mk index 0f639635dd..17da3b9b87 100644 --- a/package/openzwave/openzwave.mk +++ b/package/openzwave/openzwave.mk @@ -31,8 +31,8 @@ OPENZWAVE_MAKE_OPTS = \ pkgconfigdir=/usr/lib/pkgconfig \ sysconfdir=/etc/openzwave \ DOXYGEN= \ - DEBUG_CFLAGS="-fPIC" \ - RELEASE_CFLAGS="-fPIC" \ + DEBUG_CFLAGS="-fPIC -std=c++11" \ + RELEASE_CFLAGS="-fPIC -std=c++11" \ USE_BI_TXML=0 ifeq ($(BR2_PACKAGE_HAS_UDEV),y) From 1478126052566c5c5f2e360cb1d7b45c99c41dcb Mon Sep 17 00:00:00 2001 From: Fabrice Fontaine Date: Wed, 4 Aug 2021 11:08:13 +0200 Subject: [PATCH 25/44] package/sox: fix static build with libsndfile Fix the following static build failure with libsndfile raised since commit dbc6e9e9f385995eb10bbfb0bb08e7674100ce66: configure:14720: checking for sf_open_virtual in -lsndfile configure:14745: /tmp/instance-1/output-1/host/bin/xtensa-buildroot-linux-uclibc-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -mlongcalls -mauto-litpools -Os -g0 -static -Wall -Wmissing-prototypes -Wstrict-prototypes -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -static -Wl,--as-needed conftest.c -lsndfile >&5 conftest.c:73:1: warning: function declaration isn't a prototype [-Wstrict-prototypes] 73 | char sf_open_virtual (); | ^~~~ conftest.c:75:1: warning: function declaration isn't a prototype [-Wstrict-prototypes] 75 | main () | ^~~~ /tmp/instance-1/output-1/host/lib/gcc/xtensa-buildroot-linux-uclibc/10.3.0/../../../../xtensa-buildroot-linux-uclibc/bin/ld: /tmp/instance-1/output-1/host/xtensa-buildroot-linux-uclibc/sysroot/usr/lib/libsndfile.a(libsndfile_la-flac.o): in function `flac_byterate': flac.c:(.text+0xfc): undefined reference to `FLAC__StreamDecoderErrorStatusString' Fixes: - http://autobuild.buildroot.org/results/4bc58ed68b29642876bb02710d0cd4f31540de86 Signed-off-by: Fabrice Fontaine Signed-off-by: Arnout Vandecappelle (Essensium/Mind) --- ...e.ac-fix-static-linking-with-sndfile.patch | 44 +++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 package/sox/0005-configure.ac-fix-static-linking-with-sndfile.patch diff --git a/package/sox/0005-configure.ac-fix-static-linking-with-sndfile.patch b/package/sox/0005-configure.ac-fix-static-linking-with-sndfile.patch new file mode 100644 index 0000000000..2233459331 --- /dev/null +++ b/package/sox/0005-configure.ac-fix-static-linking-with-sndfile.patch @@ -0,0 +1,44 @@ +From 06109c84ab6930265287049c4bf9405e7ebc4986 Mon Sep 17 00:00:00 2001 +From: Fabrice Fontaine +Date: Wed, 4 Aug 2021 10:27:16 +0200 +Subject: [PATCH] configure.ac: fix static linking with sndfile + +Use SOX_FMT_PKG to retrieve sndfile dependencies (e.g. flac, opus or +vorbis). This will fix the following static build failure: + +configure:14720: checking for sf_open_virtual in -lsndfile +configure:14745: /tmp/instance-1/output-1/host/bin/xtensa-buildroot-linux-uclibc-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -mlongcalls -mauto-litpools -Os -g0 -static -Wall -Wmissing-prototypes -Wstrict-prototypes -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -static -Wl,--as-needed conftest.c -lsndfile >&5 +conftest.c:73:1: warning: function declaration isn't a prototype [-Wstrict-prototypes] + 73 | char sf_open_virtual (); + | ^~~~ +conftest.c:75:1: warning: function declaration isn't a prototype [-Wstrict-prototypes] + 75 | main () + | ^~~~ +/tmp/instance-1/output-1/host/lib/gcc/xtensa-buildroot-linux-uclibc/10.3.0/../../../../xtensa-buildroot-linux-uclibc/bin/ld: /tmp/instance-1/output-1/host/xtensa-buildroot-linux-uclibc/sysroot/usr/lib/libsndfile.a(libsndfile_la-flac.o): in function `flac_byterate': +flac.c:(.text+0xfc): undefined reference to `FLAC__StreamDecoderErrorStatusString' + +Fixes: + - http://autobuild.buildroot.org/results/4bc58ed68b29642876bb02710d0cd4f31540de86 + +Signed-off-by: Fabrice Fontaine +[Upstream status: not sent yet (waiting for feedback on third patch)] +--- + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index 8ae3202c..26510769 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -117,7 +117,7 @@ SOX_FMT_REQ([mp3], [MAD LAME TWOLAME]) + SOX_FMT_PKG([oggvorbis], [ogg vorbis vorbisenc vorbisfile]) + SOX_FMT_PKG([opus], [opusfile]) + +-SOX_DL_LIB([libsndfile], [sndfile.h], [sndfile], [sf_open_virtual]) ++SOX_FMT_PKG([libsndfile], [sndfile]) + SOX_FMT_REQ([sndfile], [LIBSNDFILE]) + + SOX_FMT_LIB([wavpack], [wavpack/wavpack.h], [wavpack], [WavpackGetSampleRate]) +-- +2.30.2 + From 2b5dc4e32ed1d1f125b64c6cdaf81db4f320400f Mon Sep 17 00:00:00 2001 From: Fabrice Fontaine Date: Wed, 4 Aug 2021 11:45:05 +0200 Subject: [PATCH 26/44] package/libuwsc: fix build with gcc 11 Fix the following build failure with gcc 11: /tmp/instance-1/output-1/build/libuwsc-3.3.5/src/lua/uwsc_lua.c: In function 'uwsc_lua_on': /tmp/instance-1/output-1/build/libuwsc-3.3.5/src/lua/uwsc_lua.c:177:5: error: this 'else' clause does not guard... [-Werror=misleading-indentation] 177 | else | ^~~~ /tmp/instance-1/output-1/build/libuwsc-3.3.5/src/lua/uwsc_lua.c:180:9: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'else' 180 | return 0; | ^~~~~~ Fixes: - http://autobuild.buildroot.org/results/1b031667e6d184493ea55ea6630272af4e475375 Signed-off-by: Fabrice Fontaine Signed-off-by: Arnout Vandecappelle (Essensium/Mind) --- .../libuwsc/0002-fix-bad-indentation.patch | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 package/libuwsc/0002-fix-bad-indentation.patch diff --git a/package/libuwsc/0002-fix-bad-indentation.patch b/package/libuwsc/0002-fix-bad-indentation.patch new file mode 100644 index 0000000000..f33f944d06 --- /dev/null +++ b/package/libuwsc/0002-fix-bad-indentation.patch @@ -0,0 +1,27 @@ +From 8cb416140741a596235b8acc46b2b119b13ebfab Mon Sep 17 00:00:00 2001 +From: Rosen Penev +Date: Tue, 6 Jul 2021 21:01:52 -0700 +Subject: [PATCH] fix bad indentation + +Fixes error with GCC11. + +[Retrieved from: +https://github.com/zhaojh329/libuwsc/commit/8cb416140741a596235b8acc46b2b119b13ebfab] +Signed-off-by: Fabrice Fontaine +--- + src/lua/uwsc_lua.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/lua/uwsc_lua.c b/src/lua/uwsc_lua.c +index de6932e..84689fe 100644 +--- a/src/lua/uwsc_lua.c ++++ b/src/lua/uwsc_lua.c +@@ -178,7 +178,7 @@ static int uwsc_lua_on(lua_State *L) + else + luaL_argcheck(L, false, 2, "available event name: open message error close"); + +- return 0; ++ return 0; + } + + static int __uwsc_lua_send(lua_State *L, int op) From a24bc1d9b8cf5bd3304452ab37e13769ef1bc6b4 Mon Sep 17 00:00:00 2001 From: Fabrice Fontaine Date: Wed, 4 Aug 2021 22:59:54 +0200 Subject: [PATCH 27/44] package/shairport-sync: bump to version 3.3.8 Version 3.3.8 brings many bug fixes and enhancements and is recommended for all users. https://github.com/mikebrady/shairport-sync/releases/tag/3.3.8 Signed-off-by: Fabrice Fontaine Signed-off-by: Arnout Vandecappelle (Essensium/Mind) --- package/shairport-sync/shairport-sync.hash | 2 +- package/shairport-sync/shairport-sync.mk | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package/shairport-sync/shairport-sync.hash b/package/shairport-sync/shairport-sync.hash index c451edb933..ebc81dedc1 100644 --- a/package/shairport-sync/shairport-sync.hash +++ b/package/shairport-sync/shairport-sync.hash @@ -1,3 +1,3 @@ # Locally calculated -sha256 7f8d4ecec53f2f681a962467bf09205568fc936c8c31a9ee07b1bd72d3d95b12 shairport-sync-3.3.7.tar.gz +sha256 c92f9a2d86dd1138673abc66e0010c94412ad6a46da8f36c3d538f4fa6b9faca shairport-sync-3.3.8.tar.gz sha256 1daaa904985807b7f9f2fa91f6b19f3faadf8df4e813f7451a691f89a6965e3f LICENSES diff --git a/package/shairport-sync/shairport-sync.mk b/package/shairport-sync/shairport-sync.mk index 1a02186dc1..adc584d554 100644 --- a/package/shairport-sync/shairport-sync.mk +++ b/package/shairport-sync/shairport-sync.mk @@ -4,7 +4,7 @@ # ################################################################################ -SHAIRPORT_SYNC_VERSION = 3.3.7 +SHAIRPORT_SYNC_VERSION = 3.3.8 SHAIRPORT_SYNC_SITE = $(call github,mikebrady,shairport-sync,$(SHAIRPORT_SYNC_VERSION)) SHAIRPORT_SYNC_LICENSE = MIT, BSD-3-Clause From a8a01212089e44731a4f8f5577f5c0d1df4b5942 Mon Sep 17 00:00:00 2001 From: Fabrice Fontaine Date: Wed, 4 Aug 2021 22:59:55 +0200 Subject: [PATCH 28/44] package/shairport-sync: use --without-foo options Use --without-foo options to disable unused features, as they have been fixed since version 3.3.8 Signed-off-by: Fabrice Fontaine Signed-off-by: Arnout Vandecappelle (Essensium/Mind) --- package/shairport-sync/shairport-sync.mk | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/package/shairport-sync/shairport-sync.mk b/package/shairport-sync/shairport-sync.mk index adc584d554..ba8b44a621 100644 --- a/package/shairport-sync/shairport-sync.mk +++ b/package/shairport-sync/shairport-sync.mk @@ -28,14 +28,16 @@ SHAIRPORT_SYNC_CONF_ENV += LIBS="$(SHAIRPORT_SYNC_CONF_LIBS)" # libavahi-client. ifeq ($(BR2_PACKAGE_AVAHI_DAEMON)$(BR2_PACKAGE_DBUS),yy) SHAIRPORT_SYNC_DEPENDENCIES += avahi -SHAIRPORT_SYNC_CONF_OPTS += --with-avahi +SHAIRPORT_SYNC_CONF_OPTS += --with-avahi --without-tinysvcmdns else -SHAIRPORT_SYNC_CONF_OPTS += --with-tinysvcmdns +SHAIRPORT_SYNC_CONF_OPTS += --without-avahi --with-tinysvcmdns endif ifeq ($(BR2_PACKAGE_LIBDAEMON),y) SHAIRPORT_SYNC_DEPENDENCIES += libdaemon SHAIRPORT_SYNC_CONF_OPTS += --with-libdaemon +else +SHAIRPORT_SYNC_CONF_OPTS += --without-libdaemon endif # OpenSSL or mbedTLS @@ -54,21 +56,29 @@ endif ifeq ($(BR2_PACKAGE_SHAIRPORT_SYNC_CONVOLUTION),y) SHAIRPORT_SYNC_DEPENDENCIES += libsndfile SHAIRPORT_SYNC_CONF_OPTS += --with-convolution +else +SHAIRPORT_SYNC_CONF_OPTS += --without-convolution endif ifeq ($(BR2_PACKAGE_SHAIRPORT_SYNC_DBUS),y) SHAIRPORT_SYNC_DEPENDENCIES += libglib2 SHAIRPORT_SYNC_CONF_OPTS += --with-dbus-interface --with-mpris-interface +else +SHAIRPORT_SYNC_CONF_OPTS += --without-dbus-interface --without-mpris-interface endif ifeq ($(BR2_PACKAGE_SHAIRPORT_SYNC_LIBSOXR),y) SHAIRPORT_SYNC_DEPENDENCIES += libsoxr SHAIRPORT_SYNC_CONF_OPTS += --with-soxr +else +SHAIRPORT_SYNC_CONF_OPTS += --without-soxr endif ifeq ($(BR2_PACKAGE_SHAIRPORT_SYNC_MQTT),y) SHAIRPORT_SYNC_DEPENDENCIES += avahi dbus mosquitto SHAIRPORT_SYNC_CONF_OPTS += --with-mqtt-client +else +SHAIRPORT_SYNC_CONF_OPTS += --without-mqtt-client endif define SHAIRPORT_SYNC_INSTALL_TARGET_CMDS From 602ff66bf7e85a5962025b6640ced7421b539fb2 Mon Sep 17 00:00:00 2001 From: Fabrice Fontaine Date: Wed, 4 Aug 2021 22:59:56 +0200 Subject: [PATCH 29/44] package/shairport-sync: fix static build with libsndfile Fix the following static build failure with libsndfile raise since commit dbc6e9e9f385995eb10bbfb0bb08e7674100ce66: /tmp/instance-3/output-1/host/lib/gcc/xtensa-buildroot-linux-uclibc/10.3.0/../../../../xtensa-buildroot-linux-uclibc/bin/ld: /tmp/instance-3/output-1/host/bin/../xtensa-buildroot-linux-uclibc/sysroot/usr/lib/libsndfile.a(libsndfile_la-flac.o): in function `flac_byterate': flac.c:(.text+0xfc): undefined reference to `FLAC__StreamDecoderErrorStatusString' Fixes: - http://autobuild.buildroot.org/results/92ed30a6855ca11800b779718822bcba4a69c9a3 Signed-off-by: Fabrice Fontaine Signed-off-by: Arnout Vandecappelle (Essensium/Mind) --- ...e.ac-find-sndfile-through-pkg-config.patch | 43 +++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 package/shairport-sync/0001-configure.ac-find-sndfile-through-pkg-config.patch diff --git a/package/shairport-sync/0001-configure.ac-find-sndfile-through-pkg-config.patch b/package/shairport-sync/0001-configure.ac-find-sndfile-through-pkg-config.patch new file mode 100644 index 0000000000..bd97ec0c3d --- /dev/null +++ b/package/shairport-sync/0001-configure.ac-find-sndfile-through-pkg-config.patch @@ -0,0 +1,43 @@ +From 900b1827c55cc6020b3242640075174c2e6b12a5 Mon Sep 17 00:00:00 2001 +From: Fabrice Fontaine +Date: Wed, 4 Aug 2021 22:16:40 +0200 +Subject: [PATCH] configure.ac: find sndfile through pkg-config + +Find sndfile through pkg-config to retrieve sndfile dependencies such as +flac and avoid the following static build failure: + +/tmp/instance-3/output-1/host/lib/gcc/xtensa-buildroot-linux-uclibc/10.3.0/../../../../xtensa-buildroot-linux-uclibc/bin/ld: /tmp/instance-3/output-1/host/bin/../xtensa-buildroot-linux-uclibc/sysroot/usr/lib/libsndfile.a(libsndfile_la-flac.o): in function `flac_byterate': +flac.c:(.text+0xfc): undefined reference to `FLAC__StreamDecoderErrorStatusString' + +Fixes: + - http://autobuild.buildroot.org/results/92ed30a6855ca11800b779718822bcba4a69c9a3 + +Signed-off-by: Fabrice Fontaine +[Upstream status: https://github.com/mikebrady/shairport-sync/pull/1263] +--- + configure.ac | 9 ++++++++- + 1 file changed, 8 insertions(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index f77087c5..9b982c51 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -304,7 +304,14 @@ AC_ARG_WITH(convolution, [AS_HELP_STRING([--with-convolution],[choose audio DSP + if test "x$with_convolution" = "xyes" ; then + AM_INIT_AUTOMAKE([subdir-objects]) + AC_DEFINE([CONFIG_CONVOLUTION], 1, [Include audio DSP convolution support.]) +- AC_CHECK_LIB([sndfile], [sf_open], , AC_MSG_ERROR(Convolution support requires the sndfile library -- libsndfile1-dev suggested!)) ++ if test "x${with_pkg_config}" = xyes ; then ++ PKG_CHECK_MODULES( ++ [sndfile], [sndfile], ++ [CFLAGS="${sndfile_CFLAGS} ${CFLAGS}" ++ LIBS="${sndfile_LIBS} ${LIBS}"], AC_MSG_ERROR(Convolution support requires the sndfile library -- libsndfile1-dev suggested!)) ++ else ++ AC_CHECK_LIB([sndfile], [sf_open], , AC_MSG_ERROR(Convolution support requires the sndfile library -- libsndfile1-dev suggested!)) ++ fi + fi + AM_CONDITIONAL([USE_CONVOLUTION], [test "x$with_convolution" = "xyes"]) + +-- +2.30.2 + From c1e6b82e8db71a602e32acdc4dac7c3c7f69c7e3 Mon Sep 17 00:00:00 2001 From: Fabrice Fontaine Date: Mon, 2 Aug 2021 23:04:02 +0200 Subject: [PATCH 30/44] package/php: drop mcrypt mcrypt has been dropped from php since version 7.2.0 and https://github.com/php/php-src/commit/5a17f632d4c7d936385485a0cb187172f33eb97a Signed-off-by: Fabrice Fontaine Signed-off-by: Arnout Vandecappelle (Essensium/Mind) --- Config.in.legacy | 6 ++++++ package/php/Config.ext | 6 ------ package/php/php.mk | 5 ----- 3 files changed, 6 insertions(+), 11 deletions(-) diff --git a/Config.in.legacy b/Config.in.legacy index 4e4a464709..54476acf9a 100644 --- a/Config.in.legacy +++ b/Config.in.legacy @@ -146,6 +146,12 @@ endif comment "Legacy options removed in 2021.08" +config BR2_PACKAGE_PHP_EXT_MCRYPT + bool "PHP mcrypt extension removed" + select BR2_LEGACY + help + mcrypt has been removed from php since version 7.2.0. + config BR2_BINUTILS_VERSION_2_34_X bool "binutils 2.34 has been removed" select BR2_LEGACY diff --git a/package/php/Config.ext b/package/php/Config.ext index 4dfdb37f87..5da5d8bed9 100644 --- a/package/php/Config.ext +++ b/package/php/Config.ext @@ -87,12 +87,6 @@ config BR2_PACKAGE_PHP_EXT_LIBSODIUM help libsodium support -config BR2_PACKAGE_PHP_EXT_MCRYPT - bool "mcrypt" - select BR2_PACKAGE_LIBMCRYPT - help - mcrypt support - config BR2_PACKAGE_PHP_EXT_OPENSSL bool "openssl" select BR2_PACKAGE_OPENSSL diff --git a/package/php/php.mk b/package/php/php.mk index 6780b6a962..a1ad6e3296 100644 --- a/package/php/php.mk +++ b/package/php/php.mk @@ -136,11 +136,6 @@ PHP_CONF_OPTS += --enable-mbstring PHP_DEPENDENCIES += oniguruma endif -ifeq ($(BR2_PACKAGE_PHP_EXT_MCRYPT),y) -PHP_CONF_OPTS += --with-mcrypt=$(STAGING_DIR)/usr -PHP_DEPENDENCIES += libmcrypt -endif - ifeq ($(BR2_PACKAGE_PHP_EXT_OPENSSL),y) PHP_CONF_OPTS += --with-openssl=$(STAGING_DIR)/usr PHP_DEPENDENCIES += openssl From 08d1536202b4a80e974e23ee62a898bc511a64c6 Mon Sep 17 00:00:00 2001 From: Fabrice Fontaine Date: Wed, 4 Aug 2021 11:51:29 +0200 Subject: [PATCH 31/44] package/luaossl: requires DES support in openssl Enable DES in openssl to fix build failure raised since commit a83d41867c8d69a77d5cd0a665aa216af5340359 Fixes: - http://autobuild.buildroot.org/results/3e043f992f81ba1e7ad7a2c64d73425e074301a2 Signed-off-by: Fabrice Fontaine Signed-off-by: Arnout Vandecappelle (Essensium/Mind) --- package/luaossl/Config.in | 1 + 1 file changed, 1 insertion(+) diff --git a/package/luaossl/Config.in b/package/luaossl/Config.in index d8763e76a3..f84c59f2a0 100644 --- a/package/luaossl/Config.in +++ b/package/luaossl/Config.in @@ -2,6 +2,7 @@ config BR2_PACKAGE_LUAOSSL bool "luaossl" depends on BR2_TOOLCHAIN_HAS_THREADS select BR2_PACKAGE_OPENSSL + select BR2_PACKAGE_LIBOPENSSL_ENABLE_DES if BR2_PACKAGE_LIBOPENSSL help luaossl is a comprehensive binding to OpenSSL for Lua 5.1, 5.2, and later. From 63ecfad96ad653e445d57632c81f5f27fa1761ca Mon Sep 17 00:00:00 2001 From: Fabrice Fontaine Date: Wed, 4 Aug 2021 12:07:36 +0200 Subject: [PATCH 32/44] package/usbguard: needs at least a crypto backend Since its addition in commit fbff7d7289cc95db991184f890f4ca1fcf8a101e, usbguard needs a crypto backend otherwise the build will fail on: checking for sodium... no checking for libcrypto... no checking for powerpc-buildroot-linux-uclibc-libgcrypt-config... no checking for libgcrypt-config... no checking for LIBGCRYPT - version >= 1.5.0... no configure: error: The selected crypto backend library is not available. So select sodium as the default crypto backend as this is the default choice in configure.ac. Fixes: - http://autobuild.buildroot.org/results/fb9865e2c65ea1dd9a657e1181a6c8c49481fda7 Signed-off-by: Fabrice Fontaine Signed-off-by: Arnout Vandecappelle (Essensium/Mind) --- package/usbguard/Config.in | 1 + package/usbguard/usbguard.mk | 14 +++++--------- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/package/usbguard/Config.in b/package/usbguard/Config.in index 58ee5c4b25..41f19dc1a0 100644 --- a/package/usbguard/Config.in +++ b/package/usbguard/Config.in @@ -8,6 +8,7 @@ config BR2_PACKAGE_USBGUARD depends on !BR2_TOOLCHAIN_USES_MUSL select BR2_PACKAGE_PROTOBUF select BR2_PACKAGE_LIBQB + select BR2_PACKAGE_LIBSODIUM if !BR2_PACKAGE_LIBGCRYPT && !BR2_PACKAGE_LIBOPENSSL help The USBGuard software framework diff --git a/package/usbguard/usbguard.mk b/package/usbguard/usbguard.mk index 1518f92fc5..a0d1c8446f 100644 --- a/package/usbguard/usbguard.mk +++ b/package/usbguard/usbguard.mk @@ -18,23 +18,19 @@ USBGUARD_CONF_OPTS = \ USBGUARD_DEPENDENCIES += libqb protobuf -ifeq ($(BR2_PACKAGE_LIBOPENSSL),y) +ifeq ($(BR2_PACKAGE_LIBSODIUM),y) +USBGUARD_CONF_OPTS += --with-crypto-library=sodium +USBGUARD_DEPENDENCIES += libsodium +else ifeq ($(BR2_PACKAGE_LIBOPENSSL),y) USBGUARD_CONF_OPTS += --with-crypto-library=openssl USBGUARD_DEPENDENCIES += libopenssl -endif - -ifeq ($(BR2_PACKAGE_LIBGCRYPT),y) +else ifeq ($(BR2_PACKAGE_LIBGCRYPT),y) USBGUARD_CONF_ENV += \ ac_cv_path_LIBGCRYPT_CONFIG=$(STAGING_DIR)/usr/bin/libgcrypt-config USBGUARD_CONF_OPTS += --with-crypto-library=gcrypt USBGUARD_DEPENDENCIES += libgcrypt endif -ifeq ($(BR2_PACKAGE_LIBSODIUM),y) -USBGUARD_CONF_OPTS += --with-crypto-library=sodium -USBGUARD_DEPENDENCIES += libsodium -endif - ifeq ($(BR2_PACKAGE_SYSTEMD),y) USBGUARD_CONF_OPTS += --enable-systemd USBGUARD_DEPENDENCIES += systemd From 1116a3060955c36c43a8bea5f1f00ea4effb4e48 Mon Sep 17 00:00:00 2001 From: Fabrice Fontaine Date: Thu, 5 Aug 2021 10:01:07 +0200 Subject: [PATCH 33/44] package/libebml: fix build with gcc 11 Fix the following build failure with gcc 11: /tmp/instance-0/output-1/build/libebml-1.4.2/src/EbmlString.cpp: In member function 'virtual filepos_t libebml::EbmlString::ReadData(libebml::IOCallback&, libebml::ScopeMode)': /tmp/instance-0/output-1/build/libebml-1.4.2/src/EbmlString.cpp:147:41: error: 'numeric_limits' is not a member of 'std' 147 | auto Buffer = (GetSize() + 1 < std::numeric_limits::max()) ? new (std::nothrow) char[GetSize() + 1] : nullptr; | ^~~~~~~~~~~~~~ /tmp/instance-0/output-1/build/libebml-1.4.2/src/EbmlString.cpp:147:67: error: expected primary-expression before '>' token 147 | auto Buffer = (GetSize() + 1 < std::numeric_limits::max()) ? new (std::nothrow) char[GetSize() + 1] : nullptr; | ^ /tmp/instance-0/output-1/build/libebml-1.4.2/src/EbmlString.cpp:147:70: error: '::max' has not been declared; did you mean 'std::max'? 147 | auto Buffer = (GetSize() + 1 < std::numeric_limits::max()) ? new (std::nothrow) char[GetSize() + 1] : nullptr; | ^~~ | std::max Fixes: - http://autobuild.buildroot.org/results/3a28507127eae47994ca62e2b656da32bd2fb1f8 Signed-off-by: Fabrice Fontaine Signed-off-by: Arnout Vandecappelle (Essensium/Mind) --- ...-header-files-for-std-numeric_limits.patch | 52 +++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 package/libebml/0001-include-appropriate-header-files-for-std-numeric_limits.patch diff --git a/package/libebml/0001-include-appropriate-header-files-for-std-numeric_limits.patch b/package/libebml/0001-include-appropriate-header-files-for-std-numeric_limits.patch new file mode 100644 index 0000000000..83d1b92051 --- /dev/null +++ b/package/libebml/0001-include-appropriate-header-files-for-std-numeric_limits.patch @@ -0,0 +1,52 @@ +From f0bfd53647961e799a43d918c46cf3b6bff89806 Mon Sep 17 00:00:00 2001 +From: Moritz Bunkus +Date: Sat, 27 Feb 2021 20:36:52 +0100 +Subject: [PATCH] include appropriate header files for std::numeric_limits + +Fixes #80. + +[Retrieved from: +https://github.com/Matroska-Org/libebml/commit/f0bfd53647961e799a43d918c46cf3b6bff89806] +Signed-off-by: Fabrice Fontaine +--- + ChangeLog | 4 ++++ + src/EbmlString.cpp | 1 + + src/EbmlUnicodeString.cpp | 1 + + 3 files changed, 6 insertions(+) + +diff --git a/ChangeLog b/ChangeLog +index 034cf86..e4b13a9 100644 +--- a/ChangeLog ++++ b/ChangeLog +@@ -1,3 +1,7 @@ ++2021-02-27 Moritz Bunkus ++ ++ * Fix compilation with g++ 11. Fixes #80. ++ + 2021-02-21 Steve Lhomme + + * Remove Coremake project files +diff --git a/src/EbmlString.cpp b/src/EbmlString.cpp +index 27e55fd..4c05fcf 100644 +--- a/src/EbmlString.cpp ++++ b/src/EbmlString.cpp +@@ -34,6 +34,7 @@ + \author Steve Lhomme + */ + #include ++#include + + #include "ebml/EbmlString.h" + +diff --git a/src/EbmlUnicodeString.cpp b/src/EbmlUnicodeString.cpp +index 496a16a..99fc073 100644 +--- a/src/EbmlUnicodeString.cpp ++++ b/src/EbmlUnicodeString.cpp +@@ -36,6 +36,7 @@ + */ + + #include ++#include + + #include "ebml/EbmlUnicodeString.h" + From 4200631ce243c323bcc5ebf5fe8710f3612f443d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20L=C3=A9ger?= Date: Wed, 4 Aug 2021 12:33:53 +0200 Subject: [PATCH 34/44] boot/optee-os: use dedicated 3.13.0 patch directory MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Existing patch is for 3.13.0 optee version but is located at the root of optee-os folder, leading to error when applying it on more recent version. Move it to a dedicated 3.13.0 folder. Signed-off-by: Clément Léger Signed-off-by: Arnout Vandecappelle (Essensium/Mind) --- ...001-core-zlib-fix-build-warning-when-_LFS64_LARGEFILE-is.patch | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename boot/optee-os/{ => 3.13.0}/0001-core-zlib-fix-build-warning-when-_LFS64_LARGEFILE-is.patch (100%) diff --git a/boot/optee-os/0001-core-zlib-fix-build-warning-when-_LFS64_LARGEFILE-is.patch b/boot/optee-os/3.13.0/0001-core-zlib-fix-build-warning-when-_LFS64_LARGEFILE-is.patch similarity index 100% rename from boot/optee-os/0001-core-zlib-fix-build-warning-when-_LFS64_LARGEFILE-is.patch rename to boot/optee-os/3.13.0/0001-core-zlib-fix-build-warning-when-_LFS64_LARGEFILE-is.patch From 64b33c22a765f07510b089c8f9fe12df1bfb8cc9 Mon Sep 17 00:00:00 2001 From: Fabrice Fontaine Date: Thu, 5 Aug 2021 10:33:25 +0200 Subject: [PATCH 35/44] package/network-manager: needs gcc >= 4.9 network-manager needs gcc >= 4.9 since bump to version 1.32.2 in commit 360d1aad84449c6a1993d8c7e469dc0cd35339a2 to avoid the following build failure: src/libnm-core-impl/nm-setting-bond.c: At top level: src/libnm-core-impl/nm-setting-bond.c:149:5: error: array initialized from non-constant array expression NM_MAKE_STRV("stable", "bandwidth", "count"); ^ Fixes: - http://autobuild.buildroot.org/results/dc270ead82707f89d47616a0c18629715c6ea1a5 Signed-off-by: Fabrice Fontaine Signed-off-by: Arnout Vandecappelle (Essensium/Mind) --- package/network-manager/Config.in | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/package/network-manager/Config.in b/package/network-manager/Config.in index 7d44768460..38ab43740f 100644 --- a/package/network-manager/Config.in +++ b/package/network-manager/Config.in @@ -4,6 +4,7 @@ config BR2_PACKAGE_NETWORK_MANAGER depends on !BR2_STATIC_LIBS # gnutls depends on BR2_USE_MMU # dbus depends on BR2_PACKAGE_HAS_UDEV + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # Tested with 3.2, but may even work with earlier versions depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_2 depends on BR2_TOOLCHAIN_USES_GLIBC # CLOCK_BOOTTIME, IPTOS_CLASS_* @@ -61,9 +62,10 @@ config BR2_PACKAGE_NETWORK_MANAGER_OVS endif -comment "NetworkManager needs udev /dev management and a glibc toolchain w/ headers >= 3.2, dynamic library, wchar, threads" +comment "NetworkManager needs udev /dev management and a glibc toolchain w/ headers >= 3.2, dynamic library, wchar, threads, gcc >= 4.9" depends on BR2_USE_MMU depends on !BR2_PACKAGE_HAS_UDEV || \ !BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_2 || \ !BR2_TOOLCHAIN_USES_GLIBC || BR2_STATIC_LIBS || \ - !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS + !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS || \ + !BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 From 38f9f5bb303acdaedb96c9ecaa5324a9674073c5 Mon Sep 17 00:00:00 2001 From: Fabrice Fontaine Date: Thu, 5 Aug 2021 10:59:55 +0200 Subject: [PATCH 36/44] package/uhd: fix build with gcc 11 Fix the following build failure with gcc 11: In file included from /tmp/instance-4/output-1/build/uhd-3.15.0.0/host/lib/usrp/dboard/e3xx/e3xx_ad9361_iface.hpp:14, from /tmp/instance-4/output-1/build/uhd-3.15.0.0/host/lib/usrp/dboard/e3xx/e3xx_ad9361_iface.cpp:7: /tmp/instance-4/output-1/build/uhd-3.15.0.0/host/lib/include/uhdlib/utils/rpc.hpp: In function 'bool {anonymous}::await_rpc_connected_state(std::shared_ptr, std::chrono::milliseconds)': /tmp/instance-4/output-1/build/uhd-3.15.0.0/host/lib/include/uhdlib/utils/rpc.hpp:28:27: error: 'sleep_for' is not a member of 'std::this_thread' 28 | std::this_thread::sleep_for(std::chrono::milliseconds(1)); | ^~~~~~~~~ Fixes: - http://autobuild.buildroot.org/results/1591ff7fabb09e4eb79f3aa293fbb228c255c45b Signed-off-by: Fabrice Fontaine Signed-off-by: Arnout Vandecappelle (Essensium/Mind) --- ...-lib-Fix-missing-includes-in-rpc-hpp.patch | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 package/uhd/0004-lib-Fix-missing-includes-in-rpc-hpp.patch diff --git a/package/uhd/0004-lib-Fix-missing-includes-in-rpc-hpp.patch b/package/uhd/0004-lib-Fix-missing-includes-in-rpc-hpp.patch new file mode 100644 index 0000000000..b287beec71 --- /dev/null +++ b/package/uhd/0004-lib-Fix-missing-includes-in-rpc-hpp.patch @@ -0,0 +1,28 @@ +From 9c4d9d826a6f40f199c526afd5ec168d5d088591 Mon Sep 17 00:00:00 2001 +From: Martin Braun +Date: Fri, 29 Jan 2021 12:23:50 +0100 +Subject: [PATCH] lib: Fix missing includes in rpc.hpp + +[Retrieved from: +https://github.com/EttusResearch/uhd/commit/9c4d9d826a6f40f199c526afd5ec168d5d088591] +Signed-off-by: Fabrice Fontaine +--- + host/lib/include/uhdlib/utils/rpc.hpp | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/host/lib/include/uhdlib/utils/rpc.hpp b/host/lib/include/uhdlib/utils/rpc.hpp +index e87a2ee324..ca89c10547 100644 +--- a/host/lib/include/uhdlib/utils/rpc.hpp ++++ b/host/lib/include/uhdlib/utils/rpc.hpp +@@ -12,7 +12,11 @@ + #include + #include + #include ++#include + #include ++#include ++#include ++#include + + namespace { + From 96865f02d4d770da40d33ebc6421e15721bf3f94 Mon Sep 17 00:00:00 2001 From: Fabrice Fontaine Date: Thu, 5 Aug 2021 11:09:20 +0200 Subject: [PATCH 37/44] package/qpdf: fix CVE-2021-36978 QPDF 9.x through 9.1.1 and 10.x through 10.0.4 has a heap-based buffer overflow in Pl_ASCII85Decoder::write (called from Pl_AES_PDF::flush and Pl_AES_PDF::finish) when a certain downstream write fails. Signed-off-by: Fabrice Fontaine Signed-off-by: Arnout Vandecappelle (Essensium/Mind) --- ...to-be-safe-if-downstream-write-fails.patch | 86 +++++++++++++++++++ package/qpdf/qpdf.mk | 3 + 2 files changed, 89 insertions(+) create mode 100644 package/qpdf/0002-Fix-some-pipelines-to-be-safe-if-downstream-write-fails.patch diff --git a/package/qpdf/0002-Fix-some-pipelines-to-be-safe-if-downstream-write-fails.patch b/package/qpdf/0002-Fix-some-pipelines-to-be-safe-if-downstream-write-fails.patch new file mode 100644 index 0000000000..70017350f2 --- /dev/null +++ b/package/qpdf/0002-Fix-some-pipelines-to-be-safe-if-downstream-write-fails.patch @@ -0,0 +1,86 @@ +From dc92574c10f3e2516ec6445b88c5d584f40df4e5 Mon Sep 17 00:00:00 2001 +From: Jay Berkenbilt +Date: Mon, 4 Jan 2021 11:55:28 -0500 +Subject: [PATCH] Fix some pipelines to be safe if downstream write fails (fuzz + issue 28262) + +[Retrieved (and updated to remove updates on ChangeLog and fuzz) from: +https://github.com/qpdf/qpdf/commit/dc92574c10f3e2516ec6445b88c5d584f40df4e5] +Signed-off-by: Fabrice Fontaine +--- + ChangeLog | 6 ++++++ + fuzz/qpdf_extra/28262.fuzz | Bin 0 -> 40395 bytes + libqpdf/Pl_AES_PDF.cc | 2 +- + libqpdf/Pl_ASCII85Decoder.cc | 7 +++++-- + libqpdf/Pl_ASCIIHexDecoder.cc | 6 ++++-- + libqpdf/Pl_Count.cc | 2 +- + 6 files changed, 17 insertions(+), 6 deletions(-) + create mode 100644 fuzz/qpdf_extra/28262.fuzz + +diff --git a/libqpdf/Pl_AES_PDF.cc b/libqpdf/Pl_AES_PDF.cc +index 18cf3a4d..2865f804 100644 +--- a/libqpdf/Pl_AES_PDF.cc ++++ b/libqpdf/Pl_AES_PDF.cc +@@ -238,6 +238,6 @@ Pl_AES_PDF::flush(bool strip_padding) + } + } + } +- getNext()->write(this->outbuf, bytes); + this->offset = 0; ++ getNext()->write(this->outbuf, bytes); + } +diff --git a/libqpdf/Pl_ASCII85Decoder.cc b/libqpdf/Pl_ASCII85Decoder.cc +index b8df3e87..9d9f6704 100644 +--- a/libqpdf/Pl_ASCII85Decoder.cc ++++ b/libqpdf/Pl_ASCII85Decoder.cc +@@ -119,10 +119,13 @@ Pl_ASCII85Decoder::flush() + + QTC::TC("libtests", "Pl_ASCII85Decoder partial flush", + (this->pos == 5) ? 0 : 1); +- getNext()->write(outbuf, this->pos - 1); +- ++ // Reset before calling getNext()->write in case that throws an ++ // exception. ++ auto t = this->pos - 1; + this->pos = 0; + memset(this->inbuf, 117, 5); ++ ++ getNext()->write(outbuf, t); + } + + void +diff --git a/libqpdf/Pl_ASCIIHexDecoder.cc b/libqpdf/Pl_ASCIIHexDecoder.cc +index f20a9769..7845268e 100644 +--- a/libqpdf/Pl_ASCIIHexDecoder.cc ++++ b/libqpdf/Pl_ASCIIHexDecoder.cc +@@ -97,12 +97,14 @@ Pl_ASCIIHexDecoder::flush() + + QTC::TC("libtests", "Pl_ASCIIHexDecoder partial flush", + (this->pos == 2) ? 0 : 1); +- getNext()->write(&ch, 1); +- ++ // Reset before calling getNext()->write in case that throws an ++ // exception. + this->pos = 0; + this->inbuf[0] = '0'; + this->inbuf[1] = '0'; + this->inbuf[2] = '\0'; ++ ++ getNext()->write(&ch, 1); + } + + void +diff --git a/libqpdf/Pl_Count.cc b/libqpdf/Pl_Count.cc +index 8077092a..c35619b8 100644 +--- a/libqpdf/Pl_Count.cc ++++ b/libqpdf/Pl_Count.cc +@@ -27,8 +27,8 @@ Pl_Count::write(unsigned char* buf, size_t len) + if (len) + { + this->m->count += QIntC::to_offset(len); +- getNext()->write(buf, len); + this->m->last_char = buf[len - 1]; ++ getNext()->write(buf, len); + } + } + diff --git a/package/qpdf/qpdf.mk b/package/qpdf/qpdf.mk index ec3d3f89a3..c96bf6bf2e 100644 --- a/package/qpdf/qpdf.mk +++ b/package/qpdf/qpdf.mk @@ -14,6 +14,9 @@ QPDF_DEPENDENCIES = host-pkgconf zlib jpeg QPDF_CONF_OPTS = --with-random=/dev/urandom +# 0002-Fix-some-pipelines-to-be-safe-if-downstream-write-fails.patch +QPDF_IGNORE_CVES += CVE-2021-36978 + ifeq ($(BR2_PACKAGE_GNUTLS),y) QPDF_CONF_OPTS += --enable-crypto-gnutls QPDF_DEPENDENCIES += gnutls From 1d64fe9d58e5d34795afc15d84b961c93ed8f3c1 Mon Sep 17 00:00:00 2001 From: Fabrice Fontaine Date: Thu, 5 Aug 2021 11:22:25 +0200 Subject: [PATCH 38/44] package/mupdf: renumber second patch Fix mistake in second patch number added by commit d7d23710facd789c8986de055e30792af2591f2c Signed-off-by: Fabrice Fontaine Signed-off-by: Arnout Vandecappelle (Essensium/Mind) --- ...703366-Fix-double-free-of-object-during-linearization.patch} | 0 package/mupdf/mupdf.mk | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) rename package/mupdf/{0001-Bug-703366-Fix-double-free-of-object-during-linearization.patch => 0002-Bug-703366-Fix-double-free-of-object-during-linearization.patch} (100%) diff --git a/package/mupdf/0001-Bug-703366-Fix-double-free-of-object-during-linearization.patch b/package/mupdf/0002-Bug-703366-Fix-double-free-of-object-during-linearization.patch similarity index 100% rename from package/mupdf/0001-Bug-703366-Fix-double-free-of-object-during-linearization.patch rename to package/mupdf/0002-Bug-703366-Fix-double-free-of-object-during-linearization.patch diff --git a/package/mupdf/mupdf.mk b/package/mupdf/mupdf.mk index 294cd8a61b..d3d9d3b101 100644 --- a/package/mupdf/mupdf.mk +++ b/package/mupdf/mupdf.mk @@ -22,7 +22,7 @@ MUPDF_DEPENDENCIES = \ xlib_libX11 \ zlib -# 0001-Bug-703366-Fix-double-free-of-object-during-linearization.patch +# 0002-Bug-703366-Fix-double-free-of-object-during-linearization.patch MUPDF_IGNORE_CVES += CVE-2021-3407 # The pkg-config name for gumbo-parser is `gumbo`. From 69143ccce0e6def08e10460b4d2ad68e8aa07062 Mon Sep 17 00:00:00 2001 From: Fabrice Fontaine Date: Thu, 5 Aug 2021 11:22:26 +0200 Subject: [PATCH 39/44] package/mupdf: fix CVE-2021-37220 MuPDF through 1.18.1 has an out-of-bounds write because the cached color converter does not properly consider the maximum key size of a hash table. This can, for example, be seen with crafted "mutool draw" input. Signed-off-by: Fabrice Fontaine Signed-off-by: Arnout Vandecappelle (Essensium/Mind) --- ...x-key-size-in-cached-color-converter.patch | 119 ++++++++++++++++++ package/mupdf/mupdf.mk | 3 + 2 files changed, 122 insertions(+) create mode 100644 package/mupdf/0003-Bug-703791-Stay-within-hash-table-max-key-size-in-cached-color-converter.patch diff --git a/package/mupdf/0003-Bug-703791-Stay-within-hash-table-max-key-size-in-cached-color-converter.patch b/package/mupdf/0003-Bug-703791-Stay-within-hash-table-max-key-size-in-cached-color-converter.patch new file mode 100644 index 0000000000..5335f140d6 --- /dev/null +++ b/package/mupdf/0003-Bug-703791-Stay-within-hash-table-max-key-size-in-cached-color-converter.patch @@ -0,0 +1,119 @@ +From f5712c9949d026e4b891b25837edd2edc166151f Mon Sep 17 00:00:00 2001 +From: Tor Andersson +Date: Tue, 20 Apr 2021 14:46:48 +0200 +Subject: [PATCH] Bug 703791: Stay within hash table max key size in cached + color converter. + +[Retrieved from: +http://git.ghostscript.com/?p=mupdf.git;h=f5712c9949d026e4b891b25837edd2edc166151f] +Signed-off-by: Fabrice Fontaine +--- + include/mupdf/fitz/hash.h | 2 ++ + source/fitz/colorspace.c | 40 ++++++++++++++++++++++++--------------- + source/fitz/hash.c | 7 +++---- + 3 files changed, 30 insertions(+), 19 deletions(-) + +diff --git a/include/mupdf/fitz/hash.h b/include/mupdf/fitz/hash.h +index e92eb0458..feb37a5e4 100644 +--- a/include/mupdf/fitz/hash.h ++++ b/include/mupdf/fitz/hash.h +@@ -5,6 +5,8 @@ + #include "mupdf/fitz/context.h" + #include "mupdf/fitz/output.h" + ++#define FZ_HASH_TABLE_KEY_LENGTH 48 ++ + /** + Generic hash-table with fixed-length keys. + +diff --git a/source/fitz/colorspace.c b/source/fitz/colorspace.c +index af454caf1..f4db9d3d2 100644 +--- a/source/fitz/colorspace.c ++++ b/source/fitz/colorspace.c +@@ -1025,23 +1025,30 @@ typedef struct fz_cached_color_converter + static void fz_cached_color_convert(fz_context *ctx, fz_color_converter *cc_, const float *ss, float *ds) + { + fz_cached_color_converter *cc = cc_->opaque; +- float *val = fz_hash_find(ctx, cc->hash, ss); +- int n = cc->base.ds->n * sizeof(float); +- +- if (val) ++ if (cc->hash) + { +- memcpy(ds, val, n); +- return; +- } ++ float *val = fz_hash_find(ctx, cc->hash, ss); ++ int n = cc->base.ds->n * sizeof(float); + +- cc->base.convert(ctx, &cc->base, ss, ds); ++ if (val) ++ { ++ memcpy(ds, val, n); ++ return; ++ } + +- val = Memento_label(fz_malloc_array(ctx, cc->base.ds->n, float), "cached_color_convert"); +- memcpy(val, ds, n); +- fz_try(ctx) +- fz_hash_insert(ctx, cc->hash, ss, val); +- fz_catch(ctx) +- fz_free(ctx, val); ++ cc->base.convert(ctx, &cc->base, ss, ds); ++ ++ val = Memento_label(fz_malloc_array(ctx, cc->base.ds->n, float), "cached_color_convert"); ++ memcpy(val, ds, n); ++ fz_try(ctx) ++ fz_hash_insert(ctx, cc->hash, ss, val); ++ fz_catch(ctx) ++ fz_free(ctx, val); ++ } ++ else ++ { ++ cc->base.convert(ctx, &cc->base, ss, ds); ++ } + } + + void fz_init_cached_color_converter(fz_context *ctx, fz_color_converter *cc, fz_colorspace *ss, fz_colorspace *ds, fz_colorspace *is, fz_color_params params) +@@ -1060,7 +1067,10 @@ void fz_init_cached_color_converter(fz_context *ctx, fz_color_converter *cc, fz_ + fz_try(ctx) + { + fz_find_color_converter(ctx, &cached->base, ss, ds, is, params); +- cached->hash = fz_new_hash_table(ctx, 256, n * sizeof(float), -1, fz_free); ++ if (n * sizeof(float) <= FZ_HASH_TABLE_KEY_LENGTH) ++ cached->hash = fz_new_hash_table(ctx, 256, n * sizeof(float), -1, fz_free); ++ else ++ fz_warn(ctx, "colorspace has too many components to be cached"); + } + fz_catch(ctx) + { +diff --git a/source/fitz/hash.c b/source/fitz/hash.c +index 882b886c9..287d43f03 100644 +--- a/source/fitz/hash.c ++++ b/source/fitz/hash.c +@@ -11,11 +11,9 @@ + and removed frequently. + */ + +-enum { MAX_KEY_LEN = 48 }; +- + typedef struct + { +- unsigned char key[MAX_KEY_LEN]; ++ unsigned char key[FZ_HASH_TABLE_KEY_LENGTH]; + void *val; + } fz_hash_entry; + +@@ -50,7 +48,8 @@ fz_new_hash_table(fz_context *ctx, int initialsize, int keylen, int lock, fz_has + { + fz_hash_table *table; + +- assert(keylen <= MAX_KEY_LEN); ++ if (keylen > FZ_HASH_TABLE_KEY_LENGTH) ++ fz_throw(ctx, FZ_ERROR_GENERIC, "hash table key length too large"); + + table = fz_malloc_struct(ctx, fz_hash_table); + table->keylen = keylen; +-- +2.17.1 + diff --git a/package/mupdf/mupdf.mk b/package/mupdf/mupdf.mk index d3d9d3b101..c9d5b4a162 100644 --- a/package/mupdf/mupdf.mk +++ b/package/mupdf/mupdf.mk @@ -25,6 +25,9 @@ MUPDF_DEPENDENCIES = \ # 0002-Bug-703366-Fix-double-free-of-object-during-linearization.patch MUPDF_IGNORE_CVES += CVE-2021-3407 +# 0003-Bug-703791-Stay-within-hash-table-max-key-size-in-cached-color-converter.patch +MUPDF_IGNORE_CVES += CVE-2021-37220 + # The pkg-config name for gumbo-parser is `gumbo`. MUPDF_PKG_CONFIG_PACKAGES = \ freetype2 \ From e39ad96136a8c340b3aea6b036024e28f14584f3 Mon Sep 17 00:00:00 2001 From: Fabrice Fontaine Date: Thu, 5 Aug 2021 13:21:23 +0200 Subject: [PATCH 40/44] package/x11r7/xlib_libxshmfence: disable on riscv32 xlib_libxshmfence unconditionally uses SYS_futex which raises the following build failure on riscv32: xshmfence_futex.h:58:17: error: 'SYS_futex' undeclared (first use in this function); did you mean 'sys_futex'? 58 | return syscall(SYS_futex, addr1, op, val1, timeout, addr2, val3); | ^~~~~~~~~ | sys_futex Fixes: - http://autobuild.buildroot.org/results/b3523e35fde0fac04b96a6278cbc6ffdfe56f7d1 Signed-off-by: Fabrice Fontaine Signed-off-by: Arnout Vandecappelle (Essensium/Mind) --- package/mesa3d/Config.in | 3 ++- package/x11r7/xlib_libxshmfence/Config.in | 3 +++ package/x11r7/xserver_xorg-server/Config.in | 3 ++- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/package/mesa3d/Config.in b/package/mesa3d/Config.in index 41c90c49af..eb7c1eef46 100644 --- a/package/mesa3d/Config.in +++ b/package/mesa3d/Config.in @@ -65,7 +65,8 @@ config BR2_PACKAGE_MESA3D_DRI_DRIVER !BR2_PACKAGE_MESA3D_OPENGL_GLX && \ !BR2_PACKAGE_MESA3D_OPENGL_EGL select BR2_PACKAGE_XLIB_LIBXSHMFENCE if \ - (BR2_PACKAGE_XORG7 && BR2_TOOLCHAIN_HAS_SYNC_4) + (BR2_PACKAGE_XORG7 && BR2_TOOLCHAIN_HAS_SYNC_4 && \ + !BR2_RISCV_32) config BR2_PACKAGE_MESA3D_VULKAN_DRIVER bool diff --git a/package/x11r7/xlib_libxshmfence/Config.in b/package/x11r7/xlib_libxshmfence/Config.in index 710476b357..7823bda7c0 100644 --- a/package/x11r7/xlib_libxshmfence/Config.in +++ b/package/x11r7/xlib_libxshmfence/Config.in @@ -1,5 +1,8 @@ config BR2_PACKAGE_XLIB_LIBXSHMFENCE bool "libxshmfence" + # Due to use of SYS_futex - can be enabled again when upstream + # adds SYS_futex64 as an alternative + depends on !BR2_RISCV_32 depends on BR2_TOOLCHAIN_HAS_SYNC_4 select BR2_PACKAGE_XORGPROTO help diff --git a/package/x11r7/xserver_xorg-server/Config.in b/package/x11r7/xserver_xorg-server/Config.in index fcd3d0ae00..4dc15435a8 100644 --- a/package/x11r7/xserver_xorg-server/Config.in +++ b/package/x11r7/xserver_xorg-server/Config.in @@ -53,7 +53,8 @@ config BR2_PACKAGE_XSERVER_XORG_SERVER_MODULAR depends on BR2_INSTALL_LIBSTDCPP select BR2_PACKAGE_LIBDRM select BR2_PACKAGE_LIBPCIACCESS - select BR2_PACKAGE_XLIB_LIBXSHMFENCE if BR2_TOOLCHAIN_HAS_SYNC_4 + select BR2_PACKAGE_XLIB_LIBXSHMFENCE if \ + (BR2_TOOLCHAIN_HAS_SYNC_4 && !BR2_RISCV_32) help This variant of the X.org server is the full-blown variant, as used by desktop GNU/Linux distributions. The drivers (for From 344101ddb1d4531f7d41e4e1206b581804b86bb9 Mon Sep 17 00:00:00 2001 From: Giulio Benetti Date: Thu, 5 Aug 2021 19:34:39 +0200 Subject: [PATCH 41/44] DEVELOPERS: add Giulio Benetti to libfuse3 package Add myself as libfuse3 package maintainer. Signed-off-by: Giulio Benetti Signed-off-by: Arnout Vandecappelle (Essensium/Mind) --- DEVELOPERS | 1 + 1 file changed, 1 insertion(+) diff --git a/DEVELOPERS b/DEVELOPERS index 1547ff123b..bb39abefab 100644 --- a/DEVELOPERS +++ b/DEVELOPERS @@ -1052,6 +1052,7 @@ F: package/xapian/ N: Giulio Benetti F: package/at/ +F: package/libfuse3/ F: package/libnspr/ F: package/libnss/ F: package/minicom/ From d54341fc33b6c02d01d31e8ddb938556867308a9 Mon Sep 17 00:00:00 2001 From: Fabrice Fontaine Date: Thu, 5 Aug 2021 21:12:47 +0200 Subject: [PATCH 42/44] package/pistache: fix build with gcc 11 Fix the following build failure with gcc 11: In file included from /tmp/instance-3/output-1/build/pistache-f2f5a50fbfb5b8ef6cf1d3d2a9d442a8270e375d/src/../include/pistache/async.h:10, from /tmp/instance-3/output-1/build/pistache-f2f5a50fbfb5b8ef6cf1d3d2a9d442a8270e375d/src/../include/pistache/client.h:9, from /tmp/instance-3/output-1/build/pistache-f2f5a50fbfb5b8ef6cf1d3d2a9d442a8270e375d/src/client/client.cc:7: /tmp/instance-3/output-1/build/pistache-f2f5a50fbfb5b8ef6cf1d3d2a9d442a8270e375d/src/../include/pistache/typeid.h:26:12: error: expected type-specifier before 'size_t' 26 | operator size_t() const { return reinterpret_cast(id_); } | ^~~~~~ Fixes: - http://autobuild.buildroot.org/results/2443559df8c2357476e4cbdbebb08280cbb80a3b Signed-off-by: Fabrice Fontaine Signed-off-by: Arnout Vandecappelle (Essensium/Mind) --- ...de-pistache-typeid.h-include-cstddef.patch | 38 +++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 package/pistache/0003-include-pistache-typeid.h-include-cstddef.patch diff --git a/package/pistache/0003-include-pistache-typeid.h-include-cstddef.patch b/package/pistache/0003-include-pistache-typeid.h-include-cstddef.patch new file mode 100644 index 0000000000..be06ca760a --- /dev/null +++ b/package/pistache/0003-include-pistache-typeid.h-include-cstddef.patch @@ -0,0 +1,38 @@ +From 37291201ed948e9d65993a717c59bb14f4187e13 Mon Sep 17 00:00:00 2001 +From: Fabrice Fontaine +Date: Thu, 5 Aug 2021 19:02:56 +0200 +Subject: [PATCH] include/pistache/typeid.h: include cstddef + +Include cstddef to avoid the following build failure with gcc 11: + +In file included from /tmp/instance-3/output-1/build/pistache-f2f5a50fbfb5b8ef6cf1d3d2a9d442a8270e375d/src/../include/pistache/async.h:10, + from /tmp/instance-3/output-1/build/pistache-f2f5a50fbfb5b8ef6cf1d3d2a9d442a8270e375d/src/../include/pistache/client.h:9, + from /tmp/instance-3/output-1/build/pistache-f2f5a50fbfb5b8ef6cf1d3d2a9d442a8270e375d/src/client/client.cc:7: +/tmp/instance-3/output-1/build/pistache-f2f5a50fbfb5b8ef6cf1d3d2a9d442a8270e375d/src/../include/pistache/typeid.h:26:12: error: expected type-specifier before 'size_t' + 26 | operator size_t() const { return reinterpret_cast(id_); } + | ^~~~~~ + +Fixes: + - http://autobuild.buildroot.org/results/2443559df8c2357476e4cbdbebb08280cbb80a3b + +Signed-off-by: Fabrice Fontaine +[Upstream status: https://github.com/pistacheio/pistache/pull/965] +--- + include/pistache/typeid.h | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/include/pistache/typeid.h b/include/pistache/typeid.h +index 10353ca..893e7c1 100644 +--- a/include/pistache/typeid.h ++++ b/include/pistache/typeid.h +@@ -7,6 +7,7 @@ + + #pragma once + ++#include + #include + + namespace Pistache +-- +2.30.2 + From 4b22106fb5e199aa26f148b0b159aecb7da7f7e0 Mon Sep 17 00:00:00 2001 From: Giulio Benetti Date: Tue, 3 Aug 2021 10:42:44 +0200 Subject: [PATCH 43/44] toolchain: introduce BR2_TOOLCHAIN_HAS_GCC_BUG_101737 pixman package fails to build for the SH4 architecture with optimization enabled with gcc up to 11.1.0: http://autobuild.buildroot.net/results/b20/b20869bbb48edb1f0a847ea9e2e1a0462d6350be/ It's been reported upstream: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101737 Signed-off-by: Giulio Benetti Signed-off-by: Arnout Vandecappelle (Essensium/Mind) --- toolchain/Config.in | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/toolchain/Config.in b/toolchain/Config.in index 03375e0c52..d5f1176178 100644 --- a/toolchain/Config.in +++ b/toolchain/Config.in @@ -176,6 +176,13 @@ config BR2_TOOLCHAIN_HAS_GCC_BUG_99140 bool default y if BR2_nios2 && !BR2_TOOLCHAIN_GCC_AT_LEAST_8 +# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101737 +# ICE: SH4 -Os causes internal compiler error. This bug +# still exists in gcc = 11.1.0 +config BR2_TOOLCHAIN_HAS_GCC_BUG_101737 + bool + default y if BR2_sh4 + config BR2_TOOLCHAIN_HAS_NATIVE_RPC bool From a8a9b12766a434e7d70cd246689d4de11d440875 Mon Sep 17 00:00:00 2001 From: Giulio Benetti Date: Tue, 3 Aug 2021 10:42:45 +0200 Subject: [PATCH 44/44] package/pixman: fix build failure due to gcc bug 101737 The pixman package exhibits gcc bug 101737 when built for the SH4 architecture with optimization enabled, which causes a build failure. As done for other packages in Buildroot work around this gcc bug by setting optimization to -O0 if BR2_TOOLCHAIN_HAS_GCC_BUG_101737=y. Also let's add PIXMAN_CFLAGS and pass the Codesourcery work around CFLAGS to it for consistency like we do for the rest of the packages. Fixes: http://autobuild.buildroot.net/results/b20/b20869bbb48edb1f0a847ea9e2e1a0462d6350be/ Signed-off-by: Giulio Benetti Signed-off-by: Arnout Vandecappelle (Essensium/Mind) --- package/pixman/pixman.mk | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/package/pixman/pixman.mk b/package/pixman/pixman.mk index d99005ecb7..6fab539593 100644 --- a/package/pixman/pixman.mk +++ b/package/pixman/pixman.mk @@ -44,12 +44,20 @@ ifneq ($(BR2_iwmmxt),y) PIXMAN_CONF_OPTS += --disable-arm-iwmmxt endif +PIXMAN_CFLAGS = $(TARGET_CFLAGS) + # toolchain gets confused about TLS access through GOT (PIC), so disable TLS # movhi r4, %got_hiadj(%tls_ldo(fast_path_cache)) # {standard input}:172: Error: bad expression ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII),y) -PIXMAN_CONF_ENV += CFLAGS="$(TARGET_CFLAGS) -DPIXMAN_NO_TLS" +PIXMAN_CFLAGS += -DPIXMAN_NO_TLS endif +ifeq ($(BR2_TOOLCHAIN_HAS_GCC_BUG_101737),y) +PIXMAN_CFLAGS += -O0 +endif + +PIXMAN_CONF_OPTS += CFLAGS="$(PIXMAN_CFLAGS)" + $(eval $(autotools-package)) $(eval $(host-autotools-package))