GNU bug report logs - #42067
[PATCH] gnu: darktable: Add optional dependencies.

Previous Next

Package: guix-patches;

Reported by: Vinicius Monego <monego <at> posteo.net>

Date: Fri, 26 Jun 2020 20:40:01 UTC

Severity: normal

Tags: patch

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 42067 in the body.
You can then email your comments to 42067 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#42067; Package guix-patches. (Fri, 26 Jun 2020 20:40:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Vinicius Monego <monego <at> posteo.net>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Fri, 26 Jun 2020 20:40:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Vinicius Monego <monego <at> posteo.net>
To: guix-patches <at> gnu.org
Cc: Vinicius Monego <monego <at> posteo.net>
Subject: [PATCH] gnu: darktable: Add optional dependencies.
Date: Fri, 26 Jun 2020 17:39:04 -0300
[arguments]: Fix opencl-c.h path.
[native-inputs]: Add opencl-headers, make LLVM version specific.
[inputs]: Add gmic.
---
 gnu/packages/photo.scm | 15 ++++++++++++---
 1 file changed, 12 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/photo.scm b/gnu/packages/photo.scm
index 75bbc45380..5b5e057b65 100644
--- a/gnu/packages/photo.scm
+++ b/gnu/packages/photo.scm
@@ -55,6 +55,7 @@
   #:use-module (gnu packages gstreamer)
   #:use-module (gnu packages gtk)
   #:use-module (gnu packages image)
+  #:use-module (gnu packages image-processing)
   #:use-module (gnu packages imagemagick)
   #:use-module (gnu packages iso-codes)
   #:use-module (gnu packages libcanberra)
@@ -63,6 +64,7 @@
   #:use-module (gnu packages lua)
   #:use-module (gnu packages man)
   #:use-module (gnu packages maths)
+  #:use-module (gnu packages opencl)
   #:use-module (gnu packages perl)
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages popt)
@@ -480,7 +482,12 @@ photographic equipment.")
        (modify-phases %standard-phases
          (add-before 'configure 'prepare-build-environment
            (lambda* (#:key inputs #:allow-other-keys)
-             (setenv "CC" "clang") (setenv "CXX" "clang++")))
+             (setenv "CC" "clang") (setenv "CXX" "clang++")
+             ;; Darktable looks for opencl-c.h in the LLVM dir. Guix installs
+             ;; it to the Clang dir. We fix this by patching CMakeLists.txt.
+             (substitute* "CMakeLists.txt"
+                          (("\\$\\{LLVM_INSTALL_PREFIX\\}")
+                           (assoc-ref %build-inputs "clang")))))
          (add-before 'configure 'set-LDFLAGS-and-CPATH
            (lambda* (#:key inputs outputs #:allow-other-keys)
              (setenv "LDFLAGS"
@@ -508,7 +515,8 @@ photographic equipment.")
        ("glib:bin" ,glib "bin")
        ("gobject-introspection" ,gobject-introspection)
        ("intltool" ,intltool)
-       ("llvm" ,llvm)
+       ("llvm" ,llvm-9) ;should match the Clang version
+       ("opencl-headers" ,opencl-headers)
        ("perl" ,perl)
        ("pkg-config" ,pkg-config)
        ("po4a" ,po4a)))
@@ -520,6 +528,7 @@ photographic equipment.")
        ("dbus-glib" ,dbus-glib)
        ("exiv2" ,exiv2)
        ("freeimage" ,freeimage)
+       ("gmic" ,gmic)
        ("graphicsmagick" ,graphicsmagick)
        ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
        ("gtk+" ,gtk+)
@@ -539,7 +548,7 @@ photographic equipment.")
        ("libwebp" ,libwebp)
        ("libxml2" ,libxml2)
        ("libxslt" ,libxslt)
-       ("lua" ,lua)
+       ("lua" ,lua) ;for plugins
        ("openexr" ,openexr)
        ("openjpeg" ,openjpeg)
        ("osm-gps-map" ,osm-gps-map)
-- 
2.20.1





Reply sent to Ludovic Courtès <ludo <at> gnu.org>:
You have taken responsibility. (Mon, 29 Jun 2020 22:00:02 GMT) Full text and rfc822 format available.

Notification sent to Vinicius Monego <monego <at> posteo.net>:
bug acknowledged by developer. (Mon, 29 Jun 2020 22:00:02 GMT) Full text and rfc822 format available.

Message #10 received at 42067-done <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Vinicius Monego <monego <at> posteo.net>
Cc: 42067-done <at> debbugs.gnu.org
Subject: Re: [bug#42067] [PATCH] gnu: darktable: Add optional dependencies.
Date: Mon, 29 Jun 2020 23:59:01 +0200
[Message part 1 (text/plain, inline)]
Hi,

Vinicius Monego <monego <at> posteo.net> skribis:

> [arguments]: Fix opencl-c.h path.
> [native-inputs]: Add opencl-headers, make LLVM version specific.
> [inputs]: Add gmic.

I adjusted the commit log and applied the tiny change below.

>           (add-before 'configure 'prepare-build-environment
>             (lambda* (#:key inputs #:allow-other-keys)
> -             (setenv "CC" "clang") (setenv "CXX" "clang++")))
> +             (setenv "CC" "clang") (setenv "CXX" "clang++")

BTW, why are we building with Clang?

Thanks!

Ludo’.

[Message part 2 (text/x-patch, inline)]
diff --git a/gnu/packages/photo.scm b/gnu/packages/photo.scm
index 5b5e057b65..09767f464e 100644
--- a/gnu/packages/photo.scm
+++ b/gnu/packages/photo.scm
@@ -486,8 +486,9 @@ photographic equipment.")
              ;; Darktable looks for opencl-c.h in the LLVM dir. Guix installs
              ;; it to the Clang dir. We fix this by patching CMakeLists.txt.
              (substitute* "CMakeLists.txt"
-                          (("\\$\\{LLVM_INSTALL_PREFIX\\}")
-                           (assoc-ref %build-inputs "clang")))))
+               (("\\$\\{LLVM_INSTALL_PREFIX\\}")
+                (assoc-ref %build-inputs "clang")))
+             #t))
          (add-before 'configure 'set-LDFLAGS-and-CPATH
            (lambda* (#:key inputs outputs #:allow-other-keys)
              (setenv "LDFLAGS"

Information forwarded to guix-patches <at> gnu.org:
bug#42067; Package guix-patches. (Tue, 30 Jun 2020 02:43:02 GMT) Full text and rfc822 format available.

Message #13 received at 42067-done <at> debbugs.gnu.org (full text, mbox):

From: Vinicius Monego <monego <at> posteo.net>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: 42067-done <at> debbugs.gnu.org
Subject: [bug#42067] [PATCH] gnu: darktable: Add optional dependencies.
Date: Mon, 29 Jun 2020 23:42:06 -0300
Hello Ludo,

> 
> BTW, why are we building with Clang?
> 

This was briefly discussed in the version update thread (2020-
06/msg00651). To be more descriptive:

DT 3+ requires GCC/Clang 8+ and will fail to build with the default GCC
7.5.0. We have to load a newer version of GCC, or use Clang. Marius
attempted to build it with gcc-9 and "ran into other problems" although
I have succesfully built DT3 with the same compiler and version a while
ago.

Meanwhile, DT's CMakeLists.txt checks for LLVM to enable "test-
compilation of OpenCL programs". If LLVM is not found, this test-
compilation is skipped. If LLVM is found, it checks for Clang, and the
required opencl header is located inside Clang's directory. Because we
"have to have" Clang this way, it made more sense to me to compile with
it.

Anyways, OpenCL is optional. To build with GCC only, we would have to
load the gcc module and skip the test-compilation. It may be possible
to use both gcc and clang, but that would add redundancy.





Information forwarded to guix-patches <at> gnu.org:
bug#42067; Package guix-patches. (Tue, 30 Jun 2020 10:06:02 GMT) Full text and rfc822 format available.

Message #16 received at 42067-done <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Vinicius Monego <monego <at> posteo.net>
Cc: 42067-done <at> debbugs.gnu.org
Subject: Re: [bug#42067] [PATCH] gnu: darktable: Add optional dependencies.
Date: Tue, 30 Jun 2020 12:05:06 +0200
Hi Vinicius,

Vinicius Monego <monego <at> posteo.net> skribis:

>> BTW, why are we building with Clang?
>> 
>
> This was briefly discussed in the version update thread (2020-
> 06/msg00651). To be more descriptive:

Oh sorry, I have overlooked that.

> DT 3+ requires GCC/Clang 8+ and will fail to build with the default GCC
> 7.5.0. We have to load a newer version of GCC, or use Clang. Marius
> attempted to build it with gcc-9 and "ran into other problems" although
> I have succesfully built DT3 with the same compiler and version a while
> ago.
>
> Meanwhile, DT's CMakeLists.txt checks for LLVM to enable "test-
> compilation of OpenCL programs". If LLVM is not found, this test-
> compilation is skipped. If LLVM is found, it checks for Clang, and the
> required opencl header is located inside Clang's directory. Because we
> "have to have" Clang this way, it made more sense to me to compile with
> it.
>
> Anyways, OpenCL is optional. To build with GCC only, we would have to
> load the gcc module and skip the test-compilation. It may be possible
> to use both gcc and clang, but that would add redundancy.

What’s the “test-compilation of OpenCL programs”?  Are we just talking
about the test suite?

Either way, I guess my main points are (1) it’d be nice to add a comment
on why we’re using Clang, and (2) if we can use GCC instead, that should
be our default choice.  I’m not saying we should address this right
away, but we should keep it in mind.

Thanks,
Ludo’.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 28 Jul 2020 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 270 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.