Create a konsoleprivate_core static library
This new cmake target will hold classes that do not depend on other konsole classes, so we can start to untangle the source code. next: export profile as a static library
-
This (or one of the subsequent commits) has broken building konsole on the OBS:
/libQt5Network.so.5.15.0 /usr/lib/libQt5Widgets.so.5.15.0 /usr/lib/libQt5Gui.so.5.15.0 /usr/lib/libQt5Core.so.5.15.0 [ 291s] /usr/lib/gcc/i586-suse-linux/10/../../../../i586-suse-linux/bin/ld: /tmp/konsolepart.so.k1EWfK.ltrans4.ltrans.o: in function `Konsole::ProfileManager::deleteProfile(QExplicitlySharedDataPointer<Konsole::Profile>)': [ 291s] /home/abuild/rpmbuild/BUILD/konsole-20.11.70git.20200728T171329~74764db4/src/profile/ProfileManager.cpp:477: undefined reference to `KonsoleDebug()'
-
@lbeltrame that code is defined in CMake:
176:ecm_qt_declare_logging_category(konsoleprivate_SRCS HEADER konsoledebug.h IDENTIFIER KonsoleDebug CATEGORY_NAME org.kde.konsole)
and konsoleprivate_SRCS is added to the konsoleprivate library sources. Locally konsole builds for me, can you test with obs if you change this KonsoleDebug definition to konsoleprivate_core things build?
-
@tcanabrava What are your linker flags?
The ones we use here are
-Wl,--as-needed -Wl,--no-undefined -Wl,-Bsymbolic-functions
-
Can you try setting
-DCMAKE_EXE_LINKER_FLAGS="-Wl,--as-needed -Wl,--no-undefined -Wl,-Bsymbolic-functions" -DCMAKE_MODULE_LINKER_FLAGS="-Wl,--as-needed -Wl,--no-undefined -Wl,-Bsymbolic-functions" -DCMAKE_SHARED_LINKER_FLAGS="-Wl,--as-needed -Wl,--no-undefined -Wl,-Bsymbolic-functions"
I'm guessing it will fail to build for you too. It is likely that the default linker flags don't catch this undefined reference.
Also, from a quick chat on IRC with @fvogt discussing this issue, it looks like there is indeed some linking problem:
[12:21] konsoleprofile only links against konsoleprivate_core, but the references are in konsoleprivate
-
AFAICT it's actually a664523f which broke it.
EditProfileDialog.cpp
needs to be linked againstkonsoleprivate
. -
@fvogt @lbeltrame can you test !182 (closed) ?
-
@fvogt that was the original one the comment from @lbeltrame, I tougth it was the only one. the issue is that konsole used to be a single library and it's a tangled mess impossible to reason about, that's why I'm starting to separate the libraries. It indeed fails to link against it currently, that's not a reason to just throw away the start of the separation and link. I'm trying again with another patch, keeping things separated.