Problems building Windows dt

Since my last build at the end of March, there have been some changes in the way it is done. I am trying to follow the instructions at darktable/BUILD.md at master · darktable-org/darktable · GitHub, but am running into problems.

I started using the instructions document I made using MINGW64. I immediately was directed to information about git security changes, so I went to the build instructions at the above URL and proceeded to follow them up to this command:

cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/opt/darktable …/.

I don’t have Ninja installed, so I tried to use:

cmake -G “MSYS Makefiles” -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/opt/darktable …/.

but that didn’t work. So then I thought I better start from scratch with MSYS2, starting with

pacman -Syu

Everything seemed okay, but at the end this appeared:

mingw-w64-x86_64-windows-default-manifest-6.4-4-any 3.1 KiB 17.1 KiB/s 00:00 [###################################################] 100%
Total (313/313) 578.6 MiB 11.7 MiB/s 00:49 [###################################################] 100%
(313/313) checking keys in keyring [###################################################] 100%
(313/313) checking package integrity [###################################################] 100%
error: mingw-w64-x86_64-libvorbis: signature from “David Macek david.macek.0@gmail.com” is unknown trust
:: File /var/cache/pacman/pkg/mingw-w64-x86_64-libvorbis-1.3.7-1-any.pkg.tar.zst is corrupted (invalid or corrupted package (PGP signature)).
Do you want to delete it? [Y/n] y
error: mingw-w64-x86_64-ffms2: signature from “David Macek david.macek.0@gmail.com” is unknown trust
:: File /var/cache/pacman/pkg/mingw-w64-x86_64-ffms2-2.40-1-any.pkg.tar.zst is corrupted (invalid or corrupted package (PGP signature)).
Do you want to delete it? [Y/n] y
error: failed to commit transaction (invalid or corrupted package)
Errors occurred, no packages were upgraded.

Bill Martz@DESKTOP-U6S1FBL MSYS ~

At this point, I don’t know what to do. Would someone give me some help?

Why not follow the instructions from the build? It works via ninja.

I was following the instructions on

and I tried the command

cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/opt/darktable …/.

but received an error. So I tried the other command, and also received an error. I don’t know anything about Ninja, but I was building without it. To follow your recommendation, where do I begin?

oh, Is the error you received for jsonschema?

You need to downgrade it. Download the version 3 and install it with pacman -U

I thought I should start with the latest MSYS2, so I downloaded msys2-x86_64-20220319.exe, and will try to install it. Good idea?

sure, but Msys2 is not likely the problem. But you will need to downgrade the jsonschema.

this is the repo of the older files. Use the 3.2.0 version instead of default 4.4.0. I did not try to troubleshoot the new one too much and just downgraded.

https://repo.msys2.org/mingw/mingw64/

I don’t know what I am looking at on that page. I found this:

https://repo.msys2.org/mingw/mingw64/mingw-w64-x86_64-python-jsonschema-3.2.0-3-any.pkg.tar.zst.sig

Do I download that?

The one above without the .sig

place it in a folder (I used my home folder in MSYS) then run the pacman with the -U

pacman -U C:/…/mingw-w64… .zst

I have put it here:

C:\msys64\home\mingw-w64-x86_64-python-jsonschema-3.2.0-1-any.pkg.tar.xz

Then I did this:

image

So I don’t understand what to do.

I was trying to give you an example. You need to replace the … with the actual location + filename in your PC. I dont know what folder you used. Remember to use / instead of \ for windows folders.

I think you mean something like this:

pacman -U C:/msys64/home/mingw-w64-x86_64-python-jsonschema-3.2.0-1-any.pkg.tar.xz

But where does .zst come from?

It should be the extension from the file you downloaded from the repo. https://repo.msys2.org/mingw/mingw64/mingw-w64-x86_64-python-jsonschema-3.2.0-3-any.pkg.tar.zst

I’m here:

image

Now what?
pacman -Syu

You do all of these first (copy/paste from the build.md) and then the jsonschema to downgrade (only because the jsonschema is giving trouble)

  • Install MSYS2 (instructions and prerequisites can be found on the official website: https://www.msys2.org)
  • Start the MSYS terminal and update the base system until no further updates are available by repeating:

$ pacman -Syu

  • From the MSYS terminal, install x64 developer tools, x86_64 toolchain and git
$ pacman -S --needed base-devel intltool git 

$ pacman -S --needed mingw-w64-x86_64-{toolchain,cmake,ninja,nsis}
  • Install required libraries and dependencies for darktable:

$ pacman -S --needed mingw-w64-x86_64-{exiv2,lcms2,lensfun,dbus-glib,openexr,sqlite3,libxslt,libsoup,libavif,libheif,libwebp,libsecret,lua,graphicsmagick,openjpeg2,gtk3,pugixml,libexif,osm-gps-map,libgphoto2,drmingw,gettext,python3,iso-codes,python3-jsonschema,python3-setuptools}

DO JSONSCHEMA downgrade now then continue:

  • Switch to the MINGW64 terminal and update your lensfun database:

$ lensfun-update-data

  • Modify the .bash_profile file in your $HOME directory and add the following lines:
export PREFIX="/mingw64" 
export LD_LIBRARY_PATH="$PREFIX/lib:$LD_LIBRARY_PATH" 
export PATH="$PREFIX/bin:$PATH"
  • By default CMake will only use one core during the build process. To speed things up you might wish to add a line like:

export CMAKE_BUILD_PARALLEL_LEVEL="6"

to your ~/.bash_profile file. This would use 6 cores.

  • Execute the following command to actviate profile changes:

$ . .bash_profile

  • From the MINGW64 terminal, clone the darktable git repository (in this example into ~/darktable):
$ cd ~ 
$ git clone https://github.com/darktable-org/darktable.git
$ cd darktable 
$ git submodule init 
$ git submodule update
  • Finally build and install darktable:
$ mkdir build 
$ cd build 
$ cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/opt/darktable ../. 
$ cmake --build . -- target package

OR why not use Bill build or the nightly builds?

First of all, I barely know my way around git. I used to use nightly builds, but then the page I was going to for them stopped having builds. Now I don’t know where that page is located. When I search for Bill builds, I don’t seem to get the latest page. I just found:

If I can keep finding the latest version of that, I will use it. That will be a lot easier.

Thank you for your help. I appreciate you taking all this time.

The file from bill, he built it yesterday 4/17. It is fairly new.

The nightly builds started working again (the jsonschema issue was fixed). They are here: Actions · darktable-org/darktable · GitHub

1 Like

Thank you!

I build every Sunday (sometimes early Monday morning) and post it with a topic of darktable windows insider program, with the date and a link to the features that were merged.

1 Like