Agree…
And the “unknown-version” seems to be set in CMakeLists.txt:
set(PROJECT_VERSION “unknown-version”)
That file also contains two FIXMEs:
FIXME: PROJECT_VERSION will not be updated automatically, until you rerun cmake
FIXME: (irrelevant) PROJECT_VERSION will not be updated automatically, until you rerun cmake but generate_version target expects it to be in build dir, so we need to copy it
Next thing I guess is to insert some message("I''m here") commands into that big if-else block of CmakeLists.txt to try to figure out which case you end up in… Don’t forget to comment out the build and install lines in build.sh, you don’t need to go that far, you just want to see the debug messages during the configuration step, and verify the generated version_gen.c
The problem is solved.
Actually, not “solved”, but circumvented, because I still do not know the reason for the dilemma. My “solution” was to install a brand new OS onto an empty SSD.
So from now on, I am running Debian 11 instead of Garuda Linux.
These config entries specify Git-tracked directories that are considered safe even if they are owned by someone other than the current user. By default, Git will refuse to even parse a Git config of a repository owned by someone else, let alone run its hooks, and this config setting allows users to specify exceptions, e.g. for intentionally shared repositories (see the --shared option in git-init[1]).
This is a multi-valued setting, i.e. you can add more than one directory via git config --add. To reset the list of safe directories (e.g. to override any such directories specified in the system config), add a safe.directory entry with an empty value.
This config setting is only respected when specified in a system or global config, not when it is specified in a repository config or via the command line option -c safe.directory=<path>.
The value of this setting is interpolated, i.e. ~/<path> expands to a path relative to the home directory and %(prefix)/<path> expands to a path relative to Git’s (runtime) prefix.
With Ubuntu 22.04 I ran now into the same problem and tried the steps described above and on darktable reports "unknown version" · Issue #11542 · darktable-org/darktable · GitHub. But still DT states “unknown version”. For compiling I used
./build.sh --prefix /opt/darktable --build-type Release --install --sudo
after running
sudo git config --global --add safe.directory /home/till/git/darktable
EDIT:
When running ./build.sh without ‘–install’ and then checking ‘./build/bin/darktable --version’ shows the correct version, but after running installation by
‘sudo cmake --build “/home/till/git/darktable/build” --target install – -j16’
‘/opt/darktable/bin/darktable --version’ shows ‘unknown-version’.
Definitely not. The sequence of the commands is of importance. You tried to set the safe directory before running the build script to build and install. The correct sequence is :
It’s related to a github security update. You have just a command to type one time only on your system. See @pehar comment above (16th comment on april 18th).