Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/2] package/snappy: bump to version 1.2.1
@ 2024-06-11 17:17 Dario Binacchi
  2024-06-11 17:17 ` [Buildroot] [PATCH 2/2] package/snappy: fix compilation error raised by vqtbl1q_u8 instruction Dario Binacchi
  0 siblings, 1 reply; 3+ messages in thread
From: Dario Binacchi @ 2024-06-11 17:17 UTC (permalink / raw)
  To: buildroot; +Cc: Dario Binacchi, linux-amarula, Yann E . MORIN

Release notes:
https://github.com/google/snappy/releases/tag/1.2.1
https://github.com/google/snappy/releases/tag/1.2.0

Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
---
 package/snappy/snappy.hash | 2 +-
 package/snappy/snappy.mk   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/package/snappy/snappy.hash b/package/snappy/snappy.hash
index 729d696d7e62..0439ca8a7ef2 100644
--- a/package/snappy/snappy.hash
+++ b/package/snappy/snappy.hash
@@ -1,3 +1,3 @@
 # Locally calculated
-sha256  49d831bffcc5f3d01482340fe5af59852ca2fe76c3e05df0e67203ebbe0f1d90  snappy-1.1.10.tar.gz
+sha256  736aeb64d86566d2236ddffa2865ee5d7a82d26c9016b36218fcc27ea4f09f86  snappy-1.2.1.tar.gz
 sha256  55172044f7e241207117448a4d9d6ba1d0925c8ad66b5d4c08c70adfa9cc3de6  COPYING
diff --git a/package/snappy/snappy.mk b/package/snappy/snappy.mk
index c96dff35fa01..21c76cd50da2 100644
--- a/package/snappy/snappy.mk
+++ b/package/snappy/snappy.mk
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-SNAPPY_VERSION = 1.1.10
+SNAPPY_VERSION = 1.2.1
 SNAPPY_SITE = $(call github,google,snappy,$(SNAPPY_VERSION))
 SNAPPY_LICENSE = BSD-3-Clause
 SNAPPY_LICENSE_FILES = COPYING
-- 
2.43.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [Buildroot] [PATCH 2/2] package/snappy: fix compilation error raised by vqtbl1q_u8 instruction
  2024-06-11 17:17 [Buildroot] [PATCH 1/2] package/snappy: bump to version 1.2.1 Dario Binacchi
@ 2024-06-11 17:17 ` Dario Binacchi
  2024-07-10 12:37   ` Thomas Petazzoni via buildroot
  0 siblings, 1 reply; 3+ messages in thread
From: Dario Binacchi @ 2024-06-11 17:17 UTC (permalink / raw)
  To: buildroot; +Cc: Dario Binacchi, linux-amarula, Yann E . MORIN

The package compilation for the raspberrypi3_qt5we_defconfig raises the
following error:

In file included from buildroot/output/build/snappy-1.2.1/snappy.cc:29:
buildroot/output/build/snappy-1.2.1/snappy-internal.h: In function ‘snappy::internal::V128 snappy::internal::V128_Shuffle(V128, V128)’:
buildroot/output/build/snappy-1.2.1/snappy-internal.h:109:10: error: ‘vqtbl1q_u8’ was not declared in this scope; did you mean ‘vtbl1_u8’?
  109 |   return vqtbl1q_u8(input, shuffle_mask);
      |          ^~~~~~~~~~
      |          vtbl1_u8
make[4]: *** [CMakeFiles/snappy.dir/build.make:118: CMakeFiles/snappy.dir/snappy.cc.o] Error 1

The added patch fixes the error.

Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
---
 ...error-raised-by-vqtbl1q_u8-instructi.patch | 52 +++++++++++++++++++
 1 file changed, 52 insertions(+)
 create mode 100644 package/snappy/0001-Fix-compilation-error-raised-by-vqtbl1q_u8-instructi.patch

diff --git a/package/snappy/0001-Fix-compilation-error-raised-by-vqtbl1q_u8-instructi.patch b/package/snappy/0001-Fix-compilation-error-raised-by-vqtbl1q_u8-instructi.patch
new file mode 100644
index 000000000000..b10ea7ecdfbe
--- /dev/null
+++ b/package/snappy/0001-Fix-compilation-error-raised-by-vqtbl1q_u8-instructi.patch
@@ -0,0 +1,52 @@
+From 284d5a6f267d4962b2b88540f218c10740a6c053 Mon Sep 17 00:00:00 2001
+From: Dario Binacchi <dario.binacchi@amarulasolutions.com>
+Date: Sat, 8 Jun 2024 18:42:16 +0200
+Subject: [PATCH] Fix compilation error raised by vqtbl1q_u8 instruction
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+The compilation in Buildroot for the raspberrypi3_qt5we_defconfig
+configuration:
+
+make raspberrypi3_qt5we_defconfig
+make
+
+raises the following error:
+
+In file included from buildroot/output/build/snappy-1.2.1/snappy.cc:29:
+buildroot/output/build/snappy-1.2.1/snappy-internal.h: In function ‘snappy::internal::V128 snappy::internal::V128_Shuffle(V128, V128)’:
+buildroot/output/build/snappy-1.2.1/snappy-internal.h:109:10: error: ‘vqtbl1q_u8’ was not declared in this scope; did you mean ‘vtbl1_u8’?
+  109 |   return vqtbl1q_u8(input, shuffle_mask);
+      |          ^~~~~~~~~~
+      |          vtbl1_u8
+make[4]: *** [CMakeFiles/snappy.dir/build.make:118: CMakeFiles/snappy.dir/snappy.cc.o] Error 1
+
+As reported by [1], the vqtbl1q_u8 instruction is supported by A64
+architectures. For this reason, the patch enables the use of the
+instruction only for NEON of such architecture.
+
+[1] https://developer.arm.com/architectures/instruction-sets/intrinsics/vqtbl1q_u8
+
+Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
+Upstream: https://github.com/google/snappy/pull/185
+---
+ snappy-internal.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/snappy-internal.h b/snappy-internal.h
+index ae78247dbbc9..256d32344d1a 100644
+--- a/snappy-internal.h
++++ b/snappy-internal.h
+@@ -46,7 +46,7 @@
+ #include <arm_neon.h>
+ #endif
+ 
+-#if SNAPPY_HAVE_SSSE3 || SNAPPY_HAVE_NEON
++#if SNAPPY_HAVE_SSSE3 || (SNAPPY_HAVE_NEON && defined(__aarch64__))
+ #define SNAPPY_HAVE_VECTOR_BYTE_SHUFFLE 1
+ #else
+ #define SNAPPY_HAVE_VECTOR_BYTE_SHUFFLE 0
+-- 
+2.43.0
+
-- 
2.43.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [Buildroot] [PATCH 2/2] package/snappy: fix compilation error raised by vqtbl1q_u8 instruction
  2024-06-11 17:17 ` [Buildroot] [PATCH 2/2] package/snappy: fix compilation error raised by vqtbl1q_u8 instruction Dario Binacchi
@ 2024-07-10 12:37   ` Thomas Petazzoni via buildroot
  0 siblings, 0 replies; 3+ messages in thread
From: Thomas Petazzoni via buildroot @ 2024-07-10 12:37 UTC (permalink / raw)
  To: Dario Binacchi; +Cc: linux-amarula, Yann E . MORIN, buildroot

Hello Dario,

On Tue, 11 Jun 2024 19:17:14 +0200
Dario Binacchi <dario.binacchi@amarulasolutions.com> wrote:

> The package compilation for the raspberrypi3_qt5we_defconfig raises the
> following error:
> 
> In file included from buildroot/output/build/snappy-1.2.1/snappy.cc:29:
> buildroot/output/build/snappy-1.2.1/snappy-internal.h: In function ‘snappy::internal::V128 snappy::internal::V128_Shuffle(V128, V128)’:
> buildroot/output/build/snappy-1.2.1/snappy-internal.h:109:10: error: ‘vqtbl1q_u8’ was not declared in this scope; did you mean ‘vtbl1_u8’?
>   109 |   return vqtbl1q_u8(input, shuffle_mask);
>       |          ^~~~~~~~~~
>       |          vtbl1_u8
> make[4]: *** [CMakeFiles/snappy.dir/build.make:118: CMakeFiles/snappy.dir/snappy.cc.o] Error 1
> 
> The added patch fixes the error.
> 
> Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>

Thanks for this patch and the related investigation. However, there is
an issue in how this fix is articulated with your version bump in PATCH
1/2. Indeed there are two possibilities:

- The build error with the NEON instruction is introduced by the bump
  to version 1.2.1. In this case, the patch fixing the build error
  should be in the patch doing the bump.

- The build error with the NEON instruction already exists in the
  currently packaged 1.1.10 version of snappy. In that case, the patch
  fixing the issue should come *before* the version bump in your
  series, and should indicate *when* the build error was introduced, so
  that we know if the fix should be backported to Buildroot LTS
  branches.

Could you have a look into this?

Thanks a lot!

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-07-10 12:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-11 17:17 [Buildroot] [PATCH 1/2] package/snappy: bump to version 1.2.1 Dario Binacchi
2024-06-11 17:17 ` [Buildroot] [PATCH 2/2] package/snappy: fix compilation error raised by vqtbl1q_u8 instruction Dario Binacchi
2024-07-10 12:37   ` Thomas Petazzoni via buildroot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox