Public bug reported:
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) {
| ^
** Affects: libvoikko (Ubuntu)
Importance: Undecided
Status: New
** Description changed:
+ 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);
- | ^
+ 309 | void voikkoFreeGrammarError(struct VoikkoGrammarError * error);
+ | ^
grammar/interface.cpp:116:19: note: type mismatch in parameter 1
- 116 | VOIKKOEXPORT void voikkoFreeGrammarError(VoikkoGrammarError * error) {
- | ^
+ 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 {
- | ^
+ 40 | class VoikkoGrammarError {
+ | ^
./voikko.h:242:8: note: the incompatible type is defined here
- 242 | struct VoikkoGrammarError;
- | ^
+ 242 | struct VoikkoGrammarError;
+ | ^
grammar/interface.cpp:116:19: note: 'voikkoFreeGrammarError' was previously
declared here
- 116 | VOIKKOEXPORT void voikkoFreeGrammarError(VoikkoGrammarError * error) {
- | ^
+ 116 | VOIKKOEXPORT void voikkoFreeGrammarError(VoikkoGrammarError * error) {
+ | ^
--
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:
New
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) {
| ^
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 : [email protected]
Unsubscribe : https://launchpad.net/~desktop-packages
More help : https://help.launchpad.net/ListHelp