LUA Script Option disappear after updating to 3.8

OK. I’m on Ubuntu 21.10.

kofa@eagle:~$ dpkg -l|grep lua
ii  liblua5.1-0:amd64                                           5.1.5-8.1build4                                      amd64        Shared library for the Lua interpreter version 5.1
ii  liblua5.2-0:amd64                                           5.2.4-1.1build3                                      amd64        Shared library for the Lua interpreter version 5.2
ii  liblua5.3-0:amd64                                           5.3.3-1.1ubuntu2                                     amd64        Shared library for the Lua interpreter version 5.3
ii  liblua5.3-dev:amd64                                         5.3.3-1.1ubuntu2                                     amd64        Development files for the Lua language version 5.3
ii  liblua5.4-0:amd64                                           5.4.2-2                                              amd64        Shared library for the Lua interpreter version 5.4
ii  liblua5.4-dev:amd64                                         5.4.2-2                                              amd64        Development files for the Lua language version 5.4
ii  lua5.4  

I’ve built darktable from source.

Lua-related entries in darktable build log:

kofa@eagle:~/.config/darktable$ grep -i lua /tmp/l 
-- Lua support: Enabled
 * Lua54 (required version >= 5.4)
[  3%] Building C object bin/external/LuaAutoC/CMakeFiles/lautoc.dir/lautoc.c.o
[ 55%] Building C object bin/CMakeFiles/lib_darktable.dir/lua/cairo.c.o
...
[ 59%] Building C object bin/CMakeFiles/lib_darktable.dir/lua/widget/widget.c.o
-- Installing: /home/kofa/darktable-master/share/darktable/lua
-- Installing: /home/kofa/darktable-master/share/darktable/lua/darktable
-- Installing: /home/kofa/darktable-master/share/darktable/lua/darktable/debug.lua
-- Installing: /home/kofa/darktable-master/share/darktable/luarc

Cleaning my Lua-related darktable config:

kofa@eagle:~/.config/darktable$ rm -rf lua*
kofa@eagle:~/.config/darktable$ grep -vi lua darktablerc >darktablerc-lua
kofa@eagle:~/.config/darktable$ mv darktablerc-lua darktablerc

Launching darktable with the -d lua option outputs:

kofa@eagle:~$ /home/kofa/darktable-master/bin/darktable -d lua
[imageio_load_module_format] failed to open `avif': (null)
1.214323 LUA ERROR : cannot open /home/kofa/.config/darktable/luarc: No such file or directory

The Lua script installer is present in the bottom-left corner:

image

Opening it:

image

After clicking execute, I get:
image

The console shows:

Cloning into '/home/kofa/.config/darktable/lua'...
remote: Enumerating objects: 3871, done.
remote: Counting objects: 100% (419/419), done.
remote: Compressing objects: 100% (283/283), done.
remote: Total 3871 (delta 222), reused 266 (delta 132), pack-reused 3452
Receiving objects: 100% (3871/3871), 1.18 MiB | 7.21 MiB/s, done.
Resolving deltas: 100% (2479/2479), done.

I could now work with scripts, the manager looks like:

image

luarc has been created:

$ cat ~/.config/darktable/luarc 
require "tools/script_manager"

Let’s see what happens if you execute the same commands.

I don’t see lua support on OpenSUsE Leap 15.3 either. On looking a bit farther, this showed up:

> darktable --version
this is darktable 3.8.0~git50.9716a5a5f0-lp153.72.1
copyright (c) 2009-2022 johannes hanika
darktable-dev@lists.darktable.org

compile options:
  bit depth is 64 bit
  normal build
  SSE2 optimized codepath enabled
  OpenMP support enabled
  OpenCL support enabled
  Lua support disabled
  Colord support enabled
  gPhoto2 support enabled
  GraphicsMagick support enabled
  ImageMagick support disabled
  OpenEXR support enabled

So not too surprising that I can’t get Lua to work. Probable cause: no Lua 5.4 available in my OS version :unamused:

@jadupl2: What do you get when you issue the same command? Lua can be disabled at compile (build) time, too:

If you build yourself, did you try setting

option(DONT_USE_INTERNAL_LUA "Never fall back to the intree copy of lua" OFF)

in DefineOptions.cmake ? This works for me on Ubuntu 20.04 having LUA 5.3 installed.

No, I use a pre-build binary from Index of /repositories/graphics:/darktable:/stable/openSUSE_Leap_15.3. That’s the latest version of the distrubution, btw.
I may have to switch to building dt myself, perhaps (not felt the need to do so, so far).

I can understand distributions hesitating to switch to a new version of a library after the distribution is published. And I can understand the developers wanting to use the newest library versions. What I don’t really like is the lack of communication about disabled features :stuck_out_tongue: (it tends to waste the time of the users).
But that’s the responsability of whoever creates the package for a distribution, it’s out of the control of the developers.

we will need to check if the stable snapshot had a rebuild after the lua fixes.

@darix: last version I can see (and installed) is 3.8.0~git50.9716a5a5f0-lp153.72.1, build on monday 03 janv. 2022 08:56:56 from source package darktable-3.8.0~git50.9716a5a5f0-lp153.72.1

a new build just started. check if that fixes your issue.

give darktable-3.8.0~git56.35947d74e7-lp153.73.1 a try.

Then get involved and improve things.

Just installed it, and that did the trick.

Thank you very much.

I Get the same thing, LUA is Disable ?? How can we enable it ?

jacques@borg:~ $ darktable --version
this is darktable 3.8.0
copyright (c) 2009-2021 johannes hanika
darktable-dev@lists.darktable.org

compile options:
bit depth is 64 bit
normal build
SSE2 optimized codepath enabled
OpenMP support enabled
OpenCL support enabled
Lua support disabled <<<<<<<
Colord support enabled
gPhoto2 support enabled
GraphicsMagick support enabled
ImageMagick support disabled
OpenEXR support enabled
jacques@borg:~ $

It was disabled at build time. You will need to get a package that has it enabled and install that. There is nothing else you can do locally, unless you build the software yourself.

See the new version from @darix, it worked for @rvietor.

Thank You All for your help
Problem solved.

apt remove darktable

echo 'deb [http://download.opensuse.org/repositories/graphics:/darktable/xUbuntu_20.04/](http://download.opensuse.org/repositories/graphics:/darktable/xUbuntu_20.04/) /' | sudo tee /etc/apt/sources.list.d/graphics:darktable.list
curl -fsSL [https://download.opensuse.org/repositories/graphics:darktable/xUbuntu_20.04/Release.key](https://download.opensuse.org/repositories/graphics:darktable/xUbuntu_20.04/Release.key) | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/graphics_darktable.gpg > /dev/null
sudo apt update
sudo apt install darktable

Previously was using that repo
deb [http://ppa.launchpad.net/ubuntuhandbook1/darktable/ubuntu](http://ppa.launchpad.net/ubuntuhandbook1/darktable/ubuntu) focal main

The package at this site seem to be compile without LUA
 [https://launchpad.net/~ubuntuhandbook1/+archive/ubuntu/darktable](https://launchpad.net/~ubuntuhandbook1/+archive/ubuntu/darktable)

A+


I have the same problem described here (LinuxMint 20.02, Ubuntu 20.04, no LUA in DT after darktable 3.8 installation) and tried to solve it .
If I understand right, the first 5 code lines of @jadupl2 last post should install a DT build with LUA support. I’m not so familiar with these Linux commands. I have an idea what they are doing but I get an error executing the command below and can’t identify the reason.

curl -fsSL https://download.opensuse.org/repositories/graphics:darktable/xUbuntu_20.04/Release.key | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/graphics_darktable.gpg > /dev/null

bash: Syntaxfehler beim unerwarteten Wort »(«
means: syntax error at unexpected word >>(<<

What is the difference between these commands above and the commands here at the darktable install page?

You will find the working version (Compile with LUA) at this page
https://software.opensuse.org/download.html?project=graphics:darktable&package=darktable

  1. Remove current version
    sudo apt remove darktable

  2. Add the OBS repository

sudo echo ‘deb http://download.opensuse.org/repositories/graphics:/darktable/xUbuntu_20.04/ /’ | sudo tee /etc/apt/sources.list.d/graphics:darktable.list

sudo curl -fsSL https://download.opensuse.org/repositories/graphics:darktable/xUbuntu_20.04/Release.key | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d /graphics_darktable.gpg > /dev/null

  1. Update Package cache and install new darktable
sudo apt update
sudo apt install darktable

Sorry, it doesn’t work for me.
After installation regarding your proposal (I removed the " ’ " around the deb command in the /etc/apt/sources.list.d/graphics:darktable.list) and

darktable --version

I got still


Lua support disabled

Hallo Andreas,

The error message doesn’t match to the command you’ve posted. The error message complains about an unexpected left bracket (Klammer auf) but there is none in the command you posted.

The first command

echo 'deb http://download.opensuse.org/repositories/graphics:/darktable/xUbuntu_20.04/ /' | sudo tee /etc/apt/sources.list.d/graphics:darktable.list

will add a new installation source by creating the file /etc/apt/sources.list.d/graphics:darktable.list

It’s a “pipeline” with two parts, the first part just prints the text that we need (echo is basically a print command for the shell) and after the “pipe” character | is the command that redirects this text into a file. Only that part needs the sudo.

Next we need to install a cryptographic key, so that the package manager can make sure the .deb packages are genuine and haven’t been tampered with.

curl -fsSL https://download.opensuse.org/repositories/graphics:darktable/xUbuntu_20.04/Release.key | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/graphics_darktable.gpg > /dev/null

This is a “pipeline” consisting of three parts:

  • The curl command downloads the key file,
  • gpg --dearmor will convert the key
  • sudo tee /etc/apt/trusted.gpg.d/graphics_darktable.gpg will save it to the specified file

To make sure that this was successful, you can run these commands:

user@Ubuntu:~ $ cat /etc/apt/sources.list.d/graphics:darktable.list
deb http://download.opensuse.org/repositories/graphics:/darktable/xUbuntu_20.04/ /

user@Ubuntu:~ $ gpg  --show-keys /etc/apt/trusted.gpg.d/graphics_darktable.gpg
pub   rsa2048 2017-12-26 [SC] [expires: 2022-05-16]
      3247B7519EDBEAB422E900A3040524A84C70D8B5
uid                      graphics:darktable OBS Project <graphics:darktable@build.opensuse.org>

If your output looks the same, you don’t need to repeat these steps.

Maybe you have a different darktable version in your $PATH somewhere.
What’s the (full) output of these two commands?

$ which darktable
/usr/bin/darktable

$ darktable --version
this is darktable 3.8.0
copyright (c) 2009-2021 johannes hanika
darktable-dev@lists.darktable.org

compile options:
  bit depth is 64 bit
  normal build
  SSE2 optimized codepath enabled
  OpenMP support enabled
  OpenCL support enabled
  Lua support enabled, API version 8.0.0
  Colord support enabled
  gPhoto2 support enabled
  GraphicsMagick support enabled
  ImageMagick support disabled
  OpenEXR support enabled

Oliver

Click on this link “https://software.opensuse.org/download.html?project=graphics:darktable&package=darktable

Click on the Ubuntu icon
Click “Add repository and install manually” and you will see the command to execute.
This is what I did and it worked
A+

Hello Oliver @revilo ,
thank you for your comprehensive explanation. Helps me to understand much more. I read it carefully and did what you suggested.
But unfortunately it doesn’t work with Lua support.
I tried it several times. Also the recommendations from Jacques @jadupl2 a tried several times over the last days.

I would like to show you what I did with the commands an the regarding output. Maybe I do still something wrong or you can find hints in the output.

as@KaLM:~$ which darktable

DT not installed, no output. OK!

 as@KaLM:~$ cat /etc/apt/sources.list.d/graphics:darktable.list
 deb http://download.opensuse.org/repositories/graphics:/darktable/xUbuntu_20.04/ /

 as@KaLM:~$ gpg  --show-keys /etc/apt/trusted.gpg.d/graphics_darktable.gpg
 pub   rsa2048 2017-12-26 [SC] [verfällt: 2022-05-16]
       3247B7519EDBEAB422E900A3040524A84C70D8B5
 uid                      graphics:darktable OBS Project <graphics:darktable@build.opensuse.org

 as@KaLM:~$ sudo apt update
 OK:1 http://ftp.uni-mainz.de/ubuntu focal InRelease
 OK:2 http://ftp.uni-mainz.de/ubuntu focal-updates InRelease                             
 OK:3 http://download.opensuse.org/repositories/graphics:/darktable/xUbuntu_20.04  InRelease
 OK:4 http://archive.canonical.com/ubuntu focal InRelease                                
 OK:5 http://ppa.launchpad.net/ubuntuhandbook1/darktable/ubuntu focal InRelease          
 OK:6 http://ftp.uni-mainz.de/ubuntu focal-backports InRelease                           
 OK:7 http://download.opensuse.org/repositories/graphics:/darktable:/stable/xUbuntu_20.04  InRelease
 OK:8 http://ppa.launchpad.net/ubuntuhandbook1/ppa/ubuntu focal InRelease                
 Ign:9 https://mirror.dogado.de/linuxmint uma InRelease                    
 OK:10 https://mirror.dogado.de/linuxmint uma Release
 OK:11 http://security.ubuntu.com/ubuntu focal-security InRelease
 Paketlisten werden gelesen... Fertig
 Abhängigkeitsbaum wird aufgebaut.       
 Statusinformationen werden eingelesen.... Fertig
 Aktualisierung für 6 Pakete verfügbar. Führen Sie »apt list --upgradable« aus, um sie anzuzeigen.

 as@KaLM:~$ sudo apt install darktable
 Paketlisten werden gelesen... Fertig
 Abhängigkeitsbaum wird aufgebaut.       
 Statusinformationen werden eingelesen.... Fertig
 Die folgenden Pakete wurden automatisch installiert und werden nicht mehr benötigt:
   linux-headers-5.11.0-41-generic linux-headers-5.4.0-91 linux-headers-5.4.0-91-generic
   linux-hwe-5.11-headers-5.11.0-41 linux-image-5.11.0-41-generic
   linux-image-5.4.0-91-generic linux-modules-5.11.0-41-generic
   linux-modules-5.4.0-91-generic linux-modules-extra-5.11.0-41-generic
   linux-modules-extra-5.4.0-91-generic
 Verwenden Sie »sudo apt autoremove«, um sie zu entfernen.
 Die folgenden zusätzlichen Pakete werden installiert:
   darktable-dbg
 Die folgenden NEUEN Pakete werden installiert:
   darktable darktable-dbg
 0 aktualisiert, 2 neu installiert, 0 zu entfernen und 6 nicht aktualisiert.
 Es müssen 42,2 MB an Archiven heruntergeladen werden.
 Nach dieser Operation werden 66,7 MB Plattenplatz zusätzlich benutzt.
 Möchten Sie fortfahren? [J/n] J
 Holen:1 http://ppa.launchpad.net/ubuntuhandbook1/darktable/ubuntu focal/main amd64 darktable amd64 1:3.8.0-1build2~ubuntu20.04 [5.434 kB]
 Holen:2 http://ppa.launchpad.net/ubuntuhandbook1/darktable/ubuntu focal/main amd64 darktable-dbg amd64 1:3.8.0-1build2~ubuntu20.04 [36,8 MB]
 Es wurden 42,2 MB in 9 s geholt (4.812 kB/s).                                           
 Vormals nicht ausgewähltes Paket darktable wird gewählt.
 (Lese Datenbank ... 539212 Dateien und Verzeichnisse sind derzeit installiert.)
 Vorbereitung zum Entpacken von .../darktable_1%3a3.8.0-1build2~ubuntu20.04_amd64.deb ...
 Entpacken von darktable (1:3.8.0-1build2~ubuntu20.04) ...
 Vormals nicht ausgewähltes Paket darktable-dbg wird gewählt.
 Vorbereitung zum Entpacken von .../darktable-dbg_1%3a3.8.0-1build2~ubuntu20.04_amd64.deb 
 ...
 Entpacken von darktable-dbg (1:3.8.0-1build2~ubuntu20.04) ...
 darktable (1:3.8.0-1build2~ubuntu20.04) wird eingerichtet ...
 darktable-dbg (1:3.8.0-1build2~ubuntu20.04) wird eingerichtet ...
 Trigger für mime-support (3.64ubuntu1) werden verarbeitet ...
 Trigger für hicolor-icon-theme (0.17-2) werden verarbeitet ...
 Trigger für gnome-menus (3.36.0-1ubuntu1) werden verarbeitet ...
 Trigger für man-db (2.9.1-1) werden verarbeitet ...
 Trigger für desktop-file-utils (0.24+linuxmint1) werden verarbeitet ...

 as@KaLM:~$ which darktable
 /usr/bin/darktable


 as@KaLM:~$ darktable --version
     this is darktable 3.8.0
     copyright (c) 2009-2021 johannes hanika
     darktable-dev@lists.darktable.org
     
     compile options:
       bit depth is 64 bit
       normal build
       SSE2 optimized codepath enabled
       OpenMP support enabled
       OpenCL support enabled
       **Lua support disabled**
       Colord support enabled
       gPhoto2 support enabled
       GraphicsMagick support enabled
       ImageMagick support disabled
       OpenEXR support enabled

Thank you very much for any investigation!!

Could it be, the problem is regarding the Lua installation on my OS? I tried to install the Lua version 5.4. on my LinuxMint 20.02

as@KaLM:~$ lua -v
Lua 5.4.3  Copyright (C) 1994-2021 Lua.org, PUC-Rio

but

 as@KaLM:~$ dpkg -l|grep lua
 ii  liblua5.1-0:amd64                                           5.1.5-8.1build4                       amd64        Shared library for the Lua interpreter version 5.1
 ii  liblua5.2-0:amd64                                           5.2.4-1.1build3                       amd64        Shared library for the Lua interpreter version 5.2
 ii  liblua5.3-0:amd64                                           5.3.3-1.1ubuntu2                      amd64        Shared library for the Lua interpreter version 5.3
 ii  liblua5.3-dev:amd64                                         5.3.3-1.1ubuntu2                      amd64        Development files for the Lua language version 5.3
 ii  lua5.3                                                      5.3.3-1.1ubuntu2                      amd64        Simple, extensible, embeddable programming language

You should remove the ubuntuhandbook repository, as that is from where darktable gets installed, and not from download.opensuse.org.

 Holen:1 http://ppa.launchpad.net/ubuntuhandbook1/darktable/ubuntu focal/main amd64 darktable amd64 1:3.8.0-1build2~ubuntu20.04 [5.434 kB]
 Holen:2 http://ppa.launchpad.net/ubuntuhandbook1/darktable/ubuntu focal/main amd64 darktable-dbg amd64 1:3.8.0-1build2~ubuntu20.04 [36,8 MB]