gnu: itk-snap: Fix build.
* gnu/packages/patches/itk-snap-alt-glibc-compat.patch: New patch. * gnu/local.mk (dist_patch_DATA): Register it. * gnu/packages/image-processing.scm (itk-snap): Apply it. [phases]: Delete trailing #t. [inputs]: Use new style. Replace vtk-6 with vtk-7.
parent
607e48ba3c
commit
887dec8a51
|
@ -1302,6 +1302,7 @@ dist_patch_DATA = \
|
||||||
%D%/packages/patches/ipxe-reproducible-geniso.patch \
|
%D%/packages/patches/ipxe-reproducible-geniso.patch \
|
||||||
%D%/packages/patches/irrlicht-use-system-libs.patch \
|
%D%/packages/patches/irrlicht-use-system-libs.patch \
|
||||||
%D%/packages/patches/isl-0.11.1-aarch64-support.patch \
|
%D%/packages/patches/isl-0.11.1-aarch64-support.patch \
|
||||||
|
%D%/packages/patches/itk-snap-alt-glibc-compat.patch \
|
||||||
%D%/packages/patches/json-c-0.13-CVE-2020-12762.patch \
|
%D%/packages/patches/json-c-0.13-CVE-2020-12762.patch \
|
||||||
%D%/packages/patches/json-c-0.12-CVE-2020-12762.patch \
|
%D%/packages/patches/json-c-0.12-CVE-2020-12762.patch \
|
||||||
%D%/packages/patches/jsoncpp-pkg-config-version.patch \
|
%D%/packages/patches/jsoncpp-pkg-config-version.patch \
|
||||||
|
|
|
@ -1032,7 +1032,8 @@ combine the information contained in both.")
|
||||||
(commit (string-append "v" version))))
|
(commit (string-append "v" version))))
|
||||||
(file-name (git-file-name name version))
|
(file-name (git-file-name name version))
|
||||||
(sha256
|
(sha256
|
||||||
(base32 "15i5ixpryfrbf3vrrb5rici8fb585f25k0v1ljds16bp1f1msr4q"))))
|
(base32 "15i5ixpryfrbf3vrrb5rici8fb585f25k0v1ljds16bp1f1msr4q"))
|
||||||
|
(patches (search-patches "itk-snap-alt-glibc-compat.patch"))))
|
||||||
(build-system cmake-build-system)
|
(build-system cmake-build-system)
|
||||||
(arguments
|
(arguments
|
||||||
`(#:configure-flags
|
`(#:configure-flags
|
||||||
|
@ -1051,22 +1052,19 @@ combine the information contained in both.")
|
||||||
(substitute* "CMakeLists.txt"
|
(substitute* "CMakeLists.txt"
|
||||||
(("install_qt5_executable\
|
(("install_qt5_executable\
|
||||||
\\(\\$\\{SNAP_MAIN_INSTALL_DIR\\}/\\$\\{SNAP_EXE\\}\\)")
|
\\(\\$\\{SNAP_MAIN_INSTALL_DIR\\}/\\$\\{SNAP_EXE\\}\\)")
|
||||||
""))
|
""))))
|
||||||
#t))
|
|
||||||
(add-after 'unpack 'disable-gui-tests
|
(add-after 'unpack 'disable-gui-tests
|
||||||
(lambda _
|
(lambda _
|
||||||
;; The GUI tests just time out.
|
;; The GUI tests just time out.
|
||||||
(substitute* "CMakeLists.txt"
|
(substitute* "CMakeLists.txt"
|
||||||
((" (Workspace|DiffSpace|ProbeIntensity|RegionCompetition\
|
((" (Workspace|DiffSpace|ProbeIntensity|RegionCompetition\
|
||||||
|RandomForest|RandomForestBailOut)")
|
|RandomForest|RandomForestBailOut)")
|
||||||
""))
|
""))))
|
||||||
#t))
|
|
||||||
(add-after 'unpack 'make-reproducible
|
(add-after 'unpack 'make-reproducible
|
||||||
(lambda _
|
(lambda _
|
||||||
(substitute* "CMakeLists.txt"
|
(substitute* "CMakeLists.txt"
|
||||||
(("TODAY\\(SNAP_VERSION_COMPILE_DATE\\)")
|
(("TODAY\\(SNAP_VERSION_COMPILE_DATE\\)")
|
||||||
"SET(SNAP_VERSION_COMPILE_DATE \"(removed for reproducibility)\")"))
|
"SET(SNAP_VERSION_COMPILE_DATE \"(removed for reproducibility)\")"))))
|
||||||
#t))
|
|
||||||
(add-after 'unpack 'prepare-submodules
|
(add-after 'unpack 'prepare-submodules
|
||||||
(lambda* (#:key inputs #:allow-other-keys)
|
(lambda* (#:key inputs #:allow-other-keys)
|
||||||
(rmdir "Submodules/c3d")
|
(rmdir "Submodules/c3d")
|
||||||
|
@ -1077,19 +1075,16 @@ combine the information contained in both.")
|
||||||
(("vcl_") "std::"))
|
(("vcl_") "std::"))
|
||||||
(rmdir "Submodules/greedy")
|
(rmdir "Submodules/greedy")
|
||||||
(symlink (assoc-ref inputs "greedy-src")
|
(symlink (assoc-ref inputs "greedy-src")
|
||||||
"Submodules/greedy")
|
"Submodules/greedy")))
|
||||||
#t))
|
|
||||||
(add-after 'unpack 'fix-includes
|
(add-after 'unpack 'fix-includes
|
||||||
(lambda _
|
(lambda _
|
||||||
(substitute* "GUI/Model/RegistrationModel.cxx"
|
(substitute* "GUI/Model/RegistrationModel.cxx"
|
||||||
(("<vnl_symmetric_eigensystem.h>")
|
(("<vnl_symmetric_eigensystem.h>")
|
||||||
"<vnl/algo/vnl_symmetric_eigensystem.h>"))
|
"<vnl/algo/vnl_symmetric_eigensystem.h>"))))
|
||||||
#t))
|
|
||||||
(add-before 'check 'prepare-tests
|
(add-before 'check 'prepare-tests
|
||||||
(lambda _
|
(lambda _
|
||||||
;; Needed by at least one test.
|
;; Needed by at least one test.
|
||||||
(setenv "HOME" "/tmp")
|
(setenv "HOME" "/tmp")))
|
||||||
#t))
|
|
||||||
(add-after 'install 'wrap-executable
|
(add-after 'install 'wrap-executable
|
||||||
(lambda* (#:key inputs outputs #:allow-other-keys)
|
(lambda* (#:key inputs outputs #:allow-other-keys)
|
||||||
(let ((out (assoc-ref outputs "out")))
|
(let ((out (assoc-ref outputs "out")))
|
||||||
|
@ -1098,23 +1093,22 @@ combine the information contained in both.")
|
||||||
,(map (lambda (label)
|
,(map (lambda (label)
|
||||||
(string-append (assoc-ref inputs label)
|
(string-append (assoc-ref inputs label)
|
||||||
"/lib/qt5/plugins"))
|
"/lib/qt5/plugins"))
|
||||||
'("qtbase" "qtdeclarative"))))
|
'("qtbase" "qtdeclarative"))))))))))
|
||||||
#t))))))
|
|
||||||
(inputs
|
(inputs
|
||||||
`(("curl" ,curl)
|
(list curl
|
||||||
("fftw" ,fftw)
|
fftw
|
||||||
("fftwf" ,fftwf)
|
fftwf
|
||||||
("glu" ,glu)
|
glu
|
||||||
("hdf5" ,hdf5)
|
hdf5
|
||||||
("mesa" ,mesa-opencl)
|
mesa-opencl
|
||||||
;; This package does not build with either insight-toolkit 5.0.0 and
|
;; This package does not build with either insight-toolkit 5.0.0
|
||||||
;; not with 4.13. It really needs to be 4.12.
|
;; and not with 4.13. It really needs to be 4.12.
|
||||||
("itk" ,insight-toolkit-4.12)
|
insight-toolkit-4.12
|
||||||
("vtk" ,vtk-6)
|
vtk-7
|
||||||
("qtbase" ,qtbase-5)
|
qtbase-5
|
||||||
("qtdeclarative" ,qtdeclarative)
|
qtdeclarative
|
||||||
("vxl" ,vxl-1)
|
vxl-1
|
||||||
("zlib" ,zlib)))
|
zlib))
|
||||||
(native-inputs
|
(native-inputs
|
||||||
`(("googletest" ,googletest)
|
`(("googletest" ,googletest)
|
||||||
("qttools" ,qttools)
|
("qttools" ,qttools)
|
||||||
|
|
|
@ -0,0 +1,22 @@
|
||||||
|
Retrieved from ALT Linux.
|
||||||
|
https://git.altlinux.org/tasks/273587/build/300/x86_64/srpm/itk-snap-3.8.0-alt6.src.rpm
|
||||||
|
|
||||||
|
diff --git a/GUI/Qt/main.cxx b/GUI/Qt/main.cxx
|
||||||
|
index 576f7160..ceab92e6 100644
|
||||||
|
--- a/GUI/Qt/main.cxx
|
||||||
|
+++ b/GUI/Qt/main.cxx
|
||||||
|
@@ -51,12 +51,13 @@ using namespace std;
|
||||||
|
#if defined (__unix__) || (defined (__APPLE__) && defined (__MACH__))
|
||||||
|
|
||||||
|
#include <signal.h>
|
||||||
|
+#include <string.h>
|
||||||
|
#include <execinfo.h>
|
||||||
|
|
||||||
|
void SegmentationFaultHandler(int sig)
|
||||||
|
{
|
||||||
|
cerr << "*************************************" << endl;
|
||||||
|
- cerr << "ITK-SNAP: " << sys_siglist[sig] << endl;
|
||||||
|
+ cerr << "ITK-SNAP: " << strsignal(sig) << " (" << sigabbrev_np(sig) << ")" << endl;
|
||||||
|
cerr << "BACKTRACE: " << endl;
|
||||||
|
void *array[50];
|
||||||
|
int nsize = backtrace(array, 50);
|
Reference in New Issue