Install your OpenCL GPU drivers if you have a GPU.
On Windows 11, it seems that the system OpenCL drivers for Intel embedded GPU cause issues (black images), especially with newer generation CPU. You may want to remove Windows drivers and install Intel ones .
The Ansel project provides an official .exe package, built for the stable, pre-release and experimental channels. This is the recommended way of installing Ansel, since it is fresh from the repository, always up-to-date and ships updated lens databases for Lensfun.
MSYS will initialize a personal Unix-like /home folder, by default located in C:\\msys64\home\USERNAME where USERNAME is your current Windows username. If your username contains non-latin characters, like accentuated letters, the clashes between Windows encoding and Linux encoding will make the compilation fail on directory pathes issues. In that case, create a new directory in C:\\msys64\home\USERNAME_WITHOUT_ACCENTS, and in the MSYS terminal, do cd /home/USERNAME_WITHOUT_ACCENT.
Modify the .bash_profile file in your $HOME directory and add the following lines:
1# Added as per http://wiki.gimp.org/wiki/Hacking:Building/Windows2export PREFIX="/mingw64"3export LD_LIBRARY_PATH="$PREFIX/lib:$LD_LIBRARY_PATH"4export 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:
After this, you will need to double-click and install the ansel.exe found in the build/bin folder. This package will be portable and be installable on other platforms.
Caveats
Starting in command line (with arguments)
In some situations, you will need to start Ansel in command line, with arguments modifying its default behaviour, to test or debug issues:
if you built yourself, start the MSYS2 MINGW64 terminal (from the applications menu), and execute /opt/ansel/bin/ansel.exe,
if you installed from the EXE package, open the Windows terminal (cmd.exe) and execute "C:\Programs Files\ansel\bin\ansel" (assuming you installed Ansel in the default directory, suggested by the installer).
For example, if you note issues with OpenCL, you could start Ansel with OpenCL entirely disabled using "C:\Programs Files\ansel\bin\ansel" --disable-opencl.
The caveat though is the debugging commands (-d OPTION) don’t output messages to the terminal, as they do on Unix, because of issues with Windows. Instead, the output will be written in an ansel-log.txt text file, in your cache directory. Start the help of the software ( runing "C:\Programs Files\ansel\bin\ansel" -h), and the last line should tell you where the file will be located after the line note: debug log and output will be written to this file: PATH. Typically, it should be C:\Users\USERNAME\AppData\Local\Microsoft\Windows\INetCache\ansel on Windows 10.
OpenCL
Darktable blacklists all Intel OpenCL drivers to prevent issues, because of an history of bad drivers. In practice, since Intel Neo, things are better and reasonably-old Intel platforms are well supported, so the blacklist is removed on Ansel. OpenCL issues (typically: black images) are still regularly reported with brand-new hardware.
If you find yourself in this situation, you have several mitigation options:
Try to install a newer or an older version of your GPU driver.
If you have a discrete GPU (Nvidia or AMD), you can disable the Intel embedded GPU:
by entirely removing the Intel OpenCL driver (use your software manager to locate it), so Ansel uses only your discrete driver,
by entirely disabling the Intel GPU in Ansel config:
locate the anselrc text file on your system (typically in C:\Users\USERNAME\AppData\Local\ansel),
open it and locate the line cldevice_v4_YOUR_DEVICE=0 250 0 16 16 128 0 0 0.053989 where YOUR_DEVICE is the name of your GPU (possibly associated with a driver version),
on that line, change the 8th (penultimate) digit from 0 to 1, so you get cldevice_v4_YOUR_DEVICE=0 250 0 16 16 128 0 1 0.053989,
Try to change the build options for OpenCL kernels:
locate the anselrc text file on your system (typically in C:\Users\USERNAME\AppData\Local\ansel),
open it and locate the line cldevice_v4_YOUR_DEVICE_building=-cl-fast-relaxed-math where YOUR_DEVICE is the name of your GPU (possibly associated with a driver version), and the options after = may be different from this example,
clear the building options, so you get cldevice_v4_YOUR_DEVICE_building= (nothing after =)
If you don’t have a discrete GPU and the Intel one is your only one:
start the application with OpenCL disabled at all with COMMAND --disable-opencl (see the previous section for the actual system command to run, depending on your installation)
disable the Intel GPU in Ansel config (see point 1.2. above)