building branch 3.6.x ?

Hi,
I am currently trying to build branch 3.6.x (not to go for master, but at least with the changes heading into 3.6.x). I did checkout branch “darktable-3.6.x” and did build dt. Now the version is not displayed as something like 3.6.x … but darktable --version prints:

    this is darktable 4eead2b
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-dev
  Colord support enabled
  gPhoto2 support enabled
  GraphicsMagick support enabled
  ImageMagick support disabled
  OpenEXR support enabled

Is this normal expected output for this branch?
ANy hint would be welcome.

Cheers, Martin

That’s normal. The version will only change if the checked out commit is tagged with a release name.

Are you sure? Commit 4eead2b is on master branch, not darktable-3.6.x.

Yes you’re right. I constructed a reasonable-sounding explanation in my head and fitted it into a misremembered memory.

I just built the darktable-3.6.x branch and if I run darktable --version I get

this is darktable 3.6.0+16~gd679c98e0
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 7.0.0
  Colord support enabled
  gPhoto2 support enabled
  GraphicsMagick support enabled
  ImageMagick support disabled
  OpenEXR support enabled

@DerMartin: Perhaps if you could post the output of the git checkout command. Did you git fetch first?

Hi Matt and Chris,

thank you very much for looking into this.
So seems indeed that I did mistakes in checking out. Will take a closer look …
Thx and regards, Martin

Okay,
I seem to have some fundamental lack of understanding on how to checkout and build branches.
If I follow the build instructions on Git to build from source, I can build master and follow the instructions to checkout version tagged with “release-3.6.0”. Build also works fine for this v3.6.0, but I have obviously no glue how to checkout a branch.
Pardon my ignorance, but is there somewhere a dummy read on building a specific dt branch?

Depends how you cloned out the darktable repo. If you cloned it directly from https://github.com/darktable-org/darktable.git, then ‘origin’ will normally point to that repo.

You might need to pull down the tags:
git fetch --tags origin

Then you check out the branch:
git checkout --track origin/darktable-3.6.x

This will set up a local branch which tracks the remote branch in origin repo. You can use git status to check if the checkout worked properly.

Then, just build as normal.

argll… stupid me …

I guess I did not clone as needed for the branches, because I just used:

git clone --recurse-submodules --depth 1 https://github.com/darktable-org/darktable.git

without --depth all is fine and I can checkout the branch …
Build now did run through:

[martin@martin-manjaro darktable]$ darktable --version
this is darktable 3.6.0+16~gd679c98e0
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 7.0.0
  Colord support enabled
  gPhoto2 support enabled
  GraphicsMagick support enabled
  ImageMagick support disabled
  OpenEXR support enabled

Looks good now I think … :wink:

Thank you very much for your help !!

Glad it’s all sorted. You’re not the first to be tripped up by -- depth 1 in the instructions

I have the following compilation error when building latest 3.6.x and master branches:

In file included from /data/soft/darktable/build/lib64/darktable/plugins/introspection_lens.cc:85:
/data/soft/darktable/src/iop/lens.cc: In function ‘lfModifier* get_modifier(int*, int, int, const dt_iop_lensfun_data_t*, int, gboolean)’:
/data/soft/darktable/src/iop/lens.cc:346:92: error: no matching function for call to ‘lfModifier::lfModifier(const float&, int&, int&, lfPixelFormat, int)’
  346 |   mod = new lfModifier(d->crop, w, h, LF_PF_F32, (force_inverse) ? !d->inverse : d->inverse);
      |                                                                                            ^
compilation terminated due to -Wfatal-errors.
make[2]: *** [lib64/darktable/plugins/CMakeFiles/lens.dir/build.make:82: lib64/darktable/plugins/CMakeFiles/lens.dir/introspection_lens.cc.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:5039: lib64/darktable/plugins/CMakeFiles/lens.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....

I have latest lensfun library 0.3.95.0 built from sources. I need this to have Nikon Z6 support.
Looking at the lfModifier structure in lensfun.h the first parameter const lfLens* lens is missing in DT source darktable/src/iop/lens.cc:

lfModifier (const lfLens *lens, float imgfocal, float imgcrop, int imgwidth, int imgheight, lfPixelFormat pixel_format, bool reverse = false);