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

Does not compile on gcc 8.3 with no-rtti (pmr) #109

Open
greenrobot opened this issue Jan 19, 2024 · 0 comments
Open

Does not compile on gcc 8.3 with no-rtti (pmr) #109

greenrobot opened this issue Jan 19, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@greenrobot
Copy link

For crosscompiling, we rely on older compiler versions.

Because of pmr (we do not do anything with pmr), compilation fails.

Does it require pmr internally, or only if the user uses it? Maybe it could "just" be disabled completely? I think pmr is not a great dependency to have: while compilers support C++17 for a long time, pmr only came with gcc 9. And relying on "experimental" API (pre gcc 9) does not make one very comfortable, either.

In file included from ../../../../../../../objectbox/src/main/cpp/external/unordered-dense/unordered_dense.h:107,
                 from ...
/opt/aarch64-linux-gnu/aarch64-linux-gnu/include/c++/8.3.0/experimental/memory_resource: In instantiation of 'bool std::experimental::fundamentals_v2::pmr::__resource_adaptor_imp<_Alloc>::do_is_equal(const std::experimental::fundamentals_v2::pmr::memory_resource&) const [with _Alloc = std::allocator<char>]':
/opt/aarch64-linux-gnu/aarch64-linux-gnu/include/c++/8.3.0/experimental/memory_resource:320:7:   required from here
/opt/aarch64-linux-gnu/aarch64-linux-gnu/include/c++/8.3.0/experimental/memory_resource:322:13: error: 'dynamic_cast' not permitted with -fno-rtti
  auto __p = dynamic_cast<const __resource_adaptor_imp*>(&__other);
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
gmake[3]: *** [src/CMakeFiles/something.dir/hnsw/HnswTypes.cpp.o] Error 1
gmake[3]: *** Waiting for unfinisgmake[3]: *** [src/CMakeFiles/something.dir/hnsw/HnswTypes.cpp.o] Error 1
hed jobs....
In file included from ../../../../../../../external/unordered-dense/unordered_dense.h:107,
                 from ...

/opt/aarch64-linux-gnu/aarch64-linux-gnu/include/c++/8.3.0/experimental/memory_resource: In instantiation of 'bool std::experimental::fundamentals_v2::pmr::__resource_adaptor_imp<_Alloc>::do_is_equal(const std::experimental::fundamentals_v2::pmr::memory_resource&) const [with _Alloc = std::allocator<char>]':
/opt/aarch64-linux-gnu/aarch64-linux-gnu/include/c++/8.3.0/experimental/memory_resource:320:7:   required from here
/opt/aarch64-linux-gnu/aarch64-linux-gnu/include/c++/8.3.0/experimental/memory_resource:322:13: error: 'dynamic_cast' not permitted with -fno-rtti
  auto __p = dynamic_cast<const __resource_adaptor_imp*>(&__other);
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@greenrobot greenrobot added the bug Something isn't working label Jan 19, 2024
@greenrobot greenrobot changed the title Does not compile on gcc 8.3 with no-rtti ( Does not compile on gcc 8.3 with no-rtti (pmr) Jan 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants