Running linux RT with WSL2 on Windows 11

Here’s an alternative to Windows builds…

Previous attempts at running rawtherapee on WSL were unsuccessful for me. New windows features make this easier.

If you have WSL installed are a Windows 11 preview user and have updated Windows Subsystem for Linux to WSL2, rawtherapee and other GUI tools can be launched with ease requiring no DISPLAY= communications via the X Windowing system.

Here’s how I accomplished that:

1. Join Windows Insider Program

a. Press the Windows key and type insider program - press enter to run it
b. Adjust your privacy settings to allow optional usage data (read carefully; it’s not for everyone)
c. Install Win 11 (check your BIOS may need an upgrade for compatibility)

2. Upgrade WSL

a. press the Windows key and type powershell - press enter to run it
b. type wsl --update
c. if you haven’t installed yet, wsl --install
d. restart WSL: wsl --shutdown

3. Build app

a. Get the dependencies: sudo apt install git build-essential cmake curl pkg-config libgtk-3-dev libgtkmm-3.0-dev librsvg2-dev liblcms2-dev libfftw3-dev libiptcdata0-dev libtiff5-dev libcanberra-gtk3-dev
b. Build latest lensfun: cd ~ && git clone https://github.com/lensfun/lensfun && mkdir ~/lensfun/build && cd ~/lensfun/build && cmake .. && make -j16 && sudo make install
c. Build RT: cd ~ && git clone https://github.com/beep6581/rawtherapee.git repo-rt && mkdir ~/repo-rt/build && cd ~/repo-rt/build && cmake .. -DWITH_LTO=ON -DBUILD_BUNDLE=OFF -DPROC_TARGET_NUMBER=2 -DCACHE_NAME_SUFFIX="5-dev" -DCMAKE_BUILD_TYPE=release && make -j16 && sudo make install

4. Run it

rawtherapee &

1 Like

I don’t think there is working color management for this, so beware.

How would I know, would it be different than native Win 11?


from:

Wayland has no working color management its protocol…

If I have a calibration on my host, maybe it is not really an issue?

Hopefully, but I’d be surprised if it works. With darktable, there is darktable-cmtest which will print the color managemenr config, which would help tell you what is going on.

Hi @HIRAM
I gave up with wsl2, as I was unable to set up color management.
And it is so simple to build RT with MSYS2 that i dont perceive the advantage to use WSL2.
But I can be wrong

Actually I’m trying to follow the rawpedia instructions for MSYS2 but keep getting this error:

In file included from C:/msys64/mingw64/x86_64-w64-mingw32/include/winnt.h:150,
                 from C:/msys64/mingw64/x86_64-w64-mingw32/include/minwindef.h:163,
                 from C:/msys64/mingw64/x86_64-w64-mingw32/include/profileapi.h:10,
                 from C:/msys64/home/kd6kx/rawtherapee/rtengine/mytime.h:22,
                 from C:/msys64/home/kd6kx/rawtherapee/rtengine/StopWatch.h:25,
                 from C:/msys64/home/kd6kx/rawtherapee/rtengine/dcraw.cc:33:
C:/msys64/mingw64/x86_64-w64-mingw32/include/basetsd.h:31:22: error: conflicting declaration 'typedef int INT32'
   31 |   typedef signed int INT32,*PINT32;
      |                      ^~~~~
In file included from C:/msys64/mingw64/include/jpeglib.h:31,
                 from C:/msys64/home/kd6kx/rawtherapee/rtengine/jpeg.h:9,
                 from C:/msys64/home/kd6kx/rawtherapee/rtengine/dcraw.cc:23:
C:/msys64/mingw64/include/jmorecfg.h:144:14: note: previous declaration as 'typedef long int INT32'
  144 | typedef long INT32;
      |              ^~~~~

In another step, running lensfun-update-data requires a python installation, but even with python in the script cannot find the lensfun module, perhaps needing to set a variable path for python modules. When configuring with cmake, I also needed to prepend the PKG_CONFIG_PATH, and CMakeLists.txt was complaining that my TIFF/JPG/PNG libs were not the exact required versions (they are higher). Once it configures, the error above appears. I’d like to eventually be able to build on win11 to make a local comparison.

Look forward to it. It is always good to have multiple ways of building RT. :slight_smile:

1 Like
  • as i understand, only for tiff a specific version is required and i dont know why. For jpg and png there is no version requirement. Cannot test as i am on vacation.
  • if you build lensfun locally, you have to prepend the lensfun pkg path if not installed in the standard mingw64 location.
  • as in linux you have to install the python package. Lensfun update data will update the db of the lensfun package installed in mingw64 as it is done in linux. BUT if your lensfun package you built is not located in the standard location surely you need to setup some environment variable
    Ask @ggbutcher the secure way to update the lensfun db on Windows
  • I have no idea why you get those errors.
1 Like

You’ll find a .zip containing a pre-compiled static executable under Releases. Not at all secure, however…

2 Likes