Skip to content

Conversation

@ar-jan
Copy link
Contributor

@ar-jan ar-jan commented Nov 9, 2022

Testing the changes

  • I tested the changes in this PR: briefly

@ghost
Copy link

ghost commented Nov 10, 2022

Failing build for x86_64-musl (possibly?) can be fixed with this patch:

--- a/ThirdParty/ioss/vtkioss/Ioss_FileInfo.C
+++ b/ThirdParty/ioss/vtkioss/Ioss_FileInfo.C
@@ -26,7 +26,11 @@
 #define S_ISDIR(m) (((m)&_S_IFMT) == _S_IFDIR)
 #endif
 #else
+#ifdef __GLIBC__
 #include <sys/unistd.h>
+#else
+#include <unistd.h>
+#endif
 #endif
 
 #ifdef SEACAS_HAVE_MPI
@@ -35,9 +39,6 @@
 
 #include <cstdio>
 #include <sys/stat.h>
-#ifndef _MSC_VER
-#include <unistd.h>
-#endif
 
 namespace {
   bool internal_access(const std::string &name, int mode);

I see that the patch fixing build with GCC 12 has been removed, meaning that vtk has to be tested against GCC 12 once again.

@ar-jan
Copy link
Contributor Author

ar-jan commented Nov 11, 2022

Thanks for the x86_64-musl patch! The gcc12 patch is no longer needed.

@paper42
Copy link
Member

paper42 commented Nov 11, 2022

/usr/include/sys/unistd.h just contains #include <unistd.h> on glibc, so I think there is no need to put that behind an ifdef, we can just include it everywhere. @kruceter could you send that patch upstream if they don't have it yet?

@ar-jan
Copy link
Contributor Author

ar-jan commented Nov 12, 2022

Tested a few VTK Python examples and confirmed that freecad works as well. I don't otherwise use VTK but all seems OK. Anything more needed here?

@paper42
Copy link
Member

paper42 commented Nov 12, 2022

/usr/include/sys/unistd.h just contains #include <unistd.h> on glibc, so I think there is no need to put that behind an ifdef, we can just include it everywhere. @kruceter could you send that patch upstream if they don't have it yet?

Could you use https://github.com/sandialabs/seacas/pull/348.patch?

@paper42
Copy link
Member

paper42 commented Nov 12, 2022

/usr/include/sys/unistd.h just contains #include <unistd.h> on glibc, so I think there is no need to put that behind an ifdef, we can just include it everywhere. @kruceter could you send that patch upstream if they don't have it yet?

Could you use sandialabs/seacas@348.patch?

I meant including the header, download the patch from that link, don't modify it and put it to the right directory.

@ar-jan
Copy link
Contributor Author

ar-jan commented Nov 12, 2022

Upstream patch does not apply to the version vendored with vtk-9.2.2.

@paper42
Copy link
Member

paper42 commented Nov 17, 2022

The -DVTK_MODULE_USE_EXTERNAL_vtknlohmannjson=OFF configure arg did not help to avoid CMake Warning at CMake/vtkModule.cmake:4572 (find_package): By not providing "Findnlohmann_json.cmake" in CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file provided by "nlohmann_json", but CMake did not find one.. Used DVTK_USE_EXTERNAL=OFF instead. I'm not sure if this is problematic.

We definitely want to use system dependencies, can we fix it by adding json-c++ to makedepends?

@ghost
Copy link

ghost commented Nov 20, 2022

We definitely want to use system dependencies, can we fix it by adding json-c++ to makedepends?

Certainly.

Also fmt-devel and eigen are already present in the repository, so they are used in my case, too.

vtk.txt
vtk-query.txt

diff --git a/srcpkgs/vtk/template b/srcpkgs/vtk/template
index dfabbb649a..147718c690 100644
--- a/srcpkgs/vtk/template
+++ b/srcpkgs/vtk/template
@@ -6,21 +6,21 @@ build_style=cmake
 # vtk can be huge, especially with -DVTK_BUILD_ALL_MODULES=ON"
 # Build only the core modules plus python bindings for now
 configure_args="-DBUILD_SHARED_LIBS=ON -DVTK_FORBID_DOWNLOADS=ON
- -DVTK_USE_EXTERNAL=OFF
+ -DVTK_USE_EXTERNAL=ON
  -DVTK_MODULE_USE_EXTERNAL_VTK_utf8=OFF
  -DVTK_MODULE_USE_EXTERNAL_VTK_pegtl=OFF
  -DVTK_MODULE_USE_EXTERNAL_VTK_libharu=OFF
  -DVTK_MODULE_USE_EXTERNAL_VTK_exprtk=OFF
- -DVTK_MODULE_USE_EXTERNAL_VTK_fmt=OFF
- -DVTK_MODULE_USE_EXTERNAL_vtknlohmannjson=OFF
- -DVTK_MODULE_USE_EXTERNAL_vtkeigen=OFF
+ -DVTK_MODULE_USE_EXTERNAL_VTK_cgns=OFF
+ -DVTK_MODULE_USE_EXTERNAL_VTK_ioss=OFF
+ -DVTK_MODULE_USE_EXTERNAL_VTK_verdict=OFF
  -DVTK_WRAP_PYTHON=ON -DVTK_PYTHON_VERSION=3"
 # vtk forks libharu, bumps to v2.4.0, and requires libharu>=2.4.0
 makedepends="zlib-devel freetype-devel liblz4-devel expat-devel MesaLib-devel
  libXt-devel libjpeg-turbo-devel tiff-devel hdf5-devel netcdf-devel
  libxml2-devel jsoncpp-devel openmpi-devel libogg-devel libtheora-devel
  eigen double-conversion-devel glew-devel pugixml-devel sqlite-devel
- gl2ps-devel proj-devel python3-devel"
+ gl2ps-devel proj-devel python3-devel json-c++ fmt-devel"
 short_desc="System for 3D computer graphics, image processing, and visualization"
 maintainer="Piraty <[email protected]>"
 license="BSD-3-Clause"

@ar-jan ar-jan force-pushed the vtk922 branch 2 times, most recently from c281640 to 17e7450 Compare November 20, 2022 16:03
@ar-jan
Copy link
Contributor Author

ar-jan commented Dec 2, 2022

Bump. I just changed the hardcoded references to the vtk version, otherwise this is the same as before, and I think it's ready.

@Piraty Piraty merged commit 6e1a9f0 into void-linux:master Dec 3, 2022
@ar-jan ar-jan deleted the vtk922 branch September 9, 2023 22:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants