[PATCH 1/2] gnu: darktable: Update to 3.2.1.

  • Done
  • quality assurance status badge
Details
3 participants
  • Brett Gilio
  • Ludovic Courtès
  • Vinicius Monego
Owner
unassigned
Submitted by
Vinicius Monego
Severity
normal
V
V
Vinicius Monego wrote on 11 Aug 2020 01:23
(address . guix-patches@gnu.org)(name . Vinicius Monego)(address . monego@posteo.net)
20200810232325.61515-1-monego@posteo.net
* gnu/packages/photo.scm (darktable): update to 3.2.1.
---
gnu/packages/photo.scm | 29 +++++++++++++++--------------
1 file changed, 15 insertions(+), 14 deletions(-)

Toggle diff (80 lines)
diff --git a/gnu/packages/photo.scm b/gnu/packages/photo.scm
index abdb751a5a..6be0094a8d 100644
--- a/gnu/packages/photo.scm
+++ b/gnu/packages/photo.scm
@@ -465,7 +465,7 @@ photographic equipment.")
(define-public darktable
(package
(name "darktable")
- (version "3.0.2")
+ (version "3.2.1")
(source
(origin
(method url-fetch)
@@ -473,7 +473,7 @@ photographic equipment.")
"https://github.com/darktable-org/darktable/releases/"
"download/release-" version "/darktable-" version ".tar.xz"))
(sha256
- (base32 "1yrnkw8c47kmy2x6m1xp69hwyk02xyc8pd9kvcmyj54lzrhzdfka"))))
+ (base32 "035rvqmw386hm0jpi14lf4dnpr5rjkalzjkyprqh42nwi3m86dkf"))))
(build-system cmake-build-system)
(arguments
`(#:tests? #f ; there are no tests
@@ -482,6 +482,7 @@ photographic equipment.")
(modify-phases %standard-phases
(add-before 'configure 'prepare-build-environment
(lambda* (#:key inputs #:allow-other-keys)
+ ;; Build fails with every version of GCC.
(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.
@@ -524,35 +525,35 @@ photographic equipment.")
(inputs
`(("cairo" ,cairo)
("colord-gtk" ,colord-gtk)
- ("cups" ,cups)
+ ("cups" ,cups) ;optional, for printing support
("curl" ,curl)
("dbus-glib" ,dbus-glib)
("exiv2" ,exiv2)
("freeimage" ,freeimage)
- ("gmic" ,gmic)
+ ("gmic" ,gmic) ;optional
("graphicsmagick" ,graphicsmagick)
("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
("gtk+" ,gtk+)
("ilmbase" ,ilmbase)
- ("iso-codes" ,iso-codes)
+ ("iso-codes" ,iso-codes) ;optional
("json-glib" ,json-glib)
("lcms" ,lcms)
- ("lensfun" ,lensfun)
- ("libgphoto2" ,libgphoto2)
+ ("lensfun" ,lensfun) ;optional
+ ("libgphoto2" ,libgphoto2) ;optional
("libjpeg" ,libjpeg-turbo)
("libomp" ,libomp)
("libpng" ,libpng)
("librsvg" ,librsvg)
- ("libsecret" ,libsecret)
- ("libsoup" ,libsoup)
+ ("libsecret" ,libsecret) ;optional
+ ("libsoup" ,libsoup) ;optional
("libtiff" ,libtiff)
- ("libwebp" ,libwebp)
- ("libxml2" ,libxml2)
+ ("libwebp" ,libwebp) ;optional, for WebP support
+ ("libxml2" ,libxml2) ;optional, for validation of data/cameras.xml
("libxslt" ,libxslt)
- ("lua" ,lua) ;for plugins
+ ("lua" ,lua) ;optional, for plugins
("openexr" ,openexr)
- ("openjpeg" ,openjpeg)
- ("osm-gps-map" ,osm-gps-map)
+ ("openjpeg" ,openjpeg) ;optional
+ ("osm-gps-map" ,osm-gps-map) ;optional,
("pugixml" ,pugixml)
("python-jsonschema" ,python-jsonschema)
("sqlite" ,sqlite)))
--
2.20.1
V
V
Vinicius Monego wrote on 11 Aug 2020 01:25
[PATCH 2/2] gnu: darktable: Add dependency on libavif, ocl-icd.
(address . 42807@debbugs.gnu.org)(name . Vinicius Monego)(address . monego@posteo.net)
20200810232515.61773-1-monego@posteo.net
* gnu/packages/photo.scm (darktable)[inputs]: Add libavif, ocl-icd.
[arguments]: Set LD_LIBRARY_PATH for OpenCL.
[supported-systems]: Remove i686 which is not supported anymore.
---
gnu/packages/photo.scm | 26 ++++++++++++++++----------
1 file changed, 16 insertions(+), 10 deletions(-)

Toggle diff (60 lines)
diff --git a/gnu/packages/photo.scm b/gnu/packages/photo.scm
index 6be0094a8d..1b82cef8df 100644
--- a/gnu/packages/photo.scm
+++ b/gnu/packages/photo.scm
@@ -502,15 +502,19 @@ photographic equipment.")
(string-append (assoc-ref inputs "ilmbase")
"/include/OpenEXR:" (or (getenv "CPATH") "")))
#t))
- (add-after 'install 'wrap-program
- (lambda* (#:key inputs outputs #:allow-other-keys)
- (wrap-program (string-append (assoc-ref outputs "out")
- "/bin/darktable")
- ;; For GtkFileChooserDialog.
- `("GSETTINGS_SCHEMA_DIR" =
- (,(string-append (assoc-ref inputs "gtk+")
- "/share/glib-2.0/schemas"))))
- #t)))))
+ (add-after 'install 'wrap-program
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (wrap-program (string-append (assoc-ref outputs "out")
+ "/bin/darktable")
+ ;; For GtkFileChooserDialog.
+ `("GSETTINGS_SCHEMA_DIR" =
+ (,(string-append (assoc-ref inputs "gtk+")
+ "/share/glib-2.0/schemas")))
+ ;; For libOpenCL.so.
+ `("LD_LIBRARY_PATH" =
+ (,(string-append (assoc-ref inputs "ocl-icd")
+ "/lib"))))
+ #t)))))
(native-inputs
`(("clang" ,clang-9)
("desktop-file-utils" ,desktop-file-utils)
@@ -539,6 +543,7 @@ photographic equipment.")
("json-glib" ,json-glib)
("lcms" ,lcms)
("lensfun" ,lensfun) ;optional
+ ("libavif" ,libavif) ;optional, for AVIF support
("libgphoto2" ,libgphoto2) ;optional
("libjpeg" ,libjpeg-turbo)
("libomp" ,libomp)
@@ -551,6 +556,7 @@ photographic equipment.")
("libxml2" ,libxml2) ;optional, for validation of data/cameras.xml
("libxslt" ,libxslt)
("lua" ,lua) ;optional, for plugins
+ ("ocl-icd" ,ocl-icd) ;optional, for OpenCL support
("openexr" ,openexr)
("openjpeg" ,openjpeg) ;optional
("osm-gps-map" ,osm-gps-map) ;optional,
@@ -564,7 +570,7 @@ developer. It manages your digital negatives in a database, lets you view
them through a zoomable lighttable and enables you to develop raw images
and enhance them.")
;; See src/is_supported_platform.h for supported platforms.
- (supported-systems '("i686-linux" "x86_64-linux" "aarch64-linux"))
+ (supported-systems '("x86_64-linux" "aarch64-linux"))
(license (list license:gpl3+ ;; Darktable itself.
license:lgpl2.1+)))) ;; Rawspeed library.
--
2.20.1
B
B
Brett Gilio wrote on 11 Aug 2020 01:31
Re: [bug#42807] [PATCH 1/2] gnu: darktable: Update to 3.2.1.
(name . Vinicius Monego)(address . monego@posteo.net)(address . 42807@debbugs.gnu.org)
87imdqcc3a.fsf@gnu.org
Vinicius Monego <monego@posteo.net> writes:

Toggle snippet (4 lines)
> + ;; Build fails with every version of GCC.
> (setenv "CC" "clang") (setenv "CXX" "clang++")

Hey, is this issue with GCC reported upstream? I'm not opposed to
compiling against clang<++>, especially since it is already in the
closure for the package. But if there is a reported issue for this, the
ticket number should be referenced in the comment ideally. Otherwise,
could you report it?

Thanks!

Brett Gilio
V
V
Vinicius Monego wrote on 11 Aug 2020 03:12
(name . Brett Gilio)(address . brettg@gnu.org)(address . 42807@debbugs.gnu.org)
875z9qyoh7.fsf@posteo.net
Brett Gilio writes:

Toggle quote (10 lines)
> Hey, is this issue with GCC reported upstream? I'm not opposed
> to
> compiling against clang<++>, especially since it is already in
> the
> closure for the package. But if there is a reported issue for
> this, the
> ticket number should be referenced in the comment
> ideally. Otherwise,
> could you report it?

I debugged the build with -K and the problem seems to be this tiny
detail:

`ld: cannot find -lpthreads`

From a quick read online, -lpthreads is Clang syntax. In GCC it's
only
-lpthread or -pthread. That flag is not changed for GCC. Some
other flags are
also using -s termination which GCC doesn't recognize.

I'm not sure who's at fault here. I may be missing something in
the
build steps, but I don't have enough time to investigate this.

The ticket/issue that more closely matches this problem is #5185
and GCC 8+ is
officially supported by Darktable.
V
V
Vinicius Monego wrote on 12 Aug 2020 03:01
(name . Brett Gilio)(address . brettg@gnu.org)(address . 42807@debbugs.gnu.org)
87y2mkisn4.fsf@posteo.net
Vinicius Monego writes:

Toggle quote (6 lines)
> I debugged the build with -K and the problem seems to be this
> tiny
> detail:
>
> `ld: cannot find -lpthreads`

To correct myself, that's only normal CMake check, nothing wrong
there. Pthread is passed correctly to make.

The actual failure in my build log is something to do with OpenMP
(libgomp):

VC5Decompressor.cpp:744: undefined reference to
`GOMP_loop_nonmonotonic_dynamic_next'
collect2: error: ld returned 1 exit status

Could this be merged as is for now? I may send a v2 with better
comments and leave GCC for another patch. I'd make sure that the
issue
is with upstream before submitting an issue there.
V
V
Vinicius Monego wrote on 13 Aug 2020 16:59
[PATCH v2 1/2] gnu: darktable: Update to 3.2.1.
(address . 42807@debbugs.gnu.org)(name . Vinicius Monego)(address . monego@posteo.net)
20200813145916.38243-1-monego@posteo.net
* gnu/packages/photo.scm (darktable): Update to 3.2.1.
---
Edited description for GCC error and added more comments about optional dependencies
gnu/packages/photo.scm | 30 ++++++++++++++++--------------
1 file changed, 16 insertions(+), 14 deletions(-)

Toggle diff (82 lines)
diff --git a/gnu/packages/photo.scm b/gnu/packages/photo.scm
index abdb751a5a..688de5c460 100644
--- a/gnu/packages/photo.scm
+++ b/gnu/packages/photo.scm
@@ -465,7 +465,7 @@ photographic equipment.")
(define-public darktable
(package
(name "darktable")
- (version "3.0.2")
+ (version "3.2.1")
(source
(origin
(method url-fetch)
@@ -473,7 +473,7 @@ photographic equipment.")
"https://github.com/darktable-org/darktable/releases/"
"download/release-" version "/darktable-" version ".tar.xz"))
(sha256
- (base32 "1yrnkw8c47kmy2x6m1xp69hwyk02xyc8pd9kvcmyj54lzrhzdfka"))))
+ (base32 "035rvqmw386hm0jpi14lf4dnpr5rjkalzjkyprqh42nwi3m86dkf"))))
(build-system cmake-build-system)
(arguments
`(#:tests? #f ; there are no tests
@@ -482,6 +482,8 @@ photographic equipment.")
(modify-phases %standard-phases
(add-before 'configure 'prepare-build-environment
(lambda* (#:key inputs #:allow-other-keys)
+ ;; Rawspeed fails to build with GCC due to OpenMP error:
+ ;; "undefined reference to `GOMP_loop_nonmonotonic_dynamic_next'"
(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.
@@ -523,36 +525,36 @@ photographic equipment.")
("po4a" ,po4a)))
(inputs
`(("cairo" ,cairo)
- ("colord-gtk" ,colord-gtk)
- ("cups" ,cups)
+ ("colord-gtk" ,colord-gtk) ;optional, for color profile support
+ ("cups" ,cups) ;optional, for printing support
("curl" ,curl)
("dbus-glib" ,dbus-glib)
("exiv2" ,exiv2)
("freeimage" ,freeimage)
- ("gmic" ,gmic)
+ ("gmic" ,gmic) ;optional, for HaldcLUT support
("graphicsmagick" ,graphicsmagick)
("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
("gtk+" ,gtk+)
("ilmbase" ,ilmbase)
- ("iso-codes" ,iso-codes)
+ ("iso-codes" ,iso-codes) ;optional, for language names in the preferences
("json-glib" ,json-glib)
("lcms" ,lcms)
- ("lensfun" ,lensfun)
- ("libgphoto2" ,libgphoto2)
+ ("lensfun" ,lensfun) ;optional, for the lens distortion plugin
+ ("libgphoto2" ,libgphoto2) ;optional, for camera tethering
("libjpeg" ,libjpeg-turbo)
("libomp" ,libomp)
("libpng" ,libpng)
("librsvg" ,librsvg)
- ("libsecret" ,libsecret)
+ ("libsecret" ,libsecret) ;optional, for storing passwords
("libsoup" ,libsoup)
("libtiff" ,libtiff)
- ("libwebp" ,libwebp)
+ ("libwebp" ,libwebp) ;optional, for WebP support
("libxml2" ,libxml2)
("libxslt" ,libxslt)
- ("lua" ,lua) ;for plugins
- ("openexr" ,openexr)
- ("openjpeg" ,openjpeg)
- ("osm-gps-map" ,osm-gps-map)
+ ("lua" ,lua) ;optional, for plugins
+ ("openexr" ,openexr) ;optional, for EXR import/export
+ ("openjpeg" ,openjpeg) ;optional, for JPEG2000 export
+ ("osm-gps-map" ,osm-gps-map) ;optional, for geotagging view
("pugixml" ,pugixml)
("python-jsonschema" ,python-jsonschema)
("sqlite" ,sqlite)))
--
2.20.1
V
V
Vinicius Monego wrote on 13 Aug 2020 16:59
[PATCH v2 2/2] gnu: darktable: Add dependency on libavif, ocl-icd.
(address . 42807@debbugs.gnu.org)(name . Vinicius Monego)(address . monego@posteo.net)
20200813145916.38243-2-monego@posteo.net
* gnu/packages/photo.scm (darktable)[inputs]: Add libavif, ocl-icd.
[arguments]: Set LD_LIBRARY_PATH for OpenCL.
[supported-systems]: Remove i686 which is not supported anymore.
---
gnu/packages/photo.scm | 26 ++++++++++++++++----------
1 file changed, 16 insertions(+), 10 deletions(-)

Toggle diff (60 lines)
diff --git a/gnu/packages/photo.scm b/gnu/packages/photo.scm
index 688de5c460..2684ac294d 100644
--- a/gnu/packages/photo.scm
+++ b/gnu/packages/photo.scm
@@ -503,15 +503,19 @@ photographic equipment.")
(string-append (assoc-ref inputs "ilmbase")
"/include/OpenEXR:" (or (getenv "CPATH") "")))
#t))
- (add-after 'install 'wrap-program
- (lambda* (#:key inputs outputs #:allow-other-keys)
- (wrap-program (string-append (assoc-ref outputs "out")
- "/bin/darktable")
- ;; For GtkFileChooserDialog.
- `("GSETTINGS_SCHEMA_DIR" =
- (,(string-append (assoc-ref inputs "gtk+")
- "/share/glib-2.0/schemas"))))
- #t)))))
+ (add-after 'install 'wrap-program
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (wrap-program (string-append (assoc-ref outputs "out")
+ "/bin/darktable")
+ ;; For GtkFileChooserDialog.
+ `("GSETTINGS_SCHEMA_DIR" =
+ (,(string-append (assoc-ref inputs "gtk+")
+ "/share/glib-2.0/schemas")))
+ ;; For libOpenCL.so.
+ `("LD_LIBRARY_PATH" =
+ (,(string-append (assoc-ref inputs "ocl-icd")
+ "/lib"))))
+ #t)))))
(native-inputs
`(("clang" ,clang-9)
("desktop-file-utils" ,desktop-file-utils)
@@ -541,6 +545,7 @@ photographic equipment.")
("lcms" ,lcms)
("lensfun" ,lensfun) ;optional, for the lens distortion plugin
("libgphoto2" ,libgphoto2) ;optional, for camera tethering
+ ("libavif" ,libavif) ;optional, for AVIF support
("libjpeg" ,libjpeg-turbo)
("libomp" ,libomp)
("libpng" ,libpng)
@@ -552,6 +557,7 @@ photographic equipment.")
("libxml2" ,libxml2)
("libxslt" ,libxslt)
("lua" ,lua) ;optional, for plugins
+ ("ocl-icd" ,ocl-icd) ;optional, for OpenCL support
("openexr" ,openexr) ;optional, for EXR import/export
("openjpeg" ,openjpeg) ;optional, for JPEG2000 export
("osm-gps-map" ,osm-gps-map) ;optional, for geotagging view
@@ -565,7 +571,7 @@ developer. It manages your digital negatives in a database, lets you view
them through a zoomable lighttable and enables you to develop raw images
and enhance them.")
;; See src/is_supported_platform.h for supported platforms.
- (supported-systems '("i686-linux" "x86_64-linux" "aarch64-linux"))
+ (supported-systems '("x86_64-linux" "aarch64-linux"))
(license (list license:gpl3+ ;; Darktable itself.
license:lgpl2.1+)))) ;; Rawspeed library.
--
2.20.1
L
L
Ludovic Courtès wrote on 4 Sep 2020 11:06
Re: [bug#42807] [PATCH 1/2] gnu: darktable: Update to 3.2.1.
(name . Vinicius Monego)(address . monego@posteo.net)
87sgbxvrkz.fsf@gnu.org
Hi,

Vinicius Monego <monego@posteo.net> skribis:

Toggle quote (7 lines)
> The actual failure in my build log is something to do with OpenMP
> (libgomp):
>
> VC5Decompressor.cpp:744: undefined reference to
> `GOMP_loop_nonmonotonic_dynamic_next'
> collect2: error: ld returned 1 exit status

It looks like a case where ‘-fopenmp’ is used as compile time but
omitted at link time. The fix is to add it at link time (to the LDFLAGS
of the executable at hand).

It would be nice to see eventually if this can be fixed so we can switch
back to GCC.

Thanks,
Ludo’.
L
L
Ludovic Courtès wrote on 4 Sep 2020 11:06
Re: [bug#42807] [PATCH v2 1/2] gnu: darktable: Update to 3.2.1.
(name . Vinicius Monego)(address . monego@posteo.net)(address . 42807-done@debbugs.gnu.org)
87tuwdvrll.fsf@gnu.org
Hi,

Vinicius Monego <monego@posteo.net> skribis:

Toggle quote (2 lines)
> * gnu/packages/photo.scm (darktable): Update to 3.2.1.

[...]

Toggle quote (4 lines)
> * gnu/packages/photo.scm (darktable)[inputs]: Add libavif, ocl-icd.
> [arguments]: Set LD_LIBRARY_PATH for OpenCL.
> [supported-systems]: Remove i686 which is not supported anymore.

Thanks, applied!

Toggle quote (11 lines)
> + (wrap-program (string-append (assoc-ref outputs "out")
> + "/bin/darktable")
> + ;; For GtkFileChooserDialog.
> + `("GSETTINGS_SCHEMA_DIR" =
> + (,(string-append (assoc-ref inputs "gtk+")
> + "/share/glib-2.0/schemas")))
> + ;; For libOpenCL.so.
> + `("LD_LIBRARY_PATH" =
> + (,(string-append (assoc-ref inputs "ocl-icd")
> + "/lib"))))

It’s weird that LD_LIBRARY_PATH needs to be specified here. Isn’t the
binary already linked against libOpenCL? If so, it should have it in
as NEEDed and its its RUNPATH, no?

Ludo’.
Closed
V
V
Vinicius Monego wrote on 5 Sep 2020 20:17
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 42807-done@debbugs.gnu.org)
87a6y4ay14.fsf@posteo.net
Ludovic Courtès writes:

Toggle quote (2 lines)
> Isn’t the binary already linked against libOpenCL?

It's not linked. libOpenCL is dynamically loaded. See
src/common/dlopencl.c.
Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 42807@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 42807
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch