Skip to content

qt: patch missing includes when +opengl %gcc@10:#19963

Merged
sethrj merged 3 commits intospack:developfrom
eic:bugfix/qt5-15-gcc-10-headers
Nov 18, 2020
Merged

qt: patch missing includes when +opengl %gcc@10:#19963
sethrj merged 3 commits intospack:developfrom
eic:bugfix/qt5-15-gcc-10-headers

Conversation

@wdconinc
Copy link
Copy Markdown
Contributor

With gcc-10, [email protected]+opengl fails with

  >> 55479    src/mbgl/util/convert.cpp:6:56: error: 'int32_t' was not declared in this scope
     55480        6 | template std::array<float, 2> convert(const std::array<int32_t, 2>&);
     55481          |                                                        ^~~~~~~
  >> 55482    src/mbgl/util/convert.cpp:6:66: error: template argument 1 is invalid
     55483        6 | template std::array<float, 2> convert(const std::array<int32_t, 2>&);
     55484          |                                                                  ^
  >> 55485    src/mbgl/util/convert.cpp:6:31: error: template-id 'convert<>' for 'std::array<float, 2> mbgl::util::convert(const int&)' does not match any template declaration
     55486        6 | template std::array<float, 2> convert(const std::array<int32_t, 2>&);
     55487          |                               ^~~~~~~
     55488    In file included from src/mbgl/util/convert.cpp:1:
     55489    include/mbgl/util/convert.hpp:12:37: note: candidate is: 'template<class To, class From, long unsigned int Size, class> constexpr std::array<To, Size> mbgl::util::convert(const std::array<_Tp, _Nm>&)'
     55490       12 | MBGL_CONSTEXPR std::array<To, Size> convert(const std::array<From, Size>&from) {
     55491          |  

The offending file, convert.cpp, is in qtlocation/src/3rdparty/mapbox-gl-native/src/mbgl/util/convert/ and the error is caused by a missing #include "stdint.h".

This has been reported upstream and resolved in [email protected]. That bug report includes the patch included here to allows a specific qtlocation 3rd party plugin (which is only used when +opengl) to compile with gcc-10.

I tested that this patch applies cleanly against [email protected] through the most recent version, [email protected] at this time. The patch is set to apply for [email protected]:5.15 since 5.16 has the fix upstream. Before [email protected] other patches fail to apply (qt5-12-configure.patch fails against [email protected]), and spack never gets to trying to apply this new patch. mapbox-gl-native was added in [email protected], so before then the patch should not apply. The conflict excludes potentially problematic compiles instead of addressing the hypothetical of someone running gcc-10 but wanting a specific older version of qt.

I tested that [email protected] and [email protected] both build fine with [email protected] with this patch, but didn't explicitly build any versions in between (qt is a fairly big compile...).

Maintainer tag: @sethrj

@sethrj sethrj changed the title [qt] (patch) requires additional includes when +opengl %gcc@10: qt: patch missing includes when +opengl %gcc@10: Nov 18, 2020
@sethrj
Copy link
Copy Markdown
Contributor

sethrj commented Nov 18, 2020

Excellent, this looks like it might conflict with/replace/supplement #19948 which was also submitted very recently?

@wdconinc
Copy link
Copy Markdown
Contributor Author

I didn't encounter issues with jp2 (might be related to other variants) but the other parts are indeed solving the same problem.

@sethrj
Copy link
Copy Markdown
Contributor

sethrj commented Nov 18, 2020

With the upstream bug report linked and the extended version range, I'm going to merge this before #19948

@sethrj sethrj merged commit a0a15b5 into spack:develop Nov 18, 2020
@wdconinc wdconinc deleted the bugfix/qt5-15-gcc-10-headers branch October 16, 2022 18:34
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.

2 participants