[PATCH] gnu: vtk: Update to 9.4.1

  • Open
  • quality assurance status badge
Details
4 participants
  • Cayetano Santos
  • Lars Bilke
  • Ludovic Courtès
  • Maxim Cournoyer
Owner
unassigned
Submitted by
Lars Bilke
Severity
normal

Debbugs page

Lars Bilke wrote 4 weeks ago
(address . guix-patches@gnu.org)(name . Lars Bilke)(address . lars.bilke@ufz.de)
e34dff8f8d9c329b0d79cbb6290962579dedb073.1739457494.git.lars.bilke@ufz.de
* gnu/packages/image-processing.scm (vtk): Update to 9.4.1.

Change-Id: Ife39df610c4487683a5c8d72b60eb750530c1358
---
gnu/packages/image-processing.scm | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)

Toggle diff (52 lines)
diff --git a/gnu/packages/image-processing.scm b/gnu/packages/image-processing.scm
index 20e188bd70..cf29bf22f5 100644
--- a/gnu/packages/image-processing.scm
+++ b/gnu/packages/image-processing.scm
@@ -323,7 +323,7 @@ (define-public opencolorio
(define-public vtk
(package
(name "vtk")
- (version "9.3.0")
+ (version "9.4.1")
(source (origin
(method url-fetch)
(uri (string-append "https://vtk.org/files/release/"
@@ -331,7 +331,7 @@ (define-public vtk
"/VTK-" version ".tar.gz"))
(sha256
(base32
- "1s8vd34nhrgnw1bf9zhfn062d53fwq3csjfwvm7lxcr5a8lvkizx"))
+ "0aa5pkw2xxzksl48ldbj3cq6r4y4mxvcpl66f64gkah2s34b0ly2"))
(modules '((guix build utils)))
(snippet
'(begin
@@ -341,7 +341,7 @@ (define-public vtk
(string-append "ThirdParty/" dir "/vtk" dir)))
;; pugixml depended upon unconditionally
'("doubleconversion" "eigen" "expat" "freetype" "gl2ps"
- "glew" "hdf5" "jpeg" "jsoncpp" "libharu" "libproj"
+ "hdf5" "jpeg" "jsoncpp" "libharu" "libproj"
"libxml2" "lz4" "netcdf" "ogg" "png" "sqlite" "theora"
"tiff" "zlib"))
(substitute* "IO/ExportPDF/vtkPDFContextDevice2D.cxx"
@@ -360,7 +360,6 @@ (define-public vtk
"-DVTK_MODULE_USE_EXTERNAL_VTK_expat=ON"
"-DVTK_MODULE_USE_EXTERNAL_VTK_freetype=ON"
"-DVTK_MODULE_USE_EXTERNAL_VTK_gl2ps=ON"
- "-DVTK_MODULE_USE_EXTERNAL_VTK_glew=ON"
"-DVTK_MODULE_USE_EXTERNAL_VTK_hdf5=ON"
"-DVTK_MODULE_USE_EXTERNAL_VTK_jpeg=ON"
"-DVTK_MODULE_USE_EXTERNAL_VTK_jsoncpp=ON"
@@ -380,7 +379,7 @@ (define-public vtk
"-DVTK_WRAP_PYTHON=ON"
"-DVTK_PYTHON_VERSION:STRING=3"
- "-DVTK_SMP_ENABLE_OPENNMP=ON"
+ "-DVTK_SMP_ENABLE_OPENMP=ON"
"-DVTK_SMP_ENABLE_TBB=ON"
"-DVTK_USE_MPI=ON"
#$@(if (target-riscv64?)

base-commit: bcce7f8fa8b821b76591b297f61d473c5972e397
--
2.46.1
Ludovic Courtès wrote 3 weeks ago
(name . Lars Bilke)(address . lars.bilke@ufz.de)(address . 76269@debbugs.gnu.org)
87pljfi31d.fsf@gnu.org
Hi Lars,

Lars Bilke <lars.bilke@ufz.de> skribis:

Toggle quote (4 lines)
> * gnu/packages/image-processing.scm (vtk): Update to 9.4.1.
>
> Change-Id: Ife39df610c4487683a5c8d72b60eb750530c1358

Apparently this breaks at least freecad:

Toggle snippet (13 lines)
cd /tmp/guix-build-freecad-1.0.0.drv-0/build/src/Mod/CAM && /gnu/store/2lxfijiqqljxdxr2ppqqrn5czkh4r1rq-cmake-minimal-3.24.2/bin/cmake -E copy /tmp/guix-build-freecad-1.0.0.drv-0/source/src/Mod/CAM/Path/Op/Util.py /tmp/guix-build-freecad-1.0.0.drv-0/build/Mod/CAM/Path/Op/Util.py
/tmp/guix-build-freecad-1.0.0.drv-0/source/src/3rdParty/salomesmesh/src/SMDS/SMDS_UnstructuredGrid.cpp: In member function ‘void SMDS_UnstructuredGrid::BuildLinks()’:
/tmp/guix-build-freecad-1.0.0.drv-0/source/src/3rdParty/salomesmesh/src/SMDS/SMDS_UnstructuredGrid.cpp:1030:25: error: no matching function for call to ‘vtkCellLinks::BuildLinks(SMDS_UnstructuredGrid*)’
1030 | GetLinks()->BuildLinks(this);
| ~~~~~~~~~~~~~~~~~~~~~~^~~~~~
In file included from /tmp/guix-build-freecad-1.0.0.drv-0/source/src/3rdParty/salomesmesh/inc/SMDS_UnstructuredGrid.hxx:30,
from /tmp/guix-build-freecad-1.0.0.drv-0/source/src/3rdParty/salomesmesh/src/SMDS/SMDS_UnstructuredGrid.cpp:20:
/gnu/store/gr8mwbl3zlx9hc4x9k5s9sgcy2kp4sr9-vtk-9.4.1/include/vtk-9.4/vtkCellLinks.h:64:8: note: candidate: ‘virtual void vtkCellLinks::BuildLinks()’
64 | void BuildLinks() override;
| ^~~~~~~~~~
/gnu/store/gr8mwbl3zlx9hc4x9k5s9sgcy2kp4sr9-vtk-9.4.1/include/vtk-9.4/vtkCellLinks.h:64:8: note: candidate expects 0 arguments, 1 provided

Could you take a look? (Perhaps the solution will be to retain the
previous version of VTK for use in packages like this one.)

More generally, could you test with:

guix build -P1 vtk@9.4.1 -P1 vtk@7

?

Dependent packages like ‘python-fenics-fiat’ are already broken, so it’s
“okay” to keep them broken.

Thanks,
Ludo’.
Lars Bilke wrote 2 weeks ago
[PATCH 1/2] gnu: vtk: Update to 9.4.1
(address . 76269@debbugs.gnu.org)(name . Lars Bilke)(address . lars.bilke@ufz.de)
3e8105e24f1159665cdf543f49e280f183cc3667.1740386410.git.lars.bilke@ufz.de
* gnu/packages/image-processing.scm (vtk): Update to 9.4.1.

Change-Id: Ife39df610c4487683a5c8d72b60eb750530c1358
---
gnu/packages/image-processing.scm | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)

Toggle diff (52 lines)
diff --git a/gnu/packages/image-processing.scm b/gnu/packages/image-processing.scm
index 405f90ca9a..a456d94863 100644
--- a/gnu/packages/image-processing.scm
+++ b/gnu/packages/image-processing.scm
@@ -323,7 +323,7 @@ (define-public opencolorio
(define-public vtk
(package
(name "vtk")
- (version "9.3.0")
+ (version "9.4.1")
(source (origin
(method url-fetch)
(uri (string-append "https://vtk.org/files/release/"
@@ -331,7 +331,7 @@ (define-public vtk
"/VTK-" version ".tar.gz"))
(sha256
(base32
- "1s8vd34nhrgnw1bf9zhfn062d53fwq3csjfwvm7lxcr5a8lvkizx"))
+ "0aa5pkw2xxzksl48ldbj3cq6r4y4mxvcpl66f64gkah2s34b0ly2"))
(modules '((guix build utils)))
(snippet
'(begin
@@ -341,7 +341,7 @@ (define-public vtk
(string-append "ThirdParty/" dir "/vtk" dir)))
;; pugixml depended upon unconditionally
'("doubleconversion" "eigen" "expat" "freetype" "gl2ps"
- "glew" "hdf5" "jpeg" "jsoncpp" "libharu" "libproj"
+ "hdf5" "jpeg" "jsoncpp" "libharu" "libproj"
"libxml2" "lz4" "netcdf" "ogg" "png" "sqlite" "theora"
"tiff" "zlib"))
(substitute* "IO/ExportPDF/vtkPDFContextDevice2D.cxx"
@@ -360,7 +360,6 @@ (define-public vtk
"-DVTK_MODULE_USE_EXTERNAL_VTK_expat=ON"
"-DVTK_MODULE_USE_EXTERNAL_VTK_freetype=ON"
"-DVTK_MODULE_USE_EXTERNAL_VTK_gl2ps=ON"
- "-DVTK_MODULE_USE_EXTERNAL_VTK_glew=ON"
"-DVTK_MODULE_USE_EXTERNAL_VTK_hdf5=ON"
"-DVTK_MODULE_USE_EXTERNAL_VTK_jpeg=ON"
"-DVTK_MODULE_USE_EXTERNAL_VTK_jsoncpp=ON"
@@ -380,7 +379,7 @@ (define-public vtk
"-DVTK_WRAP_PYTHON=ON"
"-DVTK_PYTHON_VERSION:STRING=3"
- "-DVTK_SMP_ENABLE_OPENNMP=ON"
+ "-DVTK_SMP_ENABLE_OPENMP=ON"
"-DVTK_SMP_ENABLE_TBB=ON"
"-DVTK_USE_MPI=ON"
#$@(if (target-riscv64?)

base-commit: c4fcf8fb627c9ea54a4a639a81766e5df3973fdc
--
2.46.1
Lars Bilke wrote 2 weeks ago
[PATCH 2/2] gnu: freecad: Add vtk 9.4.1 patch.
(address . 76269@debbugs.gnu.org)(name . Lars Bilke)(address . lars.bilke@ufz.de)
952e5c6ef995a8e47e6b99355d7bd2c34f3f1ea5.1740386410.git.lars.bilke@ufz.de
* gnu/packages/engineering.scm (freecad): Add vtk 9.4.1 patch.
* gnu/local.mk: Add freecad vtk 9.4.1 patch to list.

Change-Id: I9220aec757c2331a2dfa3eee9d0b84f774785de3
---
gnu/local.mk | 1 +
gnu/packages/engineering.scm | 1 +
gnu/packages/patches/freecad-vtk941.patch | 71 +++++++++++++++++++++++
3 files changed, 73 insertions(+)
create mode 100644 gnu/packages/patches/freecad-vtk941.patch

Toggle diff (104 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index 45a9cb635e..35e1b5e6b6 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1317,6 +1317,7 @@ dist_patch_DATA = \
%D%/packages/patches/fpc-reproducibility.patch \
%D%/packages/patches/fpc-glibc-2.34-compat.patch \
%D%/packages/patches/fpm-newer-clamp-fix.patch \
+ %D%/packages/patches/freecad-vtk941.patch \
%D%/packages/patches/freedict-tools-fix-determinism.patch \
%D%/packages/patches/freedink-engine-fix-sdl-hints.patch \
%D%/packages/patches/freeimage-libtiff-compat.patch \
diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
index 234f4a2b03..d4d920cd08 100644
--- a/gnu/packages/engineering.scm
+++ b/gnu/packages/engineering.scm
@@ -3173,6 +3173,7 @@ (define-public freecad
(file-name (git-file-name name version))
(sha256
(base32 "0wwymcfgi0cybj7m6awflk8c7n6iy97lpgpfhfncx3zwvjrxv588"))
+ (patches (search-patches "freecad-vtk941.patch")) ;; remove on 1.1 release
(modules '((guix build utils)))
(snippet
'(begin
diff --git a/gnu/packages/patches/freecad-vtk941.patch b/gnu/packages/patches/freecad-vtk941.patch
new file mode 100644
index 0000000000..e05548a599
--- /dev/null
+++ b/gnu/packages/patches/freecad-vtk941.patch
@@ -0,0 +1,71 @@
+From fafff3a08b7a6212ce3417e08b18cb2fc8e7e868 Mon Sep 17 00:00:00 2001
+From: wmayer <wmayer@freecad.org>
+Date: Mon, 16 Dec 2024 10:56:43 +0100
+Subject: [PATCH] smesh: Fix build failure with vtk 9.4
+
+Fixes #18423
+---
+ .../src/SMDS/SMDS_UnstructuredGrid.cpp | 17 ++++++++++-------
+ 1 file changed, 10 insertions(+), 7 deletions(-)
+
+diff --git a/src/3rdParty/salomesmesh/src/SMDS/SMDS_UnstructuredGrid.cpp b/src/3rdParty/salomesmesh/src/SMDS/SMDS_UnstructuredGrid.cpp
+index e9895d615717..4e9d6dc05764 100644
+--- a/src/3rdParty/salomesmesh/src/SMDS/SMDS_UnstructuredGrid.cpp
++++ b/src/3rdParty/salomesmesh/src/SMDS/SMDS_UnstructuredGrid.cpp
+@@ -32,6 +32,7 @@
+ #include <vtkDoubleArray.h>
+ #include <vtkIdTypeArray.h>
+ #include <vtkUnsignedCharArray.h>
++#include <vtkVersionMacros.h>
+
+ #include <list>
+ #include <climits>
+@@ -249,14 +250,16 @@ void SMDS_UnstructuredGrid::compactGrid(std::vector<int>& idNodesOldToNew, int n
+ }
+ }
+
+- if (this->FaceLocations)
++ vtkIdTypeArray* thisFaceLocations = GetFaceLocations();
++ vtkIdTypeArray* thisFaces = GetFaces();
++ if (thisFaceLocations)
+ {
+ vtkIdTypeArray *newFaceLocations = vtkIdTypeArray::New();
+ newFaceLocations->Initialize();
+ newFaceLocations->Allocate(newTypes->GetSize());
+ vtkIdTypeArray *newFaces = vtkIdTypeArray::New();
+ newFaces->Initialize();
+- newFaces->Allocate(this->Faces->GetSize());
++ newFaces->Allocate(thisFaces->GetSize());
+ for (int i = 0; i < oldCellSize; i++)
+ {
+ if (this->Types->GetValue(i) == VTK_EMPTY_CELL)
+@@ -265,16 +268,16 @@ void SMDS_UnstructuredGrid::compactGrid(std::vector<int>& idNodesOldToNew, int n
+ if (newTypes->GetValue(newCellId) == VTK_POLYHEDRON)
+ {
+ newFaceLocations->InsertNextValue(newFaces->GetMaxId()+1);
+- int oldFaceLoc = this->FaceLocations->GetValue(i);
+- int nCellFaces = this->Faces->GetValue(oldFaceLoc++);
++ int oldFaceLoc = thisFaceLocations->GetValue(i);
++ int nCellFaces = thisFaces->GetValue(oldFaceLoc++);
+ newFaces->InsertNextValue(nCellFaces);
+ for (int n=0; n<nCellFaces; n++)
+ {
+- int nptsInFace = this->Faces->GetValue(oldFaceLoc++);
++ int nptsInFace = thisFaces->GetValue(oldFaceLoc++);
+ newFaces->InsertNextValue(nptsInFace);
+ for (int k=0; k<nptsInFace; k++)
+ {
+- int oldpt = this->Faces->GetValue(oldFaceLoc++);
++ int oldpt = thisFaces->GetValue(oldFaceLoc++);
+ newFaces->InsertNextValue(idNodesOldToNew[oldpt]);
+ }
+ }
+@@ -292,7 +295,7 @@ void SMDS_UnstructuredGrid::compactGrid(std::vector<int>& idNodesOldToNew, int n
+ }
+ else
+ {
+- this->SetCells(newTypes, newLocations, newConnectivity, FaceLocations, Faces);
++ this->SetCells(newTypes, newLocations, newConnectivity, thisFaceLocations, thisFaces);
+ }
+
+ newPoints->Delete();
\ No newline at end of file
--
2.46.1
Lars Bilke wrote 2 weeks ago
Re: [bug#76269] [PATCH] gnu: vtk: Update to 9.4.1
(name . Ludovic Courtès)(address . ludovic.courtes@inria.fr)(address . 76269@debbugs.gnu.org)
8C1550CA-E02C-48B1-9A83-E9B87B37966A@ufz.de
Dear Ludovic,

thanks for your comments. I have uploaded a patch for freecad, this one:


I hope this is fine.

Sincerely,
Lars

On 18 Feb 2025, at 18:19, Ludovic Courtès wrote:

Toggle quote (50 lines)
> Hi Lars,
>
> Lars Bilke <lars.bilke@ufz.de> skribis:
>
>> * gnu/packages/image-processing.scm (vtk): Update to 9.4.1.
>>
>> Change-Id: Ife39df610c4487683a5c8d72b60eb750530c1358
>
> Apparently this breaks at least freecad:
>
> --8<---------------cut here---------------start------------->8---
> cd /tmp/guix-build-freecad-1.0.0.drv-0/build/src/Mod/CAM &&
> /gnu/store/2lxfijiqqljxdxr2ppqqrn5czkh4r1rq-cmake-minimal-3.24.2/bin/cmake
> -E copy
> /tmp/guix-build-freecad-1.0.0.drv-0/source/src/Mod/CAM/Path/Op/Util.py
> /tmp/guix-build-freecad-1.0.0.drv-0/build/Mod/CAM/Path/Op/Util.py
> /tmp/guix-build-freecad-1.0.0.drv-0/source/src/3rdParty/salomesmesh/src/SMDS/SMDS_UnstructuredGrid.cpp:
> In member function ‘void SMDS_UnstructuredGrid::BuildLinks()’:
> /tmp/guix-build-freecad-1.0.0.drv-0/source/src/3rdParty/salomesmesh/src/SMDS/SMDS_UnstructuredGrid.cpp:1030:25:
> error: no matching function for call to
> ‘vtkCellLinks::BuildLinks(SMDS_UnstructuredGrid*)’
> 1030 | GetLinks()->BuildLinks(this);
> | ~~~~~~~~~~~~~~~~~~~~~~^~~~~~
> In file included from
> /tmp/guix-build-freecad-1.0.0.drv-0/source/src/3rdParty/salomesmesh/inc/SMDS_UnstructuredGrid.hxx:30,
> from
> /tmp/guix-build-freecad-1.0.0.drv-0/source/src/3rdParty/salomesmesh/src/SMDS/SMDS_UnstructuredGrid.cpp:20:
> /gnu/store/gr8mwbl3zlx9hc4x9k5s9sgcy2kp4sr9-vtk-9.4.1/include/vtk-9.4/vtkCellLinks.h:64:8:
> note: candidate: ‘virtual void vtkCellLinks::BuildLinks()’
> 64 | void BuildLinks() override;
> | ^~~~~~~~~~
> /gnu/store/gr8mwbl3zlx9hc4x9k5s9sgcy2kp4sr9-vtk-9.4.1/include/vtk-9.4/vtkCellLinks.h:64:8:
> note: candidate expects 0 arguments, 1 provided
> --8<---------------cut here---------------end--------------->8---
>
> Could you take a look? (Perhaps the solution will be to retain the
> previous version of VTK for use in packages like this one.)
>
> More generally, could you test with:
>
> guix build -P1 vtk@9.4.1 -P1 vtk@7
>
> ?
>
> Dependent packages like ‘python-fenics-fiat’ are already broken,
> so it’s
> “okay” to keep them broken.
>
> Thanks,
> Ludo’.
Attachment: file
Maxim Cournoyer wrote 2 weeks ago
Re: [bug#76269] [PATCH 2/2] gnu: freecad: Add vtk 9.4.1 patch.
(name . Lars Bilke)(address . lars.bilke@ufz.de)
874j0flaya.fsf@gmail.com
Hi Lars,

Lars Bilke <lars.bilke@ufz.de> writes:

Toggle quote (33 lines)
> * gnu/packages/engineering.scm (freecad): Add vtk 9.4.1 patch.
> * gnu/local.mk: Add freecad vtk 9.4.1 patch to list.
>
> Change-Id: I9220aec757c2331a2dfa3eee9d0b84f774785de3
> ---
> gnu/local.mk | 1 +
> gnu/packages/engineering.scm | 1 +
> gnu/packages/patches/freecad-vtk941.patch | 71 +++++++++++++++++++++++
> 3 files changed, 73 insertions(+)
> create mode 100644 gnu/packages/patches/freecad-vtk941.patch
>
> diff --git a/gnu/local.mk b/gnu/local.mk
> index 45a9cb635e..35e1b5e6b6 100644
> --- a/gnu/local.mk
> +++ b/gnu/local.mk
> @@ -1317,6 +1317,7 @@ dist_patch_DATA = \
> %D%/packages/patches/fpc-reproducibility.patch \
> %D%/packages/patches/fpc-glibc-2.34-compat.patch \
> %D%/packages/patches/fpm-newer-clamp-fix.patch \
> + %D%/packages/patches/freecad-vtk941.patch \
> %D%/packages/patches/freedict-tools-fix-determinism.patch \
> %D%/packages/patches/freedink-engine-fix-sdl-hints.patch \
> %D%/packages/patches/freeimage-libtiff-compat.patch \
> diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
> index 234f4a2b03..d4d920cd08 100644
> --- a/gnu/packages/engineering.scm
> +++ b/gnu/packages/engineering.scm
> @@ -3173,6 +3173,7 @@ (define-public freecad
> (file-name (git-file-name name version))
> (sha256
> (base32 "0wwymcfgi0cybj7m6awflk8c7n6iy97lpgpfhfncx3zwvjrxv588"))
> + (patches (search-patches "freecad-vtk941.patch")) ;; remove on 1.1 release

Thanks for the patch. Is there a reason we cannot update our freecade
to 1.1 yet? Perhaps it is not released?

Otherwise, LGTM.

Reviewed-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>

--
Thanks,
Maxim
Lars Bilke wrote 2 weeks ago
(name . Maxim Cournoyer)(address . maxim.cournoyer@gmail.com)
08C291D3-A9E0-4A23-A280-B55D77FFF356@ufz.de
Dear Maxim,

thanks for your review.

FreeCAD 1.1 is not released yet.

Sincerely,
Lars

On 27 Feb 2025, at 15:27, Maxim Cournoyer wrote:
Toggle quote (11 lines)
>
> Thanks for the patch. Is there a reason we cannot update our freecade
> to 1.1 yet? Perhaps it is not released?
>
> Otherwise, LGTM.
>
> Reviewed-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
>
> --
> Thanks,
> Maxim
Lars Bilke wrote 2 weeks ago
[PATCH 1/3] gnu: vtk: Update to 9.4.1
(address . 76269@debbugs.gnu.org)(name . Lars Bilke)(address . lars.bilke@ufz.de)
3e8105e24f1159665cdf543f49e280f183cc3667.1740671616.git.lars.bilke@ufz.de
* gnu/packages/image-processing.scm (vtk): Update to 9.4.1.

Change-Id: Ife39df610c4487683a5c8d72b60eb750530c1358
---
gnu/packages/image-processing.scm | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)

Toggle diff (52 lines)
diff --git a/gnu/packages/image-processing.scm b/gnu/packages/image-processing.scm
index 405f90ca9a..a456d94863 100644
--- a/gnu/packages/image-processing.scm
+++ b/gnu/packages/image-processing.scm
@@ -323,7 +323,7 @@ (define-public opencolorio
(define-public vtk
(package
(name "vtk")
- (version "9.3.0")
+ (version "9.4.1")
(source (origin
(method url-fetch)
(uri (string-append "https://vtk.org/files/release/"
@@ -331,7 +331,7 @@ (define-public vtk
"/VTK-" version ".tar.gz"))
(sha256
(base32
- "1s8vd34nhrgnw1bf9zhfn062d53fwq3csjfwvm7lxcr5a8lvkizx"))
+ "0aa5pkw2xxzksl48ldbj3cq6r4y4mxvcpl66f64gkah2s34b0ly2"))
(modules '((guix build utils)))
(snippet
'(begin
@@ -341,7 +341,7 @@ (define-public vtk
(string-append "ThirdParty/" dir "/vtk" dir)))
;; pugixml depended upon unconditionally
'("doubleconversion" "eigen" "expat" "freetype" "gl2ps"
- "glew" "hdf5" "jpeg" "jsoncpp" "libharu" "libproj"
+ "hdf5" "jpeg" "jsoncpp" "libharu" "libproj"
"libxml2" "lz4" "netcdf" "ogg" "png" "sqlite" "theora"
"tiff" "zlib"))
(substitute* "IO/ExportPDF/vtkPDFContextDevice2D.cxx"
@@ -360,7 +360,6 @@ (define-public vtk
"-DVTK_MODULE_USE_EXTERNAL_VTK_expat=ON"
"-DVTK_MODULE_USE_EXTERNAL_VTK_freetype=ON"
"-DVTK_MODULE_USE_EXTERNAL_VTK_gl2ps=ON"
- "-DVTK_MODULE_USE_EXTERNAL_VTK_glew=ON"
"-DVTK_MODULE_USE_EXTERNAL_VTK_hdf5=ON"
"-DVTK_MODULE_USE_EXTERNAL_VTK_jpeg=ON"
"-DVTK_MODULE_USE_EXTERNAL_VTK_jsoncpp=ON"
@@ -380,7 +379,7 @@ (define-public vtk
"-DVTK_WRAP_PYTHON=ON"
"-DVTK_PYTHON_VERSION:STRING=3"
- "-DVTK_SMP_ENABLE_OPENNMP=ON"
+ "-DVTK_SMP_ENABLE_OPENMP=ON"
"-DVTK_SMP_ENABLE_TBB=ON"
"-DVTK_USE_MPI=ON"
#$@(if (target-riscv64?)

base-commit: c4fcf8fb627c9ea54a4a639a81766e5df3973fdc
--
2.46.1
Lars Bilke wrote 2 weeks ago
[PATCH 2/3] gnu: freecad: Add vtk 9.4.1 patch.
(address . 76269@debbugs.gnu.org)(name . Lars Bilke)(address . lars.bilke@ufz.de)
952e5c6ef995a8e47e6b99355d7bd2c34f3f1ea5.1740671616.git.lars.bilke@ufz.de
* gnu/packages/engineering.scm (freecad): Add vtk 9.4.1 patch.
* gnu/local.mk: Add freecad vtk 9.4.1 patch to list.

Change-Id: I9220aec757c2331a2dfa3eee9d0b84f774785de3
---
gnu/local.mk | 1 +
gnu/packages/engineering.scm | 1 +
gnu/packages/patches/freecad-vtk941.patch | 71 +++++++++++++++++++++++
3 files changed, 73 insertions(+)
create mode 100644 gnu/packages/patches/freecad-vtk941.patch

Toggle diff (104 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index 45a9cb635e..35e1b5e6b6 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1317,6 +1317,7 @@ dist_patch_DATA = \
%D%/packages/patches/fpc-reproducibility.patch \
%D%/packages/patches/fpc-glibc-2.34-compat.patch \
%D%/packages/patches/fpm-newer-clamp-fix.patch \
+ %D%/packages/patches/freecad-vtk941.patch \
%D%/packages/patches/freedict-tools-fix-determinism.patch \
%D%/packages/patches/freedink-engine-fix-sdl-hints.patch \
%D%/packages/patches/freeimage-libtiff-compat.patch \
diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
index 234f4a2b03..d4d920cd08 100644
--- a/gnu/packages/engineering.scm
+++ b/gnu/packages/engineering.scm
@@ -3173,6 +3173,7 @@ (define-public freecad
(file-name (git-file-name name version))
(sha256
(base32 "0wwymcfgi0cybj7m6awflk8c7n6iy97lpgpfhfncx3zwvjrxv588"))
+ (patches (search-patches "freecad-vtk941.patch")) ;; remove on 1.1 release
(modules '((guix build utils)))
(snippet
'(begin
diff --git a/gnu/packages/patches/freecad-vtk941.patch b/gnu/packages/patches/freecad-vtk941.patch
new file mode 100644
index 0000000000..e05548a599
--- /dev/null
+++ b/gnu/packages/patches/freecad-vtk941.patch
@@ -0,0 +1,71 @@
+From fafff3a08b7a6212ce3417e08b18cb2fc8e7e868 Mon Sep 17 00:00:00 2001
+From: wmayer <wmayer@freecad.org>
+Date: Mon, 16 Dec 2024 10:56:43 +0100
+Subject: [PATCH] smesh: Fix build failure with vtk 9.4
+
+Fixes #18423
+---
+ .../src/SMDS/SMDS_UnstructuredGrid.cpp | 17 ++++++++++-------
+ 1 file changed, 10 insertions(+), 7 deletions(-)
+
+diff --git a/src/3rdParty/salomesmesh/src/SMDS/SMDS_UnstructuredGrid.cpp b/src/3rdParty/salomesmesh/src/SMDS/SMDS_UnstructuredGrid.cpp
+index e9895d615717..4e9d6dc05764 100644
+--- a/src/3rdParty/salomesmesh/src/SMDS/SMDS_UnstructuredGrid.cpp
++++ b/src/3rdParty/salomesmesh/src/SMDS/SMDS_UnstructuredGrid.cpp
+@@ -32,6 +32,7 @@
+ #include <vtkDoubleArray.h>
+ #include <vtkIdTypeArray.h>
+ #include <vtkUnsignedCharArray.h>
++#include <vtkVersionMacros.h>
+
+ #include <list>
+ #include <climits>
+@@ -249,14 +250,16 @@ void SMDS_UnstructuredGrid::compactGrid(std::vector<int>& idNodesOldToNew, int n
+ }
+ }
+
+- if (this->FaceLocations)
++ vtkIdTypeArray* thisFaceLocations = GetFaceLocations();
++ vtkIdTypeArray* thisFaces = GetFaces();
++ if (thisFaceLocations)
+ {
+ vtkIdTypeArray *newFaceLocations = vtkIdTypeArray::New();
+ newFaceLocations->Initialize();
+ newFaceLocations->Allocate(newTypes->GetSize());
+ vtkIdTypeArray *newFaces = vtkIdTypeArray::New();
+ newFaces->Initialize();
+- newFaces->Allocate(this->Faces->GetSize());
++ newFaces->Allocate(thisFaces->GetSize());
+ for (int i = 0; i < oldCellSize; i++)
+ {
+ if (this->Types->GetValue(i) == VTK_EMPTY_CELL)
+@@ -265,16 +268,16 @@ void SMDS_UnstructuredGrid::compactGrid(std::vector<int>& idNodesOldToNew, int n
+ if (newTypes->GetValue(newCellId) == VTK_POLYHEDRON)
+ {
+ newFaceLocations->InsertNextValue(newFaces->GetMaxId()+1);
+- int oldFaceLoc = this->FaceLocations->GetValue(i);
+- int nCellFaces = this->Faces->GetValue(oldFaceLoc++);
++ int oldFaceLoc = thisFaceLocations->GetValue(i);
++ int nCellFaces = thisFaces->GetValue(oldFaceLoc++);
+ newFaces->InsertNextValue(nCellFaces);
+ for (int n=0; n<nCellFaces; n++)
+ {
+- int nptsInFace = this->Faces->GetValue(oldFaceLoc++);
++ int nptsInFace = thisFaces->GetValue(oldFaceLoc++);
+ newFaces->InsertNextValue(nptsInFace);
+ for (int k=0; k<nptsInFace; k++)
+ {
+- int oldpt = this->Faces->GetValue(oldFaceLoc++);
++ int oldpt = thisFaces->GetValue(oldFaceLoc++);
+ newFaces->InsertNextValue(idNodesOldToNew[oldpt]);
+ }
+ }
+@@ -292,7 +295,7 @@ void SMDS_UnstructuredGrid::compactGrid(std::vector<int>& idNodesOldToNew, int n
+ }
+ else
+ {
+- this->SetCells(newTypes, newLocations, newConnectivity, FaceLocations, Faces);
++ this->SetCells(newTypes, newLocations, newConnectivity, thisFaceLocations, thisFaces);
+ }
+
+ newPoints->Delete();
\ No newline at end of file
--
2.46.1
Lars Bilke wrote 2 weeks ago
[PATCH 3/3] gnu: vtk: Fix OpenCV build.
(address . 76269@debbugs.gnu.org)(name . Lars Bilke)(address . lars.bilke@ufz.de)
f240af935e6a416fdf8bc9cfabebe932fb88b3ab.1740671616.git.lars.bilke@ufz.de
* gnu/packages/image-processing.scm (vtk): Add jsoncpp to
propagated-inputs. This fixes the OpenCV configuration step.

Change-Id: I863079394a4345cc5f0a8e67fe19831070f16d09
---
gnu/packages/image-processing.scm | 1 +
1 file changed, 1 insertion(+)

Toggle diff (14 lines)
diff --git a/gnu/packages/image-processing.scm b/gnu/packages/image-processing.scm
index a456d94863..fed26291e5 100644
--- a/gnu/packages/image-processing.scm
+++ b/gnu/packages/image-processing.scm
@@ -440,6 +440,7 @@ (define-public vtk
;; 'find_package(THEORA)', which in turns looks for libogg. Likewise for
;; TBB.
(list libogg
+ jsoncpp ; fixes OpenCVs configure not finding JsonCpp::JsonCpp target
tbb))
(home-page "https://vtk.org/")
(synopsis "Libraries for 3D computer graphics")
--
2.46.1
Cayetano Santos wrote 2 weeks ago
Re: [bug#76269] [PATCH 1/3] gnu: vtk: Update to 9.4.1
(address . lars.bilke@ufz.de)(address . 76269@debbugs.gnu.org)
871pvjtkuc.fsf@inventati.org
With your patch, I manage to build and run vtk and freecad.

A couple of comments:

- better send patches as [PATCH v2 1/3], etc. (hard to follow otherwise)
- use guix style/lint to check the patches before sending

There are lots of dependent packages still to build, see

-----BEGIN PGP SIGNATURE-----

iI0EARYKADUWIQTMuBhC+dcFjs1nN3q/XN9N9r9mggUCZ8CSOxccY3NhbnRvc2JA
aW52ZW50YXRpLm9yZwAKCRC/XN9N9r9mgsN7AP407xGs+5laRIJ5oVlbOrlkoXFE
7acin5ZMztTcJb8MZAEA3vW2DpZGIVcbqGsHjJ8Zcm235HdKs/fUZZ5/hWJ1IAA=
=9YkY
-----END PGP SIGNATURE-----

Maxim Cournoyer wrote 2 weeks ago
[bug#76269] [PATCH 1/3] gnu: vtk: Update to 9.4.1
(name . Cayetano Santos)(address . csantosb@inventati.org)
87a5a6izla.fsf@gmail.com
Hi,

Cayetano Santos <csantosb@inventati.org> writes:

Toggle quote (11 lines)
> With your patch, I manage to build and run vtk and freecad.
>
> A couple of comments:
>
> - better send patches as [PATCH v2 1/3], etc. (hard to follow otherwise)
> - use guix style/lint to check the patches before sending
>
> There are lots of dependent packages still to build, see
>
> https://qa.guix.gnu.org/issue/76269

Good call, let's give this some extra time.

--
Thanks,
Maxim
Cayetano Santos wrote 2 weeks ago
(name . Maxim Cournoyer)(address . maxim.cournoyer@gmail.com)
87bjumh4tg.fsf@inventati.org
Toggle quote (8 lines)
>ven. 28 févr. 2025 at 11:15, Maxim Cournoyer <maxim.cournoyer@gmail.com> wrote:

>> There are lots of dependent packages still to build, see
>>
>> https://qa.guix.gnu.org/issue/76269
>
> Good call, let's give this some extra time.

One of the tests of OpenCV fails now with the latest patch set:

-----BEGIN PGP SIGNATURE-----

iI0EARYKADUWIQTMuBhC+dcFjs1nN3q/XN9N9r9mggUCZ8FuWxccY3NhbnRvc2JA
aW52ZW50YXRpLm9yZwAKCRC/XN9N9r9mgu3FAP9FrXeaxzeG9eGu6P4jNWuqth7r
Jv9X3saQ4W5Nq836jAD/Q+PXhVa7BEDO3z7GMlnDyVt/7xpabfXwz9+SIEd1fAA=
=ATBz
-----END PGP SIGNATURE-----

Maxim Cournoyer wrote 1 weeks ago
[bug#76269] [PATCH 1/3] gnu: vtk: Update to 9.4.1
(name . Lars Bilke)(address . lars.bilke@ufz.de)
87eczggqos.fsf@gmail.com
Hi Lars,

Cayetano Santos <csantosb@inventati.org> writes:

Toggle quote (12 lines)
>>ven. 28 févr. 2025 at 11:15, Maxim Cournoyer <maxim.cournoyer@gmail.com> wrote:
>
>>> There are lots of dependent packages still to build, see
>>>
>>> https://qa.guix.gnu.org/issue/76269
>>
>> Good call, let's give this some extra time.
>
> One of the tests of OpenCV fails now with the latest patch set:
>
> https://data.qa.guix.gnu.org/gnu/store/kbmx3vlin6h8jclqchmv7y5px4ysz818-opencv-4.11.0.drv

Could you please take a look?

The error is a segfault in the opencv_test_viz test:

Toggle snippet (3 lines)
12/45 Test #12: opencv_test_viz ...................***Exception: SegFault 0.06 sec

?
Your comment

Commenting via the web interface is currently disabled.

To comment on this conversation send an email to 76269@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 76269
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch
You may also tag this issue. See list of standard tags. For example, to set the confirmed and easy tags
mumi command -t +confirmed -t +easy
Or, remove the moreinfo tag and set the help tag
mumi command -t -moreinfo -t +help