Skip to content

vtk: added cross compiling capabilities#60319

Merged
classabbyamp merged 1 commit into
void-linux:masterfrom
Kruayd:vtk-9.5.0-for-arm
May 3, 2026
Merged

vtk: added cross compiling capabilities#60319
classabbyamp merged 1 commit into
void-linux:masterfrom
Kruayd:vtk-9.5.0-for-arm

Conversation

@Kruayd
Copy link
Copy Markdown
Contributor

@Kruayd Kruayd commented May 2, 2026

vtk can cross compile either with a multi-step compiling scheme using VTKCompileTools, as reported in
https://cmake.org/cmake/help/book/mastering-cmake/chapter/Cross%20Compiling%20With%20CMake.html#cross-compiling-a-complex-project-vtk, or with a cross compiling emulator, as shown in
VTK_source_code/CMake/vtkCrossCompiling.cmake, such as qemu. Given xbps-src capabilities, using qemu is the most convenient option.

Testing the changes

  • I tested the changes in this PR: YES

Local build testing

  • I built this PR locally for my native architecture, (ARCH-LIBC) x86_64-glibc
  • I built this PR locally for these architectures (if supported. mark crossbuilds):
    • x86_64-musl
    • aarch64-glibc (cross-build)
    • aarch64-musl (cross-build)
    • armv7l-glibc (cross-build)
    • armv7l-musl (cross-build)
    • armv6l-glibc (cross-build)
    • armv6l-musl (cross-build)

Comment thread srcpkgs/vtk/template Outdated
@Kruayd Kruayd force-pushed the vtk-9.5.0-for-arm branch 2 times, most recently from 7a49467 to b6c0882 Compare May 2, 2026 23:35
Comment thread srcpkgs/vtk/template
Comment on lines 58 to 64
post_install() {
vlicense Copyright.txt

# Mangle CPython extension names in CMake like xbps-src will do
vsed -e 's,\(vtkmodules/vtk.*\)\.cpython-.*\.so,\1.so,' \
-i "${DESTDIR}/usr/lib/cmake/vtk-${version:0:3}/VTKPython-targets-none.cmake"
}
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure why, but when cross-compiling for ARM, CPython extension names are already mangled correctly. Any clue?

@Kruayd Kruayd force-pushed the vtk-9.5.0-for-arm branch from b6c0882 to 27f92f3 Compare May 2, 2026 23:55
Comment thread srcpkgs/vtk/template Outdated
vtk can cross compile either with a multi-step compiling scheme using
VTKCompileTools, as reported in
https://cmake.org/cmake/help/book/mastering-cmake/chapter/Cross%20Compiling%20With%20CMake.html#cross-compiling-a-complex-project-vtk,
or with a cross compiling emulator, as shown in
VTK_source_code/CMake/vtkCrossCompiling.cmake, such as qemu.
Given xbps-src capabilities, using qemu is the most convenient option.
@Kruayd Kruayd force-pushed the vtk-9.5.0-for-arm branch from 27f92f3 to 9b5637a Compare May 3, 2026 08:27
@classabbyamp classabbyamp merged commit f6d1349 into void-linux:master May 3, 2026
8 checks passed
@classabbyamp
Copy link
Copy Markdown
Member

failed on the builders:

[1828/10094] Generating the wrap hierarchy for VTK::CommonCoreFAILED: [code=1] lib32/vtk-9.5/hierarchy/VTK/vtkCommonCore-hierarchy.txt /builddir/vtk-9.5.0/build/lib32/vtk-9.5/hierarchy/VTK/vtkCommonCore-hierarchy.txt cd /builddir/vtk-9.5.0/build/Common/Core && /usr/bin/qemu-arm-static /builddir/vtk-9.5.0/build/bin/vtkWrapHierarchy-9.5 -MF /builddir/vtk-9.5.0/build/Common/Core/CMakeFiles/vtkCommonCore-hierarchy.txt.d @/builddir/vtk-9.5.0/build/Common/Core/CMakeFiles/vtkCommonCore-hierarchy.None.args -o /builddir/vtk-9.5.0/build/lib32/vtk-9.5/hierarchy/VTK/vtkCommonCore-hierarchy.txt /builddir/vtk-9.5.0/build/Common/Core/CMakeFiles/vtkCommonCore-hierarchy.data @/builddir/vtk-9.5.0/build/Common/Core/CMakeFiles/vtkCommonCore-hierarchy.depends.args && /usr/libexec/xbps-src/bin/cmake -E cmake_transform_depfile Ninja gccdepfile /builddir/vtk-9.5.0 /builddir/vtk-9.5.0/Common/Core /builddir/vtk-9.5.0/build /builddir/vtk-9.5.0/build/Common/Core /builddir/vtk-9.5.0/build/Common/Core/CMakeFiles/vtkCommonCore-hierarchy.txt.d /builddir/vtk-9.5.0/build/CMakeFiles/d/7266e915e01bb137f65a1e2888db10a2719dc63849a5748d343022ee9a43eb55.dvtkWrapHierarchy-9.5: In /builddir/vtk-9.5.0/Common/Core/vtkBatch.h:39: syntax error.

https://build.voidlinux.org/#/builders/6/builds/6046/steps/8/logs/pkg_vtk
https://build.voidlinux.org/#/builders/4/builds/6167/steps/8/logs/pkg_vtk

@Kruayd Kruayd deleted the vtk-9.5.0-for-arm branch May 4, 2026 10:01
@Kruayd Kruayd restored the vtk-9.5.0-for-arm branch May 6, 2026 17:10
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.

2 participants