8000 Git master : Compile error : error: ‘_get_cache_filename’ defined but not used [-Werror=unused-function] · Issue #18794 · darktable-org/darktable · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Git master : Compile error : error: ‘_get_cache_filename’ defined but not used [-Werror=unused-function] #18794

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
1 task done
KarlMagnusLarsson opened this issue May 11, 2025 · 3 comments

Comments

@KarlMagnusLarsson
Copy link
KarlMagnusLarsson commented May 11, 2025

Is there an existing issue for this?

  • I checked and did not find my issue in the already reported ones

Describe the bug

When I compile git master I get this compilation error:

In file included from /home/magnus/test/darktable-test/darktable/build/lib/darktable/plugins/introspection_lut3d.c:50:
/home/magnus/test/darktable-test/darktable/src/iop/lut3d.c:452:13: error: ‘_get_cache_filename’ defined but not used [-Werror=unused-function]
  452 | static void _get_cache_filename(const char *const lutname, char *const cache_filename)
      |             ^~~~~~~~~~~~~~~~~~~
compilation terminated due to -Wfatal-errors.
cc1: all warnings being treated as errors
make[2]: *** [lib/darktable/plugins/CMakeFiles/lut3d.dir/build.make:82: lib/darktable/plugins/CMakeFiles/lut3d.dir/introspection_lut3d.c.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:6548: lib/darktable/plugins/CMakeFiles/lut3d.dir/all] Error 2

Steps to reproduce

  1. Checkout git master. Cd darktable.
  2. cmake -DCMAKE_INSTALL_PREFIX=/home/magnus/test/darktable-test/install -DCMAKE_BUILD_TYPE=Release ..
  3. make -j32
In file included from /home/magnus/test/darktable-test/darktable/build/lib/darktable/plugins/introspection_lut3d.c:50:
/home/magnus/test/darktable-test/darktable/src/iop/lut3d.c:452:13: error: ‘_get_cache_filename’ defined but not used [-Werror=unused-function]
  452 | static void _get_cache_filename(const char *const lutname, char *const cache_filename)
      |             ^~~~~~~~~~~~~~~~~~~
compilation terminated due to -Wfatal-errors.
cc1: all warnings being treated as errors
make[2]: *** [lib/darktable/plugins/CMakeFiles/lut3d.dir/build.make:82: lib/darktable/plugins/CMakeFiles/lut3d.dir/introspection_lut3d.c.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:6548: lib/darktable/plugins/CMakeFiles/lut3d.dir/all] Error 2

Expected behavior

Sucessful build

Logfile | Screenshot | Screencast

Git bisect result:

200c4b9bc80776b42f69ac6fa2fcca1ae1faa308 is the first bad commit
commit 200c4b9bc80776b42f69ac6fa2fcca1ae1faa308
Author: Hanno Schwalm <hanno@schwalm-bremen.de>
Date:   Sat May 10 10:54:40 2025 +0200

    Lut3D static maintenance
    
    Internal functions should be static and have a leading underscore,
    take care about c++ code.

 src/iop/lut3d.c       | 149 +++++++++++++++++++++++++++-----------------------
 src/iop/lut3dgmic.cpp |   8 +--
 2 files changed, 84 insertions(+), 73 deletions(-)

Commit

200c4b9

Where did you obtain darktable from?

Self compiled.

darktable version

11f26a8

What OS are you using?

Linux

What is the version of your OS?

Debian stable 12.10 Bookworm

Describe your system

Debian stable 12.10 Bookworm
gcc version 12.2.0 (Debian 12.2.0-14)

Are you using OpenCL GPU in darktable?

Yes

If yes, what is the GPU card and driver?

No relevent here.

Please provide additional context if applicable. You can attach files too, but might need to rename to .txt or .zip

No response

@KarlMagnusLarsson
Copy link
Author
KarlMagnusLarsson commented May 11, 2025

EDIT: If I add -Wno-unused-function to darktable/cmake/compiler-warnings.cmake, then I can compile again, as a temporary workaround:

...
CHECK_COMPILER_FLAG_AND_ENABLE_IT(-Wall)
CHECK_COMPILER_FLAG_AND_ENABLE_IT(-Wno-unused-function)
...

@jenshannoschwalm
Copy link
Collaborator

already fixed in a41f307

@KarlMagnusLarsson
Copy link
Author
KarlMagnusLarsson commented May 11, 2025

already fixed in a41f307

Yes, it works for me. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
0