error to compiling Darktable 3.4.1.1 (for bisect)

I am trying to bisect an issue, and need to go back further than 3.6. Trying to compile 3.4.1.1 with

git checkout release-3.4.1.1
rm -Rf build
./build.sh

gives me the error

[ 64%] Linking C shared module libbilat.so
[ 64%] Linking C shared module libhazeremoval.so
In file included from /home/tamas/src/darktable/build/lib/darktable/plugins/introspection_channelmixerrgb.c:157:
/home/tamas/src/darktable/src/iop/channelmixerrgb.c: In function ‘check_if_close_to_daylight’:
/home/tamas/src/darktable/src/iop/channelmixerrgb.c:1012:3: error: ‘xy_to_uv’ accessing 16 bytes in a region of size 8 [-Werror=stringop-overflow=]
 1012 |   xy_to_uv(xy_ref, uv_ref);
      |   ^~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated due to -Wfatal-errors.
cc1: all warnings being treated as errors
gmake[2]: *** [lib/darktable/plugins/CMakeFiles/channelmixerrgb.dir/build.make:88: lib/darktable/plugins/CMakeFiles/channelmixerrgb.dir/introspection_channelmixerrgb.c.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:3587: lib/darktable/plugins/CMakeFiles/channelmixerrgb.dir/all] Error 2
gmake[1]: *** Waiting for unfinished jobs....

Using Ubuntu 21.10. How should I proceed?

You need to do a git submodule update also before compiling

1 Like

Did that, does not help. Apart from

rm -Rf ./build
git submodule update

is there anything else I should be doing? Something analogous to a make cleanall?

Are you starting from a clean/working clone/environment or are you doing this on top of the error(s) you got previously?

If I do this on top of a clean clone/environment:

git checkout release-3.4.1.1
git submodule update
rm -rf build
./build.sh

It configures and builds:

.
.
.
[100%] Built target toneequal
darktable finished building.

./build/bin/darktable --version
this is darktable 3.4.1.1

No, not a clean clone, but how would I bisect if I clone a new repo every time?

Well, I did mention clone/environment. Guess that should be clone/ environment… :wink:

Once you run into and error like the one you reported above, I’m all but sure that you need to start again. This specific error isn’t part of the bisecting process.

Having to start over can be a pain, especially if you need to do a whole lot of bisect steps (been there, done that).

I tried a fresh repo, and it still fails.

Can someone please try out

# assuming build deps are installed
git clone https://github.com/darktable-org/darktable.git
cd darktable
git checkout release-3.4.1.1
git submodule init
git submodule update
./build.sh

and report back?

Here you are:

[stasis] jade ~ $ cd .local/git/
[stasis] jade ~/.local/git $ mv darktable darktable.ORG
[stasis] jade ~/.local/git $ git clone https://github.com/darktable-org/darktable.git
Cloning into 'darktable'...
.
.
[stasis] jade ~/.local/git $ cd darktable
[stasis] jade ~/.local/git/darktable $ git checkout release-3.4.1.1
Note: checking out 'release-3.4.1.1'.
.
.
HEAD is now at 3641764ed Revert "use dt_free_align for aligned memory, as free only works correctly on Linux"
[stasis] jade ~/.local/git/darktable $ git submodule init
.
.
[stasis] jade ~/.local/git/darktable $ git submodule update
.
.
[stasis] jade ~/.local/git/darktable $ ./build.sh
darktable build script

Building directory:  /home/jade/.local/git/darktable/build
Installation prefix: /opt/darktable
Build type:          RelWithDebInfo
Build generator:     Unix Makefiles
Build tasks:         12
.
.
-- Configuring done
-- Generating done
-- Build files have been written to: /home/jade/.local/git/darktable/build
.
.
[100%] Built target toneequal
darktable finished building.
To actually install darktable you need to type:
$ cmake --build "/home/jade/.local/git/darktable/build" --target install -- -j12
[stasis] jade ~/.local/git/darktable $ ./build/bin/darktable --version
this is darktable 3.4.1.1

Works for me.

I do think that these 2 should be switched, though:

git checkout release-3.4.1.1
git submodule init

But as you can see from my above output it does work when using your order.

Thanks. Which gcc are you using? Mine is gcc (Ubuntu 11.2.0-7ubuntu2) 11.2.0. Maybe it is too recent and picky. I will try to disable the warnings now in cmake.

For anyone facing the same issue: adding

CHECK_COMPILER_FLAG_AND_ENABLE_IT(-Wno-stringop-overflow)
CHECK_COMPILER_FLAG_AND_ENABLE_IT(-Wno-stringop-overread)

in cmake/compiler-warnings.cmake will make 3.4.* compile with the gcc above. Not making a PR as master compiles just fine.

I still haven’t updated Debian from 10 to 11 so the gcc I’m using is:

$ gcc --version
gcc (Debian 8.3.0-6) 8.3.0

EDIT:

Just tried the above using clang ( 10.0.1) instead of gcc: No problems here either.

1 Like