Bug 514259 - link issue if build library & application with different compiler
Summary: link issue if build library & application with different compiler
Status: REPORTED
Alias: None
Product: kldap
Classification: Frameworks and Libraries
Component: general (other bugs)
Version First Reported In: git
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2026-01-07 07:34 UTC by Z. Liu
Modified: 2026-01-08 02:08 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Z. Liu 2026-01-07 07:34:55 UTC
see https://bugs.gentoo.org/967872

If kldap is built using clang, and incidenceeditor is then built using gcc, the build fails with the following error:

/usr/lib/gcc/x86_64-pc-linux-gnu/15/../../../../x86_64-pc-linux-gnu/bin/ld: src/CMakeFiles/KPim6IncidenceEditor.dir/resourceitem.cpp.o: in function `IncidenceEditorNG::ResourceItem::ResourceItem(KLDAPCore::LdapDN const&, QList<QString> const&, KLDAPCore::LdapClient const&, QSharedPointer<IncidenceEditorNG::ResourceItem> const&)':
resourceitem.cpp:(.text+0x1401): undefined reference to `KLDAPCore::LdapServer::setScope(KLDAPCore::LdapUrl::{unnamed type#2})'

The root cause is likely a GCC ABI issue (see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123443 & https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99931). Specifically, Scope was changed from typedef to using in commit 3d2613a97e9bb0bdd67d732eb241a50e92fb6153, which appears to trigger this problem when mixing compilers.

Should we consider reverting the using change to restore compatibility?
Comment 1 Albert Astals Cid 2026-01-07 21:49:22 UTC
If the compilers don't promise compatibility when mixing them, then it's not a bug, if they do, it's a bug of the compiler.

I don't really see us chasing this kind of issues, on event less more than 4 years after the commit.
Comment 2 Z. Liu 2026-01-08 02:08:10 UTC
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99931#c4

I think it's a gcc bug.