Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Build fixes for gcc 10 and 11 #16608

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Build fixes for gcc 10 and 11 #16608

wants to merge 4 commits into from

Conversation

t-8ch
Copy link

@t-8ch t-8ch commented May 14, 2021

Each commit describes the concrete problem it fixes.

t-8ch added 4 commits May 14, 2021 18:58
Without this gcc 10.2.0 complains about the loops condition never to be
true with the following error:

src/mbgl/style/expression/compound_expression.cpp: In instantiation of ‘mbgl::style::expression::EvaluationResult mbgl::style::expression::detail::Signature<R(const mbgl::style::expression::EvaluationContext&, Params ...)>::applyImpl(const mbgl::style::expression::EvaluationContext&, const Args&, std::index_sequence<I ...>) const [with long unsigned int ...I = {}; R = mbgl::style::expression::Result<bool>; Params = {}; mbgl::style::expression::detail::SignatureBase::Args = std::vector<std::unique_ptr<mbgl::style::expression::Expression> >; std::index_sequence<I ...> = std::integer_sequence<long unsigned int>]’:
src/mbgl/style/expression/compound_expression.cpp:154:25:   required from ‘mbgl::style::expression::EvaluationResult mbgl::style::expression::detail::Signature<R(const mbgl::style::expression::EvaluationContext&, Params ...)>::apply(const mbgl::style::expression::EvaluationContext&, const Args&) const [with R = mbgl::style::expression::Result<bool>; Params = {}; mbgl::style::expression::detail::SignatureBase::Args = std::vector<std::unique_ptr<mbgl::style::expression::Expression> >]’
src/mbgl/style/expression/compound_expression.cpp:153:22:   required from here
src/mbgl/style/expression/compound_expression.cpp:161:35: error: comparison of unsigned expression in ‘< 0’ is always false [-Werror=type-limits]
  161 |         for (std::size_t i = 0; i < sizeof...(Params); ++i) {
      |                                 ~~^~~~~~~~~~~~~~~~~~~
This is needed for gcc 11.1.0
Fixes the compilation with gcc 11.1.0
This fixes the following error encountered with gcc 11.1.0:

/usr/bin/ld: ../libmbgl-core.a(thread.cpp.o): undefined reference to symbol 'pthread_setname_np@@GLIBC_2.12'
/usr/bin/ld: /usr/lib/libpthread.so.0: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
@t-8ch t-8ch requested a review from a team as a code owner May 14, 2021 17:46
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant