Opened 11 months ago

Last modified 7 months ago

#69035 assigned defect

darktable, darktable-devel @4.4.1: error: too many arguments to function call

Reported by: ryandesign (Ryan Carsten Schmidt) Owned by: MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)
Priority: Normal Milestone:
Component: ports Version: 2.8.1
Keywords: Cc: mascguy (Christopher Nielsen), cooljeanius (Eric Gallager)
Port: darktable, darktable-devel

Description

https://build.macports.org/builders/ports-11_arm64-builder/builds/112081/steps/install-port/logs/stdio

/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_graphics_darktable/darktable/work/darktable-4.4.1/src/imageio/imageio_jpegxl.c:226:93: error: too many arguments to function call, expected 3, have 4
      if(JxlDecoderGetICCProfileSize(decoder, &pixel_format, JXL_COLOR_PROFILE_TARGET_DATA, &icc_size)
         ~~~~~~~~~~~~~~~~~~~~~~~~~~~                                                        ^~~~~~~~~
/opt/local/include/jxl/decode.h:775:29: note: 'JxlDecoderGetICCProfileSize' declared here
JXL_EXPORT JxlDecoderStatus JxlDecoderGetICCProfileSize(
                            ^

Change History (5)

comment:1 Changed 9 months ago by pinxue (品雪)

Before port is fixed, here is a workaround for darktable 4.4.1 (the release used by port at this moment) Put following text in /opt/local/var/macports/sources/rsync.macports.org/macports/release/tarballs/ports/graphics/darktable/files/imageio_jpegxl.patch

--- src/imageio/imageio_jpegxl.c.orig	2024-02-12 20:48:45
+++ src/imageio/imageio_jpegxl.c	2024-02-12 20:49:16
@@ -223,7 +223,7 @@
 
     if(status == JXL_DEC_COLOR_ENCODING)
     {
-      if(JxlDecoderGetICCProfileSize(decoder, &pixel_format, JXL_COLOR_PROFILE_TARGET_DATA, &icc_size)
+      if(JxlDecoderGetICCProfileSize(decoder, JXL_COLOR_PROFILE_TARGET_DATA, &icc_size)
          == JXL_DEC_SUCCESS)
       {
         if(icc_size)
@@ -231,7 +231,6 @@
           img->profile_size = icc_size;
           img->profile = (uint8_t *)g_malloc0(icc_size);
           JxlDecoderGetColorAsICCProfile(decoder,
-                                         &pixel_format,
                                          JXL_COLOR_PROFILE_TARGET_DATA,
                                          img->profile,
                                          icc_size);

Then add one line in /opt/local/var/macports/sources/rsync.macports.org/macports/release/tarballs/ports/graphics/darktable/Portfile

patchfiles-append imageio_jpegxl.patch

Then port clean darktable, port install darktable.

Latest up-stream source code already fixed it by using version check macro, so maybe simplest way is just upgrade the port to use later release.

comment:2 in reply to:  1 Changed 9 months ago by ryandesign (Ryan Carsten Schmidt)

Summary: darktable, darktable-devel: error: too many arguments to function calldarktable, darktable-devel @4.4.1: error: too many arguments to function call

Replying to pinxue:

Latest up-stream source code already fixed it by using version check macro, so maybe simplest way is just upgrade the port to use later release.

Indeed, I didn't see that version 4.6.1 has been released. port livecheck darktable does not identify it. So in addition to updating darktable and darktable-devel to this new version, the livecheck should be fixed.

comment:3 Changed 9 months ago by cooljeanius (Eric Gallager)

Cc: cooljeanius added

comment:4 Changed 9 months ago by cooljeanius (Eric Gallager)

Just FYI this blocks rev-upgrade from moving on to rebuilding other broken ports for me

comment:5 in reply to:  4 Changed 7 months ago by cooljeanius (Eric Gallager)

Replying to cooljeanius:

Just FYI this blocks rev-upgrade from moving on to rebuilding other broken ports for me

...actually wait, I think I might be experiencing a different issue, as I tried applying the patch, and the build is still failing for me... it's hard to tell where exactly the error is due to the parallel build mixing different lines of output together...

Note: See TracTickets for help on using tickets.