Summary: | bindings generator can't be build with -Wl,--no-undefined | ||
---|---|---|---|
Product: | [Unmaintained] bindings | Reporter: | Pavel Volkovitskiy <olfway> |
Component: | general | Assignee: | kde-bindings |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | arno |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: | "fixes" build with -Wl,--no-undefined |
Description
Pavel Volkovitskiy
2010-02-24 23:05:29 UTC
Yes, that's because we link the plugins to the executable, instead of a library. Does building without -Wl,--no-undefined cause any trouble for packagers, then? Building with -Wl,--no-undefined helps you to avoid runtime linking errors and whole kde can be build with it. only smokegen cannot Also it smokegen build can be easily "fixed" with -Wl,--undefined flag in CmakeLists.txt, see kdebindings-generators-undefined.patch Created attachment 41124 [details]
"fixes" build with -Wl,--no-undefined
Thanks for the patch, but for some obscure reason this breaks the build for me. I get the following: Linking CXX shared module ../../bin/generator_smoke.so cd /home/pumphaus/dev/KDE/kdebindings-build/generator/generators/smoke && /usr/bin/cmake -E cmake_link_script CMakeFiles/generator_smoke.dir/link.txt --verbose=1 /usr/bin/c++ -fPIC -Wl,--no-undefined -Wl,--undefined -shared -Wl,-soname,generator_smoke.so -o ../../bin/generator_smoke.so CMakeFiles/generator_smoke.dir/generator_smoke.o CMakeFiles/generator_smoke.dir/writeClasses.o CMakeFiles/generator_smoke.dir/writeSmokeDataFile.o CMakeFiles/generator_smoke.dir/helpers.o -lQtCore -lQtXml /usr/bin/ld: generator_smoke.so: No such file: No such file or directory The command invocation looks correct to me. Any ideas why this is failing? Ah, got it. ld expects a symbol name after --undefined. So simply specifying --undefined won't do it. We have to remove --no-undefied from the linker flags to make this build. SVN commit 1097205 by arnorehn: Force RPATH for smokegen so that it can be used from within the build tree. Remove -Wl,--no-undefined from the CXXFLAGS for the generator plugins to link properly. BUG:228386 BUG:228383 M +4 -0 CMakeLists.txt M +3 -1 generators/CMakeLists.txt WebSVN link: http://websvn.kde.org/?view=rev&revision=1097205 |