Skip to content
Commit ac19548d authored by Tomaz  Canabrava's avatar Tomaz Canabrava
Browse files

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
parent 0478529c
  • Developer

    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()'
  • Author Developer

    @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?

  • Developer

    @tcanabrava What are your linker flags?

    The ones we use here are

    -Wl,--as-needed -Wl,--no-undefined -Wl,-Bsymbolic-functions

  • Author Developer

    I don't change the cmake default linker flags.

  • Developer

    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

  • Developer

    AFAICT it's actually a664523f which broke it. EditProfileDialog.cpp needs to be linked against konsoleprivate.

  • Author Developer

    Profile should not link against konsoleprivate, but the KonsoleDebug should be moved to konsole_core, I'm creating a patch for this.

  • Author Developer
  • Developer

    AFAICT that would only fix undefined reference to `KonsoleDebug()' but none of the others.

    The issue is that profile depends on konsoleprivate but does not link against it.

  • Author Developer

    @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.

0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment