Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ODR violation in unittest binary #36

Open
margnus1 opened this issue Jun 30, 2018 · 0 comments
Open

ODR violation in unittest binary #36

margnus1 opened this issue Jun 30, 2018 · 0 comments
Labels

Comments

@margnus1
Copy link
Contributor

margnus1 commented Jun 30, 2018

Linking object object files compiled with RTTI with object files compiled without RTTI leads to violations of the one definition rule, something that GCC 8 has started warning about when compiling with LTO:

../../src/vecset.h:32:25: warning: virtual table of type ‘struct VecSet’ violates one definition rule [-Wodr]
template<class T> class VecSet{
                        ^
../../src/vecset.h:32:25: note: the conflicting type defined in another translation unit has virtual table with more entries

Newer versions of boost unit test does not require RTTI, but the oldest one we currently support does; otherwise compiling unittest without RTTI would be the obvious solution.

margnus1 added a commit to margnus1/nidhugg that referenced this issue Oct 10, 2019
margnus1 added a commit to margnus1/nidhugg that referenced this issue Oct 11, 2019
@margnus1 margnus1 added the bug label Sep 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant