Package: src:vtk7 Version: 7.1.1+dfsg1-12 Severity: normal Tags: upstream patch User: debian-ri...@lists.debian.org Usertags: riscv64
Hi, vtk7 currently fails to build on the riscv64 architecture as it can be seen on the following build log excerpt: | In file included from /<<PKGBUILDDIR>>/Utilities/KWIML/vtkkwiml/abi.h:2, | from /<<PKGBUILDDIR>>/debian/build/Utilities/KWIML/vtk_kwiml.h:19, | from /<<PKGBUILDDIR>>/Common/Core/vtkType.h:19, | from /<<PKGBUILDDIR>>/Wrapping/Tools/vtkParse.tab.c:180: | /<<PKGBUILDDIR>>/Utilities/KWIML/vtkkwiml/include/kwiml/abi.h:472:3: error: #error "Byte order of target CPU unknown." | # error "Byte order of target CPU unknown." | ^~~~~ | [ 0%] Linking C executable ../../bin/vtkWrapTclInit-7.1 The full build log is available there: https://buildd.debian.org/status/fetch.php?pkg=vtk7&arch=riscv64&ver=7.1.1%2Bdfsg1-12&stamp=1552472983&raw=0 vtk7 has a list of define per architecture to define the endianness and riscv64 is missing. This has already been fixed upstream: https://gitlab.kitware.com/vtk/vtk/blob/master/Utilities/KWIML/vtkkwiml/include/kwiml/abi.h The attached patch is a backport from the upstream changes. It would be nice if you can include it in the next upload. Thanks, Aurelien
diff -Nru vtk7-7.1.1+dfsg1/debian/patches/112_riscv_support.patch vtk7-7.1.1+dfsg1/debian/patches/112_riscv_support.patch --- vtk7-7.1.1+dfsg1/debian/patches/112_riscv_support.patch 1970-01-01 00:00:00.000000000 +0000 +++ vtk7-7.1.1+dfsg1/debian/patches/112_riscv_support.patch 2019-03-13 21:37:13.000000000 +0000 @@ -0,0 +1,15 @@ +Changes taken from https://gitlab.kitware.com/vtk/vtk/blob/master/Utilities/KWIML/vtkkwiml/include/kwiml/abi.h + +--- vtk7-7.1.1+dfsg1.orig/Utilities/KWIML/vtkkwiml/include/kwiml/abi.h ++++ vtk7-7.1.1+dfsg1/Utilities/KWIML/vtkkwiml/include/kwiml/abi.h +@@ -467,6 +467,10 @@ suppression macro KWIML_ABI_NO_VERIFY wa + #elif defined(__XTENSA_EL__) + # define KWIML_ABI_ENDIAN_ID KWIML_ABI_ENDIAN_ID_LITTLE + ++/* RISC-V */ ++#elif defined(__riscv) || defined(__riscv__) ++# define KWIML_ABI_ENDIAN_ID KWIML_ABI_ENDIAN_ID_LITTLE ++ + /* Unknown CPU */ + #elif !defined(KWIML_ABI_NO_ERROR_ENDIAN) + # error "Byte order of target CPU unknown." diff -Nru vtk7-7.1.1+dfsg1/debian/patches/series vtk7-7.1.1+dfsg1/debian/patches/series --- vtk7-7.1.1+dfsg1/debian/patches/series 2018-12-17 09:03:58.000000000 +0000 +++ vtk7-7.1.1+dfsg1/debian/patches/series 2019-03-13 21:37:13.000000000 +0000 @@ -17,3 +17,4 @@ 109_java-jar-nonjavafiles.patch 110_python-371.patch 111_fix_perl.patch +112_riscv_support.patch