darktable
darktable copied to clipboard
building master branch gives linker error. building release-4.8.1 (or earlier) does not.
Describe the bug
I frequently build DT from the github master branch.
Since a couple of days (2 weeks?) building fails, due to linker errors:
libdarktable.so: undefined reference to_ZGVbN4v_log2f'
libdarktable.so: undefined reference to _ZGVdN8v_exp2f' libdarktable.so: undefined reference to _ZGVdN8v_log2f'
libdarktable.so: undefined reference to _ZGVbN4v_exp2f'
However, when I build e.g. the version tagged 'release-4.8.1' there are no issues.
Steps to reproduce
- Checkout the master branch
- cd into the source directory
- ./build.sh --prefix /opt/darktable --build-type Release Compilation starts as usual. At approx 56% the above erros appear.
Expected behavior
No linker errors
Logfile | Screenshot | Screencast
No response
Commit
release-4.8.1 builds fine. HEAD at master does not.
Where did you obtain darktable from?
GitHub nightly
darktable version
latest github version
What OS are you using?
Linux
What is the version of your OS?
OpenSUSE leap 15.5
Describe your system?
gcc 13.3.0
Are you using OpenCL GPU in darktable?
Yes
If yes, what is the GPU card and driver?
No response
Please provide additional context if applicable. You can attach files too, but might need to rename to .txt or .zip
No response
The CI actions and the nightly builds seem fine: https://github.com/darktable-org/darktable/actions
So it's more likely something at your end.
May I suggest seeking user support at https://discuss.pixls.us/c/software/darktable/19 before engaging developers here?
A compiler update and maybe you didn't clear the build directory? EDIT: Reading your report it doesn't look like it is the issue though.
Those symbols look like an attempt to link vectorized versions of the two functions which don't exist in the runtime library. We haven't changed src/develop/openmp_maths.h since well before the 4.8 release, so it must be a change to your compiler and its runtime library. You can work around the problem by commenting out the DT_OMP_DECLARE_SIMD() before each of those two function declarations in the above file.
Those symbols look like an attempt to link vectorized versions of the two functions which don't exist in the runtime library. We haven't changed src/develop/openmp_maths.h since well before the 4.8 release, so it must be a change to your compiler and its runtime library. You can work around the problem by commenting out the
DT_OMP_DECLARE_SIMD()before each of those two function declarations in the above file.
This commenting out of DT_OMP_DECLARE_SIMD indeed made the error disappear!
As a matter of fact, I only commented it out once, before the declaration of log2f(), expecting the error related to exp2f to remain. To my surprise the linker however did not protest anymore about the exp2f function.
Thanks for your help!
What likely happened is that the offending calls were both in the same function, and when the compiler wasn't told it had a vectorized version of the one function available, it didn't try to use the vectorized version of the other, either.
Yeah, that sounds plausible.
Do you have any idea how it is possible that the issue occurs for the head of the master branch, but not for a tagged release? This is all on one and the same machine, with the same compiler...
Regards, Bertwim
For whatever reason, the older code didn't cause vectorization to be applied in a way that resulted those functions being called.
This issue has been marked as stale due to inactivity for the last 60 days. It will be automatically closed in 300 days if no update occurs. Please check if the master branch has fixed it and report again or close the issue.