Bug#984439: Maybe related issue ...

Gianfranco Costamagna locutusofborg at debian.org
Fri Apr 2 13:16:16 BST 2021


control: tags -1 patch pending

Hello, a proper upstream fix is in deferred/2 (and attached)

G.

On Thu, 1 Apr 2021 08:34:32 +0200 Gianfranco Costamagna <locutusofborg at debian.org> wrote:
> Hello,
> In Ubuntu I uploaded this ugly workaround for armhf
> 
> diff -pruN 6.2.2006+really6.2.1905+dfsg-2/debian/changelog 6.2.2006+really6.2.1905+dfsg-2ubuntu1/debian/changelog
> --- 6.2.2006+really6.2.1905+dfsg-2/debian/changelog	2020-12-21 20:21:12.000000000 +0000
> +++ 6.2.2006+really6.2.1905+dfsg-2ubuntu1/debian/changelog	2021-03-17 09:27:28.000000000 +0000
> @@ -1,3 +1,12 @@
> +netgen (6.2.2006+really6.2.1905+dfsg-2ubuntu1) hirsute; urgency=medium
> +
> +  * Ignore test results on armhf. They failed since the begin, but testsuite
> +    was not ran, and they are already being worked/looked by upstream and
> +    Debian. They fail when armhf is ran on arm64 kernel, leading to unaligned
> +    accesses. See Debian bug #984439 and LP bug: #1919335
> +
> + -- Gianfranco Costamagna <locutusofborg at debian.org>  Wed, 17 Mar 2021 10:27:28 +0100
> +
>  netgen (6.2.2006+really6.2.1905+dfsg-2) unstable; urgency=medium
>  
>    [ Christophe Trophime ]
> diff -pruN 6.2.2006+really6.2.1905+dfsg-2/debian/rules 6.2.2006+really6.2.1905+dfsg-2ubuntu1/debian/rules
> --- 6.2.2006+really6.2.1905+dfsg-2/debian/rules	2020-12-21 20:21:06.000000000 +0000
> +++ 6.2.2006+really6.2.1905+dfsg-2ubuntu1/debian/rules	2021-03-17 09:27:28.000000000 +0000
> @@ -44,10 +44,17 @@ override_dh_auto_configure:
>  
>  override_dh_auto_test:
>  	dh_auto_install
> +ifeq ($(DEB_HOST_ARCH),armhf)
> +	cd tests/pytest && \
> +          PYTHONPATH=$(CURDIR)/debian/tmp/usr/lib/python3/dist-packages \
> +          LD_LIBRARY_PATH=$(CURDIR)/debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH) \
> +          python3 -m pytest || true
> +else
>  	cd tests/pytest && \
>            PYTHONPATH=$(CURDIR)/debian/tmp/usr/lib/python3/dist-packages \
>            LD_LIBRARY_PATH=$(CURDIR)/debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH) \
>            python3 -m pytest
> +endif
>  
>  override_dh_shlibdeps:
>  	dh_shlibdeps -l/usr/lib/${DEB_HOST_MULTIARCH}/netgen
> 
> Do you think its worth a Debian upload too?
> 
> Gianfranco
> 
> 
-------------- next part --------------
diff -Nru netgen-6.2.2006+really6.2.1905+dfsg/debian/changelog netgen-6.2.2006+really6.2.1905+dfsg/debian/changelog
--- netgen-6.2.2006+really6.2.1905+dfsg/debian/changelog	2020-12-21 21:21:12.000000000 +0100
+++ netgen-6.2.2006+really6.2.1905+dfsg/debian/changelog	2021-04-02 14:05:03.000000000 +0200
@@ -1,3 +1,11 @@
+netgen (6.2.2006+really6.2.1905+dfsg-2.1) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * debian/patches/4fad6e0631718a4bb574d67505e0ebfef1f171ce.patch:
+    - upstream fix for armhf build failure (Closes: #984439)
+
+ -- Gianfranco Costamagna <locutusofborg at debian.org>  Fri, 02 Apr 2021 14:05:03 +0200
+
 netgen (6.2.2006+really6.2.1905+dfsg-2) unstable; urgency=medium
 
   [ Christophe Trophime ]
diff -Nru netgen-6.2.2006+really6.2.1905+dfsg/debian/patches/4fad6e0631718a4bb574d67505e0ebfef1f171ce.patch netgen-6.2.2006+really6.2.1905+dfsg/debian/patches/4fad6e0631718a4bb574d67505e0ebfef1f171ce.patch
--- netgen-6.2.2006+really6.2.1905+dfsg/debian/patches/4fad6e0631718a4bb574d67505e0ebfef1f171ce.patch	1970-01-01 01:00:00.000000000 +0100
+++ netgen-6.2.2006+really6.2.1905+dfsg/debian/patches/4fad6e0631718a4bb574d67505e0ebfef1f171ce.patch	2021-04-02 14:04:14.000000000 +0200
@@ -0,0 +1,58 @@
+From 4fad6e0631718a4bb574d67505e0ebfef1f171ce Mon Sep 17 00:00:00 2001
+From: Christopher Lackner <clackner at cerbsim.com>
+Date: Thu, 1 Apr 2021 10:48:13 +0200
+Subject: [PATCH] fix pickling on arm, store long type platform independent
+
+---
+ libsrc/core/archive.hpp | 20 ++++++++++++++------
+ 1 file changed, 14 insertions(+), 6 deletions(-)
+
+diff --git a/libsrc/core/archive.hpp b/libsrc/core/archive.hpp
+index 430262bf..decf8718 100644
+--- a/libsrc/core/archive.hpp
++++ b/libsrc/core/archive.hpp
+@@ -684,7 +684,11 @@ namespace ngcore
+     Archive & operator & (short & i) override
+     { return Write(i); }
+     Archive & operator & (long & i) override
+-    { return Write(i); }
++    {
++      // for platform independence
++      int64_t tmp = i;
++      return Write(tmp);
++    }
+     Archive & operator & (size_t & i) override
+     { return Write(i); }
+     Archive & operator & (unsigned char & i) override
+@@ -722,14 +726,13 @@ namespace ngcore
+     template <typename T>
+     Archive & Write (T x)
+     {
++      static_assert(sizeof(T) < BUFFERSIZE, "Cannot write large types with this function!");
+       if (unlikely(ptr > BUFFERSIZE-sizeof(T)))
+         {
+           stream->write(&buffer[0], ptr);
+-          *reinterpret_cast<T*>(&buffer[0]) = x; // NOLINT
+-          ptr = sizeof(T);
+-          return *this;
++          ptr = 0;
+         }
+-      *reinterpret_cast<T*>(&buffer[ptr]) = x; // NOLINT
++      memcpy(&buffer[ptr], &x, sizeof(T));
+       ptr += sizeof(T);
+       return *this;
+     }
+@@ -755,7 +758,12 @@ namespace ngcore
+     Archive & operator & (short & i) override
+     { Read(i); return *this; }
+     Archive & operator & (long & i) override
+-    { Read(i); return *this; }
++    {
++      int64_t tmp;
++      Read(tmp);
++      i = tmp;
++      return *this;
++    }
+     Archive & operator & (size_t & i) override
+     { Read(i); return *this; }
+     Archive & operator & (unsigned char & i) override
diff -Nru netgen-6.2.2006+really6.2.1905+dfsg/debian/patches/series netgen-6.2.2006+really6.2.1905+dfsg/debian/patches/series
--- netgen-6.2.2006+really6.2.1905+dfsg/debian/patches/series	2020-12-21 19:36:32.000000000 +0100
+++ netgen-6.2.2006+really6.2.1905+dfsg/debian/patches/series	2021-04-02 13:35:15.000000000 +0200
@@ -6,3 +6,4 @@
 add-sse-guard.patch
 remove-togl.patch
 fix-version.patch
+4fad6e0631718a4bb574d67505e0ebfef1f171ce.patch


More information about the debian-science-maintainers mailing list