Skip to contentSkip to conversation

package/szip: replace with libaec

PATCH In review Yegor Yefremov via buildroot 1 participant 4 messages Oct 6 – Oct 11

lore
Share & tools
lore
#0 lore raw

cover package/szip: replace with libaec

From: Yegor Yefremov <[email protected]>

szip fails to build with GCC >= 15 on non-glibc toolchains, see
https://autobuild.buildroot.org/results/5e400d0e13480c58e8b1b0178bf7e5537dd31751

Instead of keeping it alive with compiler flags, this series replaces it with libaec. szip has no public repository and its last release is 2.1.1, while libaec is maintained, BSD licensed, recommended by the HDF Group, and ships libsz, a drop-in replacement with the same API (szlib.h) and soname (libsz.so.2). Debian, Fedora, Alpine and Arch already provide libsz from libaec.

The legacy option for szip selects libaec, so existing configurations keep a libsz.

This supersedes "[v2] package/szip: fix build with GCC 15":
https://patchwork.buildroot.org/project/buildroot/patch/[email protected]/

libaec was tested with utils/test-pkg on the default toolchain set (6 builds, all OK, including noMMU and static).

Yegor Yefremov (2):
package/libaec: new package
package/szip: remove package

 Config.in.legacy           |  9 +++++++++
 DEVELOPERS                 |  4 +---
 package/Config.in          |  2 +-
 package/libaec/Config.in   | 10 ++++++++++
 package/libaec/libaec.hash |  3 +++
 package/libaec/libaec.mk   | 19 +++++++++++++++++++
 package/szip/Config.in     | 16 ----------------
 package/szip/szip.hash     |  3 ---
 package/szip/szip.mk       | 13 -------------
 9 files changed, 43 insertions(+), 36 deletions(-)
 create mode 100644 package/libaec/Config.in
 create mode 100644 package/libaec/libaec.hash
 create mode 100644 package/libaec/libaec.mk
 delete mode 100644 package/szip/Config.in
 delete mode 100644 package/szip/szip.hash
 delete mode 100644 package/szip/szip.mk
Signature · 6 lines
2.34.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw

PATCH 1/2 package/libaec: new package

From: Yegor Yefremov <[email protected]>

libaec provides fast lossless compression of 1 up to 32 bit wide signed or unsigned integers. It implements the Golomb-Rice compression method under the BSD license and includes libsz, a drop-in replacement for the SZIP library with the same API (szlib.h) and soname (libsz.so.2).

https://github.com/Deutsches-Klimarechenzentrum/libaec

Assisted-by Claude:claude-opus-5-5
---
 DEVELOPERS                 |  1 +
 package/Config.in          |  1 +
 package/libaec/Config.in   | 10 ++++++++++
 package/libaec/libaec.hash |  3 +++
 package/libaec/libaec.mk   | 19 +++++++++++++++++++
 5 files changed, 34 insertions(+)
 create mode 100644 package/libaec/Config.in
 create mode 100644 package/libaec/libaec.hash
 create mode 100644 package/libaec/libaec.mk
DEVELOPERS +1 -0
index 32ac338dc8..bde955ec6a 100644
@@ -3567,6 +3567,7 @@ F:	package/feh/
 F:	package/hostapd/
 F:	package/imlib2/
 F:	package/kmod/
+F:	package/libaec/
 F:	package/libftdi1/
 F:	package/libical/
 F:	package/libmbim/
package/Config.in +1 -0
index a82e369aff..0585bacccf 100644
@@ -1617,6 +1617,7 @@ menu "Audio/Sound"
 endmenu
 
 menu "Compression and decompression"
+	source "package/libaec/Config.in"
 	source "package/libarchive/Config.in"
 	source "package/libdeflate/Config.in"
 	source "package/libjcat/Config.in"
package/libaec/Config.in new file +10 -0
new file mode 100644
index 0000000000..86fd770f2a
@@ -0,0 +1,10 @@
+config BR2_PACKAGE_LIBAEC
+	bool "libaec"
+	select BR2_HOST_CMAKE_AT_LEAST_3_26
+	help
+	  libaec provides fast lossless compression of 1 up to 32 bit
+	  wide signed or unsigned integers (samples). It implements
+	  Golomb-Rice compression method under the BSD license and
+	  includes a free drop-in replacement for the SZIP library.
+
+	  https://github.com/Deutsches-Klimarechenzentrum/libaec
package/libaec/libaec.hash new file +3 -0
new file mode 100644
index 0000000000..cf4984447f
@@ -0,0 +1,3 @@
+# Locally computed
+sha256  cc7b93be9002e25a88b45d6b8d5f6120756cb5e1000613f91d803ce0beba24d9  libaec-1.1.7.tar.gz
+sha256  9fdabba96fbc46af0ca018f86329f1e06e873b25801732001128d5afca265e36  LICENSE.txt
package/libaec/libaec.mk new file +19 -0
new file mode 100644
index 0000000000..d631230be6
@@ -0,0 +1,19 @@
+################################################################################
+#
+# libaec
+#
+################################################################################
+
+LIBAEC_VERSION = 1.1.7
+LIBAEC_SITE = https://github.com/Deutsches-Klimarechenzentrum/libaec/releases/download/v$(LIBAEC_VERSION)
+LIBAEC_LICENSE = BSD-2-Clause
+LIBAEC_LICENSE_FILES = LICENSE.txt
+LIBAEC_INSTALL_STAGING = YES
+
+ifeq ($(BR2_SHARED_LIBS),y)
+LIBAEC_CONF_OPTS += -DBUILD_STATIC_LIBS=OFF
+else
+LIBAEC_CONF_OPTS += -DBUILD_STATIC_LIBS=ON
+endif
+
+$(eval $(cmake-package))
Signature · 6 lines
2.34.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#2 lore raw

PATCH 2/2 package/szip: remove package

In reply to Yegor Yefremov via buildroot

From: Yegor Yefremov <[email protected]>

szip is not maintained upstream anymore: 2.1.1 is the last release, there is no public repository, and the source is only available from the HDF Group archive. Its license is not a standard open source one, and the HDF Group itself recommends libaec as a replacement.

The package also fails to build with GCC >= 15 on non-glibc toolchains, as only linux-gnu hosts get -ansi from szip's configure and the code relies on pre-C23 empty parameter lists:

rice.c:1323:15: error: too many arguments to function 'winner_ref_function'; expected 0, have 2

libaec provides libsz, a drop-in replacement with the same API and soname, so select it through the legacy option.

Fixes:
https://autobuild.buildroot.org/results/5e400d0e13480c58e8b1b0178bf7e5537dd31751

Assisted-by Claude:claude-opus-5-5
---
 Config.in.legacy       |  9 +++++++++
 DEVELOPERS             |  3 ---
 package/Config.in      |  1 -
 package/szip/Config.in | 16 ----------------
 package/szip/szip.hash |  3 ---
 package/szip/szip.mk   | 13 -------------
 6 files changed, 9 insertions(+), 36 deletions(-)
 delete mode 100644 package/szip/Config.in
 delete mode 100644 package/szip/szip.hash
 delete mode 100644 package/szip/szip.mk
Config.in.legacy +9 -0
index 9ba6ab243e..07d6a7b2f1 100644
@@ -146,6 +146,15 @@ endif
 
 comment "Legacy options removed in 2026.11"
 
+config BR2_PACKAGE_SZIP
+	bool "szip has been removed"
+	select BR2_LEGACY
+	select BR2_PACKAGE_LIBAEC
+	help
+	  The szip package has been removed, as it is no longer
+	  maintained upstream. libaec, which provides a drop-in
+	  replacement libsz library, has been selected instead.
+
 config BR2_PACKAGE_PYTHON3_2TO3
 	bool "python module 2to3 has been removed"
 	select BR2_LEGACY
DEVELOPERS +0 -3
index bde955ec6a..d96fb11051 100644
@@ -974,9 +974,6 @@ F:	package/imx-mkimage/
 N:	Erik Stromdahl <[email protected]>
 F:	package/mxsldr/
 
-N:	Ernesto L. Williams Jr <[email protected]>
-F:	package/szip/
-
 N:	Esben Haabendal <[email protected]>
 F:	package/python-kiwisolver/
 
package/Config.in +0 -1
index 0585bacccf..2a0c59b90f 100644
@@ -1630,7 +1630,6 @@ menu "Compression and decompression"
 	source "package/minizip/Config.in"
 	source "package/minizip-zlib/Config.in"
 	source "package/snappy/Config.in"
-	source "package/szip/Config.in"
 	source "package/zchunk/Config.in"
 	source "package/zlib/Config.in"
 	source "package/zziplib/Config.in"
package/szip/Config.in deleted +0 -16
deleted file mode 100644
index 5a24362f29..0000000000
@@ -1,16 +0,0 @@
-config BR2_PACKAGE_SZIP
-	bool "szip"
-	help
-	  Szip is an implementation of the extended-Rice lossless
-	  compression algorithm.
-
-	  The Consultative Committee on Space Data Systems (CCSDS) has
-	  adopted the extended-Rice algorithm for international
-	  standards for space applications[1,6,7]. Szip is reported to
-	  provide fast and effective compression, specifically for the
-	  EOS data generated by the NASA Earth Observatory System
-	  (EOS)[1]. It was originally developed at University of New
-	  Mexico (UNM) and integrated with HDF4 by UNM researchers and
-	  developers.
-
-	  http://www.hdfgroup.org/doc_resource/SZIP
package/szip/szip.hash deleted +0 -3
deleted file mode 100644
index 5d3ee042f9..0000000000
@@ -1,3 +0,0 @@
-# Locally computed
-sha256  21ee958b4f2d4be2c9cabfa5e1a94877043609ce86fde5f286f105f7ff84d412  szip-2.1.1.tar.gz
-sha256  98cc66747133b26563fefc4630ad4c8c7848c722c7b8a60ecd4afbc4c7d7eb01  COPYING
package/szip/szip.mk deleted +0 -13
deleted file mode 100644
index 869fc9c358..0000000000
@@ -1,13 +0,0 @@
-################################################################################
-#
-# szip
-#
-################################################################################
-
-SZIP_VERSION = 2.1.1
-SZIP_SITE = https://docs.hdfgroup.org/archive/support/ftp/lib-external/szip/$(SZIP_VERSION)/src
-SZIP_LICENSE = szip license
-SZIP_LICENSE_FILES = COPYING
-SZIP_INSTALL_STAGING = YES
-
-$(eval $(autotools-package))
Signature · 6 lines
2.34.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#3 lore raw
In reply to Yegor Yefremov via buildroot
Quoted 3 lines · Yegor Yefremov via buildroot

Yegor Yefremov (2):
package/libaec: new package
package/szip: remove package

Thanks, series applied!

Thomas

Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot