Running stable and latest build release on single hard drive

It runs in about half a second on my Linux box (never actually measured it, but it’s fast).

About one minute with the build folder, instantaneous without on my Windows environment (msys2). So this is why I suggested to rm build first.

Something like that …

lensfun-update-data
cd ~/darktable/
rm -rf ~/darktable/build
git clean -dxf
git reset --hard
git fetch -p
git merge
git submodule update --init --recursive
mkdir build
cd build
cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/opt/darktable -DCUSTOM_CFLAGS=ON -DCMAKE_CXX_FLAGS="-O3" -DCMAKE_C_FLAGS="-O3" -DBINARY_PACKAGE_BUILD=OFF ../.
1 Like

Sorry, I never realised it’d be so slow on Windows.

By this do you mean the git clean -dxf ; git reset --hard command

1 Like

Yes, the “git clean” takes a long time on windows (depending on your machine, of course) if you do it before removing the ~/darktable/build folder.

I suggest adding an update via pacman before the cmake too.

NTFS with a bunch of small files really sucks. Its so slow

Thanks @dtrtuser for the explanation on git clean -dxf run times. Takes about 6 seconds on my win 10 computer. Maybe my NVME m.2 is helping here. Still, not even close to what @kofa gets on Linux.

Are you talking about this update, Pacman -Syuu?

pacman -Suy

1 Like
kofa@eagle:~/darktable$ time git clean -d -f -x 
Removing build/

real    0m0.218s
user    0m0.008s
sys     0m0.136s
kofa@eagle:~/darktable$ 

This is with a SATA SSD, not with NVME m.2, after booting the computer, so nothing is cached.

And this is after just having finished building darktable:

kofa@eagle:~/darktable$ time git clean -d -f -x 
Removing build/

real    0m0.251s
user    0m0.005s
sys     0m0.240s
kofa@eagle:~/darktable$ 

Basically no difference.

This is what I get on windows now (way better than this morning ,but still slower than you):

$ time git clean -d -f -x
Removing build/

real    0m4.460s
user    0m0.203s
sys     0m1.734s


And without /build

$ time git clean -d -f -x

real    0m0.033s
user    0m0.030s
sys     0m0.000s


1 Like

And how much does deleting build manually (e.g. with rm or whatever you use) take?

Windows 10 22H2, i7-8700, 16GB memory, RTX 2060

$ time git clean -d -f -x
Removing build/

real 0m6.178s
user 0m0.125s
sys 0m0.952s

and without build

$ time git clean -d -f -x

real 0m0.079s
user 0m0.015s
sys 0m0.046s

1 Like

@kofa I hope I got this right

$ time rm -rf ~/darktable/build

real 0m2.002s
user 0m0.093s
sys 0m0.640s

1 Like

On my system, right after a new build:

$ time rm -rf build/

real    0m1.702s
user    0m0.093s
sys     0m0.905s

2 Likes

I recently got this error message when compiling darktable. Any idea as to how to correct it?

[766/947] Building CXX object lib/darktable/plugins/imageio/format/CMakeFiles/exr.dir/exr.cc.obj
FAILED: lib/darktable/plugins/imageio/format/CMakeFiles/exr.dir/exr.cc.obj
C:\msys64\ucrt64\bin\c++.exe -DAVIF_DLL -DGDK_DISABLE_DEPRECATED -DGDK_VERSION_MIN_REQUIRED=GDK_VERSION_3_24 -DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_MIN_REQUIRED -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_56 -DGTK_DISABLE_DEPRECATED -DGTK_DISABLE_SINGLE_INCLUDES -DHAVE_BROTLI=1 -DHAVE_BUILTIN_CPU_SUPPORTS -DHAVE_CONFIG_H -DHAVE_GMIC -DHAVE_GPHOTO2 -DHAVE_GRAPHICSMAGICK -DHAVE_ICU -DHAVE_IMATH -DHAVE_ISO_CODES -DHAVE_LIBAVIF=1 -DHAVE_LIBHEIF=1 -DHAVE_LIBJXL -DHAVE_LIBRAW=1 -DHAVE_LIBSECRET -DHAVE_LIBSHARPYUV=1 -DHAVE_MAP -DHAVE_OPENCL -DHAVE_OPENEXR -DHAVE_OPENJPEG -DHAVE_OSMGPSMAP_110_OR_NEWER -DHAVE_OSMGPSMAP_NEWER_THAN_110 -DHAVE_VISIBILITY -DHAVE_WEBP -DHAVE_WINDOWS_CREDENTIALS -DIMATH_DLL -DLIBHEIF_EXPORTS -DOPENEXR_DLL -DSQLITE_CORE -DSQLITE_ENABLE_ICU -DUSE_LUA -D_POSIX_THREAD_SAFE_FUNCTIONS -D_USE_MATH_DEFINES -D__USE_MINGW_ANSI_STDIO=1 -Dexr_EXPORTS -IC:/msys64/home/Mike/darktable/build/lib/darktable/plugins/imageio/format -IC:/msys64/home/Mike/darktable/src/imageio/format -IC:/msys64/home/Mike/darktable/src -IC:/msys64/home/Mike/darktable/src/external/LuaAutoC -IC:/msys64/home/Mike/darktable/build/bin -isystem C:/msys64/home/Mike/darktable/src/external -isystem C:/msys64/home/Mike/darktable/src/external/OpenCL -isystem C:/msys64/ucrt64/include/glib-2.0 -isystem C:/msys64/ucrt64/lib/glib-2.0/include -isystem C:/msys64/ucrt64/include/gtk-3.0 -isystem C:/msys64/ucrt64/include/pango-1.0 -isystem C:/msys64/ucrt64/include/harfbuzz -isystem C:/msys64/ucrt64/include/cairo -isystem C:/msys64/ucrt64/include/freetype2 -isystem C:/msys64/ucrt64/include/pixman-1 -isystem C:/msys64/ucrt64/include/gdk-pixbuf-2.0 -isystem C:/msys64/ucrt64/include/libpng16 -isystem C:/msys64/ucrt64/include/webp -isystem C:/msys64/ucrt64/include/atk-1.0 -isystem C:/msys64/ucrt64/include/fribidi -isystem C:/msys64/ucrt64/include/libxml2 -isystem C:/msys64/ucrt64/include/lensfun -isystem C:/msys64/ucrt64/include/librsvg-2.0 -isystem C:/msys64/ucrt64/include/json-glib-1.0 -isystem C:/msys64/ucrt64/include/openjpeg-2.5 -isystem C:/msys64/ucrt64/include/libsecret-1 -isystem C:/msys64/ucrt64/include/GraphicsMagick -isystem C:/msys64/ucrt64/include/osmgpsmap-1.0 -isystem C:/msys64/ucrt64/include/libsoup-2.4 -isystem C:/msys64/ucrt64/include/Imath -isystem C:/msys64/ucrt64/include/OpenEXR -O3 -march=skylake -Wall -Wno-format -Wshadow -Wtype-limits -Wvla -Wmaybe-uninitialized -Wno-unknown-pragmas -Wno-error=varargs -Wno-format-truncation -Wno-error=address-of-packed-member -fopenmp -O3 -DNDEBUG -std=c++17 -fvisibility=hidden -fno-keep-inline-dllexport -DUNICODE -D_UNICODE -Werror -Wfatal-errors -include common/module_api.h -include imageio/format/imageio_format_api.h -MD -MT lib/darktable/plugins/imageio/format/CMakeFiles/exr.dir/exr.cc.obj -MF lib\darktable\plugins\imageio\format\CMakeFiles\exr.dir\exr.cc.obj.d -o lib/darktable/plugins/imageio/format/CMakeFiles/exr.dir/exr.cc.obj -c C:/msys64/home/Mike/darktable/src/imageio/format/exr.cc
In file included from C:/msys64/home/Mike/darktable/src/common/darktable.h:82,
from C:/msys64/home/Mike/darktable/src/common/colorspaces.h:21,
from C:/msys64/home/Mike/darktable/src/imageio/format/imageio_format_api.h:32,
from :
C:/msys64/ucrt64/lib/gcc/x86_64-w64-mingw32/15.1.0/include/omp.h:448:1: error: template with C linkage
448 | template<typename __T, omp_allocator_handle_t __Handle>
| ^~~~~~~~
compilation terminated due to -Wfatal-errors.
[779/947] Building C object bin/chart/CMakeFiles/darktable-chart.dir/main.c.obj
ninja: build stopped: subcommand failed.

My script:
lensfun-update-data
cd ~/darktable/
rm -rf ~/darktable/build
git clean -dxf
git reset --hard
git fetch -p
git merge
git submodule update --init --recursive
mkdir build
cd build
pacman -Suy
cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/opt/darktable -DCUSTOM_CFLAGS=ON -DCMAKE_CXX_FLAGS=“-O3 -march=skylake” -DCMAKE_C_FLAGS=“-O3 -march=skylake” -DBINARY_PACKAGE_BUILD=OFF …/.
cmake --build . --target package

A known issue since latest GCC 15: omp.h is included inside an extern "C" block which breaks with GCC 15 · Issue #18709 · darktable-org/darktable · GitHub

1 Like