all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Tor-björn Claesson" <tclaesson@gmail.com>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: 60640@debbugs.gnu.org
Subject: [bug#60640] Gnu: Add gdcm
Date: Fri, 27 Jan 2023 17:06:37 +0200	[thread overview]
Message-ID: <878rhoxb6c.fsf@gmail.com> (raw)
In-Reply-To: <878rhqrzzv.fsf@gnu.org>

[-- Attachment #1: Type: text/plain, Size: 1234 bytes --]

Hi!

Ludovic Courtès <ludo@gnu.org> writes:
>
> The following tests FAILED:
> 	195 - TestStrictScanner1 (Failed)
> 	196 - TestStrictScanner2_1 (Failed)
> 	197 - TestStrictScanner2 (Failed)
> 	198 - TestStrictScanner2_2 (Failed)
> Errors while running CTest
>
> Passing #:parallel-tests? #f doesn’t help.
>
> Could you take a look?

The TestStrictScanner tests fail because they expect TestWriter to have
run, but we disabled it.

TestWriter, TestAnonymizer4, and TestPrinter1 are also reported as
failing in the GDCM ctest dashboard
(https://open.cdash.org/index.php?project=GDCM).
It is strange that they passed previously in my local checkout
(they fail now, some change in the toolchain?)
I will try to look into this.

For now, here is a patch to ignore the remaining failures, giving us
an installable package, and also updated patches to add a bin output
and use more system libraries.

Investigating the remaining failing tests and using more system
libraries feels like a fairly big, if fun, task possibly involving
work on GDCM as well as this package. Should we close this bug report
if we have a working package when the attached patches are applied?

-- 
Mvh,
Tor-björn Claesson


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-gdcm-Ignore-remaining-failing-tests.patch --]
[-- Type: text/x-patch, Size: 1517 bytes --]

From 7aaae11c7efc38222bfbf503e52cdb15bfccc33c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Tor-bj=C3=B6rn=20Claesson?= <tclaesson@gmail.com>
Date: Fri, 27 Jan 2023 13:26:02 +0200
Subject: [PATCH 1/3] gnu: gdcm: Ignore remaining failing tests.
gnu: gdcm: Ignore remaining failing tests.
---
 gnu/packages/bioinformatics.scm | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm
index 8c75607a65..0fa7bb3746 100644
--- a/gnu/packages/bioinformatics.scm
+++ b/gnu/packages/bioinformatics.scm
@@ -18097,12 +18097,15 @@ (define-public gdcm
       #:configure-flags
       #~(list "-DGDCM_BUILD_TESTING=true"
               (string-append "-DCMAKE_CTEST_ARGUMENTS=-E;"
-                             "'TestFileMetaInformation"
-                             "|TestElement2"
-                             "|TestSCUValidation"
-                             "|TestWriter"
+                             "'TestWriter"
+                             "|TestStrictScanner1"
+			     "|TestStrictScanner2"
+			     "|TestStrictScanner2_1"
+			     "|TestStrictScanner2_2"
                              "|TestAnonymizer4"
                              "|TestPrinter1"
+                             ;; Disable tests that download data from the internet.
+                             "|TestSCUValidation"
                              "|TestEcho"
                              "|TestFind'")
               "-DGDCM_DOCUMENTATION:BOOL=ON"
-- 
2.39.1


[-- Attachment #3: 0002-gnu-gdcm-Add-bin-output.patch --]
[-- Type: text/x-patch, Size: 2374 bytes --]

From 2bc5c46ca2fee406a7108e5d43ef66af2d392889 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Tor-bj=C3=B6rn=20Claesson?= <tclaesson@gmail.com>
Date: Fri, 27 Jan 2023 14:43:32 +0200
Subject: [PATCH 2/3] gnu: gdcm: Add bin output.
gnu: gdcm: Add bin output.
---
 gnu/packages/bioinformatics.scm | 15 +++++++++++++--
 1 file changed, 13 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm
index 0fa7bb3746..9a3c0f7d42 100644
--- a/gnu/packages/bioinformatics.scm
+++ b/gnu/packages/bioinformatics.scm
@@ -18084,7 +18084,7 @@ (define-public gdcm
                (base32
                 "1rf0p7dnakjry0fa6ax1h762bn0l5n6ibfdxn077mjvwgpqan51l"))))
     (build-system cmake-build-system)
-    (outputs '("out" "doc"))
+    (outputs '("out" "bin" "doc"))
     (arguments
      (list
       #:phases
@@ -18093,7 +18093,14 @@ (define-public gdcm
             ;; The build spams ‘Fontconfig error: No writable cache
             ;; directories’ in a seemingly endless loop otherwise.
             (lambda _
-              (setenv "HOME" "/tmp"))))
+              (setenv "HOME" "/tmp")))
+          (add-after 'install 'move-files
+            ;; Move utilities to bin output.
+            (lambda _
+              (mkdir-p (string-append #$output:bin "/bin"))
+              (rename-file
+               (string-append #$output "/bin")
+               (string-append #$output:bin "/bin")))))
       #:configure-flags
       #~(list "-DGDCM_BUILD_TESTING=true"
               (string-append "-DCMAKE_CTEST_ARGUMENTS=-E;"
@@ -18105,9 +18112,13 @@ (define-public gdcm
                              "|TestAnonymizer4"
                              "|TestPrinter1"
                              ;; Disable tests that download data from the internet.
+                             "|gdcmscu-echo-dicomserver"
+                             "|gdcmscu-store-dicomserver"
+                             "|gdcmscu-find-dicomserver"
                              "|TestSCUValidation"
                              "|TestEcho"
                              "|TestFind'")
+              "-DGDCM_BUILD_APPLICATIONS:BOOL=ON"
               "-DGDCM_DOCUMENTATION:BOOL=ON"
               "-DGDCM_PDF_DOCUMENTATION:BOOL=OFF"
               (string-append "-DGDCM_INSTALL_DOC_DIR="
-- 
2.39.1


[-- Attachment #4: 0003-gnu-gdcm-Use-more-system-libraries.patch --]
[-- Type: text/x-patch, Size: 3560 bytes --]

From 467a7b614ccafa2de51a8e56a6ecf384fb6fa07b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Tor-bj=C3=B6rn=20Claesson?= <tclaesson@gmail.com>
Date: Fri, 27 Jan 2023 17:03:36 +0200
Subject: [PATCH 3/3] gnu: gdcm: Use more system libraries.
gnu: gdcm: Use more system libraries.
---
 gnu/packages/bioinformatics.scm | 48 ++++++++++++++++++++++++++++++---
 1 file changed, 45 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm
index 9a3c0f7d42..77b3388f2e 100644
--- a/gnu/packages/bioinformatics.scm
+++ b/gnu/packages/bioinformatics.scm
@@ -18082,7 +18082,28 @@ (define-public gdcm
               (file-name (git-file-name name version))
               (sha256
                (base32
-                "1rf0p7dnakjry0fa6ax1h762bn0l5n6ibfdxn077mjvwgpqan51l"))))
+                "1rf0p7dnakjry0fa6ax1h762bn0l5n6ibfdxn077mjvwgpqan51l"))
+              (modules '((guix build utils)
+                         (ice-9 ftw)))
+              (snippet
+               '(begin
+                  (define (unbundle? file)
+                    (member file '("dicom3tools"
+                                   "gdcmexpat"
+                                   "gdcmutfcpp"
+                                   "gdcmuuid"
+                                   "gdcmzlib"
+                                   "getopt"
+                                   "KWStyle"
+                                   "pvrg"
+                                   "Release"
+                                   "VTK")))
+                  (with-directory-excursion "Utilities"
+                    (for-each (lambda (utility)
+                                (delete-file-recursively utility)
+                                (substitute* "CMakeLists.txt"
+                                  (((string-append ".*/" utility "/.*")) "")))
+                              (scandir "." unbundle?)))))))
     (build-system cmake-build-system)
     (outputs '("out" "bin" "doc"))
     (arguments
@@ -18123,8 +18144,29 @@ (define-public gdcm
               "-DGDCM_PDF_DOCUMENTATION:BOOL=OFF"
               (string-append "-DGDCM_INSTALL_DOC_DIR="
                              #$output:doc "/share/doc/" #$name)
-              "-DGDCM_BUILD_DOCBOOK_MANPAGES:BOOL=OFF"))) ; TODO: need ‘xsl-ns’
-    (native-inputs (list doxygen graphviz))
+              "-DGDCM_BUILD_DOCBOOK_MANPAGES:BOOL=OFF"  ; TODO: need ‘xsl-ns’
+              ;; Libraries
+              "-DGDCM_USE_SYSTEM_EXPAT:BOOL=ON"
+              "-DGDCM_USE_SYSTEM_LIBXML2:BOOL=ON"
+              "-DGDCM_USE_SYSTEM_OPENSSL:BOOL=ON"
+              "-DGDCM_USE_SYSTEM_POPPLER:BOOL=ON"
+              "-DGDCM_USE_SYSTEM_UUID:BOOL=ON"
+              "-DGDCM_USE_SYSTEM_ZLIB:BOOL=ON"
+              ;; TODO: Unbundle these if possible.
+              "-DGDCM_USE_SYSTEM_CHARLS:BOOL=OFF"
+              "-DGDCM_USE_SYSTEM_JSON:BOOL=OFF"
+              "-DGDCM_USE_SYSTEM_LJPEG:BOOL=OFF"
+              "-DGDCM_USE_SYSTEM_OPENJPEG:BOOL=OFF"
+              "-DGDCM_USE_SYSTEM_PAPYRUS3:BOOL=OFF"
+              "-DGDCM_USE_SYSTEM_SOCKETXX:BOOL=OFF")))
+    (inputs (list
+             expat
+             libxml2
+             openssl
+             poppler
+             `(,util-linux "lib")
+             zlib))
+    (native-inputs (list doxygen graphviz pkg-config))
     (home-page "https://gdcm.sourceforge.net/wiki/index.php/Main_Page")
     (synopsis "Grassroots DICOM library")
     (description
-- 
2.39.1


  reply	other threads:[~2023-01-27 15:15 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-07 19:40 [bug#60640] Gnu: Add gdcm Tor-björn Claesson
     [not found] ` <handler.60640.B.167314095112989.ack@debbugs.gnu.org>
2023-01-08  7:59   ` [bug#60640] Acknowledgement (Gnu: Add gdcm) Tor-björn Claesson
2023-01-08  8:04     ` Tor-björn Claesson
2023-01-09  8:28       ` Tobias Geerinckx-Rice via Guix-patches via
2023-01-09 10:50         ` Tor-björn Claesson
2023-01-10  7:01           ` ( via Guix-patches via
2023-01-10 14:40     ` Tobias Geerinckx-Rice via Guix-patches via
2023-01-10 15:10       ` Tor-björn Claesson
2023-01-12 22:17     ` [bug#60640] Gnu: Add gdcm Ludovic Courtès
2023-01-13 10:45       ` Tor-björn Claesson
2023-01-13 23:50         ` Ludovic Courtès
2023-01-14  8:19           ` Tor-björn Claesson
2023-01-14  9:30           ` Tor-björn Claesson
2023-01-17 14:36             ` Ludovic Courtès
2023-01-14 17:06           ` Tor-björn Claesson
2023-01-17 14:38             ` Ludovic Courtès
2023-01-17 19:21               ` Tor-björn Claesson
2023-01-25 22:22                 ` Ludovic Courtès
2023-01-20 11:30               ` Tor-björn Claesson
2023-01-20 12:44                 ` Tor-björn Claesson
2023-01-25 22:01                   ` Ludovic Courtès
2023-01-31 21:42                     ` Tor-björn Claesson
2023-01-25 22:49                   ` Ludovic Courtès
2023-01-27 15:06                     ` Tor-björn Claesson [this message]
2023-01-14 19:34           ` Tor-björn Claesson
2023-01-14 21:58           ` Tor-björn Claesson
2023-01-10 14:52 ` Tobias Geerinckx-Rice via Guix-patches via
2023-01-11  5:29   ` Tor-björn Claesson
2023-01-12 11:21     ` Tor-björn Claesson
2024-02-19 22:41 ` bug#60640: " Sharlatan Hellseher

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=878rhoxb6c.fsf@gmail.com \
    --to=tclaesson@gmail.com \
    --cc=60640@debbugs.gnu.org \
    --cc=ludo@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.