Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package netgen for openSUSE:Factory checked in at 2022-01-28 22:12:40 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/netgen (Old) and /work/SRC/openSUSE:Factory/.netgen.new.1898 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "netgen" Fri Jan 28 22:12:40 2022 rev:4 rq:949653 version:6.2.2105 Changes: -------- --- /work/SRC/openSUSE:Factory/netgen/netgen.changes 2021-05-11 23:04:33.536848601 +0200 +++ /work/SRC/openSUSE:Factory/.netgen.new.1898/netgen.changes 2022-01-28 22:13:24.602531137 +0100 @@ -1,0 +2,11 @@ +Thu Jan 27 10:38:09 UTC 2022 - Stefan Br??ns <[email protected]> + +- update to version 6.2.2105 + * no changelog provided +- Drop upstream 0001-Fix-GetTimeCounter-for-Aarch64-variants.patch +- Add patches: + * 0001-Optionally-prefer-system-wide-pybind11.patch + * 0001-Throw-Exception-when-shape-has-invalid-type.patch + * 0001-Fix-signedness-for-ARM-Neon-mask-type.patch + +------------------------------------------------------------------- Old: ---- 0001-Fix-GetTimeCounter-for-Aarch64-variants.patch _service netgen-6.2.2101.obscpio netgen.obsinfo New: ---- 0001-Fix-signedness-for-ARM-Neon-mask-type.patch 0001-Optionally-prefer-system-wide-pybind11.patch 0001-Throw-Exception-when-shape-has-invalid-type.patch netgen-6.2.2105.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ netgen.spec ++++++ --- /var/tmp/diff_new_pack.CBq5NR/_old 2022-01-28 22:13:25.386525772 +0100 +++ /var/tmp/diff_new_pack.CBq5NR/_new 2022-01-28 22:13:25.394525718 +0100 @@ -1,7 +1,7 @@ # # spec file for package netgen # -# Copyright (c) 2021 SUSE LLC +# Copyright (c) 2022 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -24,25 +24,31 @@ %bcond_with pytest Name: netgen -Version: 6.2.2101 +Version: 6.2.2105 Release: 0 Summary: Automatic 3D tetrahedral mesh generator License: LGPL-2.1-only Group: Productivity/Graphics/CAD URL: https://ngsolve.org/ -Source0: netgen-%{version}.tar.xz -# PATCH-FIX-OPENSUSE +Source0: https://github.com/NGSolve/netgen/archive/refs/tags/v%{version}.tar.gz#/netgen-%{version}.tar.gz +# PATCH-FIX-UPSTREAM Patch0: 0001-Set-explicit-OBJECT-library-type-for-internal-togl.patch # PATCH-FIX-OPENSUSE Patch1: 0001-Disable-backtrace-generation.patch -# PATCH-FIX-OPENSUSE +# PATCH-FIX-UPSTREAM Patch2: 0001-Throw-in-case-enum-value-is-unhandled.patch -# PATCH-FIX-OPENSUSE -Patch3: 0001-Fix-GetTimeCounter-for-Aarch64-variants.patch +# PATCH-FIX-UPSTREAM +Patch3: 0001-Throw-Exception-when-shape-has-invalid-type.patch # PATCH-FIX-OPENSUSE -- Allow to disable download of Catch2 Patch4: 0001-Optionally-use-system-provided-Catch2.patch +# PATCH-FIX-UPSTREAM +Patch5: 0001-Optionally-prefer-system-wide-pybind11.patch +# PATCH-FIX-UPSTREAM +Patch6: 0001-Fix-signedness-for-ARM-Neon-mask-type.patch %if %{with opencascade} BuildRequires: occt-devel +BuildRequires: pkgconfig(fontconfig) +BuildRequires: pkgconfig(xi) %endif BuildRequires: cmake BuildRequires: fdupes @@ -136,7 +142,6 @@ %description -n python3-%{name} Python bindings for NETGEN. - %prep %autosetup -p1 @@ -153,6 +158,7 @@ # Do not error out on undefined symbols - there is a circular dependency # between libvisual and libmesh ... %cmake \ + -DOpenGL_GL_PREFERENCE=GLVND \ -DUSE_SUPERBUILD=OFF \ -DCMAKE_SHARED_LINKER_FLAGS="-flto=auto -Wl,--as-needed -Wl,--warn-unresolved-symbols -Wl,-z,now" \ -DNG_INSTALL_DIR_INCLUDE=%{_includedir}/netgen \ ++++++ 0001-Fix-signedness-for-ARM-Neon-mask-type.patch ++++++ >From 5fce0b48b8691c4b359ec56c792087d33a9e4b81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Br=C3=BCns?= <[email protected]> Date: Thu, 27 Jan 2022 12:40:39 +0100 Subject: [PATCH] Fix signedness for ARM Neon mask type vbslq_f64 and vandq_u64 both require uint64x2_t types as mask arguments, and the Neon intrinsics do not allow for implicit conversion. Fixes build errors with current GCC 11.2.1: /home/abuild/rpmbuild/BUILD/netgen-6.2.2105/libsrc/core/simd_arm64.hpp:171:29: error: cannot convert '__Int64x2_t' to 'uint64x2_t' 171 | return vandq_u64 (a.Data(), b.Data()); --- libsrc/core/simd_arm64.hpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/libsrc/core/simd_arm64.hpp b/libsrc/core/simd_arm64.hpp index f2572d34..bcc0bb1d 100644 --- a/libsrc/core/simd_arm64.hpp +++ b/libsrc/core/simd_arm64.hpp @@ -14,9 +14,10 @@ namespace ngcore mask[1] = i > 1 ? -1 : 0; } - SIMD (bool i0, bool i1) { mask[0] = i0 ? -1:0; mask[1] = i1 ? -1 : 0; } + SIMD (bool i0, bool i1) { mask[0] = i0 ? -1 : 0; mask[1] = i1 ? -1 : 0; } SIMD (SIMD<mask64,1> i0, SIMD<mask64,1> i1) { mask[0] = i0[0]; mask[1] = i1[0]; } - SIMD (float64x2_t _data) : mask{_data} { } + // SIMD (float64x2_t _data) : mask{_data} { } + SIMD (int64x2_t _data) : mask{_data} { } auto Data() const { return mask; } static constexpr int Size() { return 2; } // static NETGEN_INLINE SIMD<mask64, 2> GetMaskFromBits (unsigned int i); @@ -159,7 +160,8 @@ namespace ngcore NETGEN_INLINE SIMD<double,2> If (SIMD<mask64,2> a, SIMD<double,2> b, SIMD<double,2> c) { // return { a[0] ? b[0] : c[0], a[1] ? b[1] : c[1] }; - return vbslq_f64(a.Data(), b.Data(), c.Data()); + uint64x2_t mask = vreinterpretq_u64_s64(a.Data()); + return vbslq_f64(mask, b.Data(), c.Data()); } NETGEN_INLINE SIMD<int64_t,2> If (SIMD<mask64,2> a, SIMD<int64_t,2> b, SIMD<int64_t,2> c) { @@ -168,7 +170,10 @@ namespace ngcore NETGEN_INLINE SIMD<mask64,2> operator&& (SIMD<mask64,2> a, SIMD<mask64,2> b) { - return vandq_u64 (a.Data(), b.Data()); + uint64x2_t m1 = vreinterpretq_u64_s64(a.Data()); + uint64x2_t m2 = vreinterpretq_u64_s64(b.Data()); + uint64x2_t res = vandq_u64 (m1, m2); + return vreinterpretq_s64_u64(res); } } -- 2.34.1 ++++++ 0001-Optionally-prefer-system-wide-pybind11.patch ++++++ >From 3892ddbfa204e61822b87ff2e01ae99035aa09ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Br=C3=BCns?= <[email protected]> Date: Thu, 27 Jan 2022 08:45:02 +0100 Subject: [PATCH] Optionally prefer system wide pybind11 Linux distributions typically prefer system provided libraries, so optionally use it when found. (This also allows to use the github provided tarball, which omits the pybind11 submodule). Fix the PYBIND_INCLUDE_DIR usage: - remove misleading find_path invocation, which may point to the system wide pybind11 - use pybind11_INCLUDE_DIR which is provided by both find_package(pybind11) and bundled pybind11/CMakeLists.txt - pybind11_INCLUDE_DIR is used by pybind11_add_module, use it also for ngcore (core/register_archive.hpp) --- CMakeLists.txt | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index dcc24afa..3519d831 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -9,10 +9,12 @@ else(WIN32) cmake_minimum_required(VERSION 3.8) endif(WIN32) +include (CMakeDependentOption) option( USE_NATIVE_ARCH "build for native cpu architecture" ON) option( USE_GUI "don't build netgen with GUI" ON ) option( USE_PYTHON "build with python interface" ON ) +cmake_dependent_option( PREFER_SYSTEM_PYBIND11 "Use system wide PyBind11" ON "USE_PYTHON" OFF) option( USE_MPI "enable mpi parallelization" OFF ) option( USE_MPI4PY "enable mpi4py interface" ON ) option( USE_OCC "(not supported) compile with OpenCascade geometry kernel" OFF) @@ -268,23 +270,29 @@ else() endif() if (USE_PYTHON) - add_subdirectory(external_dependencies/pybind11) - find_path(PYBIND_INCLUDE_DIR pybind11/pybind11.h HINTS ${PYTHON_INCLUDE_DIR}) - if( PYBIND_INCLUDE_DIR ) - message(STATUS "Found Pybind11: ${PYBIND_INCLUDE_DIR}") - else( PYBIND_INCLUDE_DIR ) + if (PREFER_SYSTEM_PYBIND11) + find_package(pybind11 CONFIG) + endif() + if (pybind11_FOUND) + set(NG_INSTALL_PYBIND OFF) + else() + add_subdirectory(external_dependencies/pybind11) + endif() + if (pybind11_INCLUDE_DIR) + message(STATUS "Found Pybind11: ${pybind11_INCLUDE_DIR}") + else() message(FATAL_ERROR "Could NOT find pybind11!") - endif( PYBIND_INCLUDE_DIR ) + endif() - target_include_directories(netgen_python INTERFACE ${PYBIND_INCLUDE_DIR} ${PYTHON_INCLUDE_DIRS}) + target_include_directories(netgen_python INTERFACE ${pybind11_INCLUDE_DIR} ${PYTHON_INCLUDE_DIRS}) if(NOT ${BUILD_FOR_CONDA}) # Don't link python libraries in conda environments - target_link_libraries(netgen_python INTERFACE ${PYTHON_LIBRARIES}) + target_link_libraries(netgen_python INTERFACE ${PYTHON_LIBRARIES}) endif() if(NG_INSTALL_PYBIND) - install(DIRECTORY ${PYBIND_INCLUDE_DIR}/pybind11 DESTINATION ${NG_INSTALL_DIR_INCLUDE} COMPONENT netgen_devel) - install(FILES ${PYBIND_INCLUDE_DIR}/../LICENSE DESTINATION ${NG_INSTALL_DIR_INCLUDE}/pybind11 COMPONENT netgen_devel) + install(DIRECTORY ${pybind11_INCLUDE_DIR}/pybind11 DESTINATION ${NG_INSTALL_DIR_INCLUDE} COMPONENT netgen_devel) + install(FILES ${pybind11_INCLUDE_DIR}/../LICENSE DESTINATION ${NG_INSTALL_DIR_INCLUDE}/pybind11 COMPONENT netgen_devel) endif(NG_INSTALL_PYBIND) endif (USE_PYTHON) -- 2.34.1 ++++++ 0001-Throw-Exception-when-shape-has-invalid-type.patch ++++++ >From 54246e12ad48bc1dbd416b0b415a4a48b337c2f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Br=C3=BCns?= <[email protected]> Date: Thu, 27 Jan 2022 10:04:40 +0100 Subject: [PATCH] Throw Exception when shape has invalid type Although the switch statement handles all (current) allowed values, from a C/C++ view point the enum may have any value of its underlying type. In this case the function has no return statement and runs into undefined behavior. Fixes build failures when built with "-Werror=return-type". --- libsrc/occ/python_occ_shapes.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/libsrc/occ/python_occ_shapes.cpp b/libsrc/occ/python_occ_shapes.cpp index 91e94c50..cbb35178 100644 --- a/libsrc/occ/python_occ_shapes.cpp +++ b/libsrc/occ/python_occ_shapes.cpp @@ -194,6 +194,7 @@ py::object CastShape(const TopoDS_Shape & s) case TopAbs_SHAPE: return py::cast(s); } + throw Exception("Invalid Shape type"); }; -- 2.34.1 ++++++ 0001-Throw-in-case-enum-value-is-unhandled.patch ++++++ --- /var/tmp/diff_new_pack.CBq5NR/_old 2022-01-28 22:13:25.466525225 +0100 +++ /var/tmp/diff_new_pack.CBq5NR/_new 2022-01-28 22:13:25.470525198 +0100 @@ -4,41 +4,38 @@ Subject: [PATCH] Throw in case enum value is unhandled --- - libsrc/csg/solid.cpp | 6 ++++++ - 1 file changed, 6 insertions(+) + libsrc/csg/solid.cpp | 3 +++ + 1 file changed, 3 insertions(+) diff --git a/libsrc/csg/solid.cpp b/libsrc/csg/solid.cpp -index 52bd6321..035e654c 100644 +index 52bd6321..a0ae3b0b 100644 --- a/libsrc/csg/solid.cpp +++ b/libsrc/csg/solid.cpp -@@ -193,6 +193,8 @@ namespace netgen - return Complement (s1->PointInSolid (p, eps)); +@@ -194,6 +194,7 @@ namespace netgen case ROOT: return s1->PointInSolid (p, eps); -+ default: -+ throw Exception("PointInSolid: invalid op"); } ++ throw Exception("PointInSolid: invalid op"); } -@@ -212,6 +214,8 @@ namespace netgen - return Complement (s1->VecInSolid (p, v, eps)); + +@@ -213,6 +214,7 @@ namespace netgen case ROOT: return s1->VecInSolid (p, v, eps); -+ default: -+ throw Exception("VecInSolid: invalid op"); } ++ throw Exception("VecInSolid: invalid op"); } -@@ -232,6 +236,8 @@ namespace netgen - return Complement (s1->VecInSolid2 (p, v1, v2, eps)); + // checks if lim s->0 lim t->0 p + t(v1 + s v2) in solid +@@ -233,6 +235,7 @@ namespace netgen case ROOT: return s1->VecInSolid2 (p, v1, v2, eps); -+ default: -+ throw Exception("VecInSolid2: invalid op"); } ++ throw Exception("VecInSolid2: invalid op"); } + -- -2.30.1 +2.34.1
