Problem building darktable master on Windows 11 using MSYS MINGW64

Hi all,

does anyone have some hint, as I’m currently failing to build darktable current master on Windows 11 using MSYS MINGW64 (was working up to [c88724fe] / build 1290, which was the last version I compiled). I already deleted the build directory and launched the build again, but this has not solved the problem.

My steps are always as follows:

  • pacman -Syu
  • lensfun-update-data
  • then start the build

Currently I’m getting the following error log when linking of bin\libdarktable.dll is reached

-- Build files have been written to: C:/msys64/home/xxx/darktable/build
[0/2] Re-checking globbed directories...
[10/940] Updating version string (git checkout)
Version string: 4.7.0+1328~gdcd6b3e103
[84/940] Generating bin/version_gen.c

[85/940] Checking validity of cameras.xml
C:/msys64/home/xxx/darktable/src/external/rawspeed/data/cameras.xml validates
[398/940] Linking C shared library bin\libdarktable.dll
FAILED: bin/libdarktable.dll bin/libdarktable.dll.a
C:\WINDOWS\system32\cmd.exe /C "cd . && C:\msys64\mingw64\bin\cc.exe -Wall -Wno-format -Wshadow -Wtype-limits -Wvla -Wold-style-declaration -Wmaybe-uninitialized -Wno-unknown-pragmas -Wno-error=varargs -Wno-format-truncation -Wno-error=address-of-packed-member -fopenmp -march=native -msse2 -g -mfpmath=sse -O3 -DNDEBUG -O3 -ffast-math -fno-finite-math-only -fexpensive-optimizations  -Wl,--enable-runtime-pseudo-reloc -shared -o bin\libdarktable.dll -Wl,--out-implib,bin\libdarktable.dll.a -Wl,--major-image-version,0,--minor-image-version,0 @CMakeFiles\lib_darktable.rsp && C:\WINDOWS\system32\cmd.exe /C "cd /D C:\msys64\home\xxx\darktable\build\bin && C:\msys64\mingw64\bin\cmake.exe -E make_directory .debug && objcopy --only-keep-debug C:/msys64/home/xxx/darktable/build/bin/libdarktable.dll C:/msys64/home/xxx/darktable/build/bin/libdarktable.dll.dbg && objcopy --strip-debug C:/msys64/home/xxx/darktable/build/bin/libdarktable.dll && objcopy --add-gnu-debuglink=libdarktable.dll.dbg C:/msys64/home/xxx/darktable/build/bin/libdarktable.dll""
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/14.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: bin/CMakeFiles/lib_darktable.dir/common/curl_tools.c.obj: in function `dt_curl_init':
C:/msys64/home/xxx/darktable/src/common/curl_tools.c:26:(.text+0x17): undefined reference to `__imp_curl_easy_reset'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/14.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/msys64/home/xxx/darktable/src/common/curl_tools.c:30:(.text+0x39): undefined reference to `__imp_curl_easy_setopt'
collect2.exe: error: ld returned 1 exit status
[405/940] Building C object lib/darktable/plugins/lighttable/CMakeFiles/export.dir/export_metadata.c.obj
ninja: build stopped: subcommand failed.
-- Install configuration: "Release"
CMake Error at build/po/cmake_install.cmake:41 (file):
  file INSTALL cannot find
  "C:/msys64/home/xxx/darktable/build/bin/../share/locale/af/LC_MESSAGES/darktable.mo":
  No error.
Call Stack (most recent call first):
  build/cmake_install.cmake:42 (include)

Thanks in advance for any hints - Lars.

You have to revert the curl package to the previous version. I noticed this issue this week, but did not look further into the cause. Since the Linux builds do work, I am assuming the issue is only in the curl msys packaging.

1 Like

P.S. You should already be using UCRT64 on Windows11 instead of MINGW64, which will probably become unsupported in some future dt version.

1 Like

Thank you so much @g-man and @kmilos for your help and your swift reply. So I will try to downgrade curl, happy to not yet having cleaned the package cache :grin:
Regarding using UCRT64 instead of MINGW64 I thought this was just required for Windows 8.1. But perhaps I misunderstood something in the build instructions, so thanks for this hint, too :slight_smile:

I think this is what you need to go back (on cellphone so I can’t confirm)

pacman -U --noconfirm https://repo.msys2.org/mingw/ucrt64/mingw-w64-ucrt-x86_64-curl-8.7.1-1-any.pkg.tar.zst

1 Like

Building dt is working again, after downgrading curl to 8.7.1 from the package cache on my system - thanks again @g-man :+1:

Should be working again on master w/ any curl version. @Macchiato17

1 Like

To whom it may concern and just to keep anyone from getting frustrated :wink: It seems as if mingw-w64-ucrt-x86_64-libheif-1.19.1-1 is currently producing a build error on MSYS UCRT64 on Windows 11. I just downgraded to 1.18.2-3 which builds fine again without throwing an error.

1 Like

FWIW, the patched libheif-1.19.1-2 package was just published in the MSYS2 repos.

2 Likes

Cool, thanks for the kind notification.