This bug was fixed in the package libvoikko - 4.3.2-1ubuntu1

---------------
libvoikko (4.3.2-1ubuntu1) plucky; urgency=medium

  * debian/rules: Disable LTO to fix the build (LP: #2104913)

 -- Alessandro Astone <alessandro.ast...@canonical.com>  Mon, 31 Mar
2025 16:20:46 +0200

** Changed in: libvoikko (Ubuntu)
       Status: Fix Committed => Fix Released

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to libvoikko in Ubuntu.
https://bugs.launchpad.net/bugs/2104913

Title:
  libvoikko violates C++ ODR rule making it fail to compile witih LTO

Status in libvoikko package in Ubuntu:
  Fix Released

Bug description:
  As reported upstream: https://github.com/voikko/corevoikko/issues/62

  The public header voikko.h declares some opaque data types, such as
  struct VoikkoGrammarError, struct VoikkoHandle, struct
  voikko_mor_analysis.

  In the implementations however, the type names are under namespaces,
  or even use different names.

  Here's one example error from gcc 14.2.0 and CXXFLAGS="-flto=auto":

  ./voikko.h:309:6: error: 'voikkoFreeGrammarError' violates the C++ One 
Definition Rule [-Werror=odr]
    309 | void voikkoFreeGrammarError(struct VoikkoGrammarError * error);
        |      ^
  grammar/interface.cpp:116:19: note: type mismatch in parameter 1
    116 | VOIKKOEXPORT void voikkoFreeGrammarError(VoikkoGrammarError * error) {
        |                   ^
  ./grammar/VoikkoGrammarError.hpp:40:7: note: type name 
'libvoikko::grammar::VoikkoGrammarError' should match type name 
'VoikkoGrammarError'
     40 | class VoikkoGrammarError {
        |       ^
  ./voikko.h:242:8: note: the incompatible type is defined here
    242 | struct VoikkoGrammarError;
        |        ^
  grammar/interface.cpp:116:19: note: 'voikkoFreeGrammarError' was previously 
declared here
    116 | VOIKKOEXPORT void voikkoFreeGrammarError(VoikkoGrammarError * error) {
        |                   ^

  https://launchpadlibrarian.net/783617753/buildlog_ubuntu-plucky-
  amd64.libvoikko_4.3.2-1build1_BUILDING.txt.gz

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/libvoikko/+bug/2104913/+subscriptions


-- 
Mailing list: https://launchpad.net/~desktop-packages
Post to     : desktop-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~desktop-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to