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

fix build dependencies (boost, qt) with gcc-11 #990

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

Conversation

DeckerSU
Copy link

@DeckerSU DeckerSU commented Nov 1, 2024

This PR fixes the build of dependencies (Boost, Qt) on modern Linux distributions (such as Ubuntu 22.04.5 LTS) with GCC 11.x installed. Without these fixes, attempting to build dependencies with GCC 11 using:

make -C ${PWD}/depends V=1 HOST=$(depends/config.guess) -j$(nproc --all)

will result in various errors. This PR introduces patches that are present in newer versions of Boost and Qt, resolving the issues with the GCC 11.x build.

Build errors and warnings:

  1. Error. Solved in ignore_wnonnull_gcc_11.patch:
./boost/concept/usage.hpp:16:48: warning: ‘this’ pointer is null [-Wnonnull]
   16 |     ~usage_requirements() { ((Model*)0)->~Model(); }
      |                             ~~~~~~~~~~~~~~~~~~~^~
./boost/concept/usage.hpp:30:7: note: in a call to non-static member function ‘boost::SinglePassRangeConcept<T>::~SinglePassRangeConcept() [with T = const boost::iterator_range<__gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char> > >]’
   30 |       ~model()
      |       ^
./boost/range/concepts.hpp:284:9: note: in expansion of macro ‘BOOST_CONCEPT_USAGE’
  284 |         BOOST_CONCEPT_USAGE(SinglePassRangeConcept)
      |         ^~~~~~~~~~~~~~~~~~~
...failed gcc.compile.c++ bin.v2/libs/thread/build/gcc-11.4.0/release/link-static/threadapi-pthread/threading-multi/visibility-hidden/pthread/thread.o...
  1. Error. Solved in commit-74fb0a2.patch:
./boost/thread/pthread/thread_data.hpp:60:5: error: missing binary operator before token "("
   60 | #if PTHREAD_STACK_MIN > 0
      |     ^~~~~~~~~~~~~~~~~
...failed gcc.compile.c++ bin.v2/libs/thread/build/gcc-11.4.0/release/link-static/threadapi-pthread/threading-multi/visibility-hidden/pthread/thread.o...
  1. Warning. Solved in commit-f9d0e59.patch:
./boost/thread/pthread/thread_data.hpp: In member function ‘void boost::thread_attributes::set_stack_size(std::size_t)’:
./boost/thread/pthread/thread_data.hpp:61:19: warning: comparison of integer expressions of different signedness: ‘std::size_t’ {aka ‘long unsigned int’} and ‘long int’ [-Wsign-compare]
   61 |           if (size<PTHREAD_STACK_MIN) size=PTHREAD_STACK_MIN;
      |                   ^
RmTemps bin.v2/libs/thread/build/gcc-11.4.0/release/link-static/threadapi-pthread/threading-multi/visibility-hidden/libboost_thread-mt-x64.a(clean)
  1. Qt. Missed limits header - https://bugreports.qt.io/browse/QTBUG-90395 . Solved in fix_limits_header.patch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant