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

qwt qwt/6.2.0: Build error's when overriding Qt version #16326

Open
ashley-b opened this issue Feb 28, 2023 · 4 comments
Open

qwt qwt/6.2.0: Build error's when overriding Qt version #16326

ashley-b opened this issue Feb 28, 2023 · 4 comments
Labels
bug Something isn't working

Comments

@ashley-b
Copy link
Contributor

Description

When installing qwt/6.2.0 with qt/6.3.0 I get a build error from gcc: Qt requires a C++17 compiler

Package and Environment Details

  • Package Name/Version: qwt/6.2.0
  • Operating System+version: Linux Ubuntu 18.04
  • Compiler+version: GCC 8
  • Docker image: conanio/gcc8
  • Conan version: Conan 1.59.0
  • Python version: Python 3.7.13

Conan profile

Configuration for profile default:

[settings]
os=Linux
os_build=Linux
arch=x86_64
arch_build=x86_64
compiler=gcc
compiler.version=8
compiler.libcxx=libstdc++11
build_type=Release
[options]
[conf]
[build_requires]
[env]

Steps to reproduce

Following command run from inside conanio/gcc8 docker container

conan install  qwt/6.2.0@ --require-override qt/6.3.0 -pr:h default -pr:b default -u -b missing -c tools.system.package_manager:mode=install -c tools.system.package_manager:sudo=True

Logs

Click to expand log
[ 14%] Building CXX object src/CMakeFiles/qwt_objects.dir/qwt_magnifier.cpp.o
In file included from /home/conan/.conan/data/qwt/6.2.0/_/_/build/4438b4efa0b576ee9da17173dcdabefb23b64944/src/src/qwt_global.h:13,
                 from /home/conan/.conan/data/qwt/6.2.0/_/_/build/4438b4efa0b576ee9da17173dcdabefb23b64944/src/src/qwt_graphic.h:13,
                 from /home/conan/.conan/data/qwt/6.2.0/_/_/build/4438b4efa0b576ee9da17173dcdabefb23b64944/src/src/qwt_graphic.cpp:10:
/home/conan/.conan/data/qt/6.3.0/_/_/package/37b79edf1f9287ae72a0010b85f7826c4d07ac12/include/QtCore/qglobal.h:125:6: error: #error "Qt requires a C++17 compiler"
 #    error "Qt requires a C++17 compiler"
      ^~~~~
@ashley-b ashley-b added the bug Something isn't working label Feb 28, 2023
@EstebanDugueperoux2
Copy link
Contributor

Hi @ashley-b,

according to https://doc.qt.io/qt-6/supported-platforms.html minimal gcc requirement is GCC 9.
Perhaps qt conan recipe could be improved about that.

@ashley-b
Copy link
Contributor Author

ashley-b commented Mar 1, 2023

Hi @EstebanDugueperoux2,

qt/6.3.0 did build successfully in conanio/gcc8:latest container, but qwt/6.2.0 failed.
With VERBOSE on the compiler arguments look like this. C++ version is forced to c++11

[ 14%] Building CXX object src/CMakeFiles/qwt_objects.dir/qwt_magnifier.cpp.o
cd /home/conan/.conan/data/qwt/6.2.0/_/_/build/4438b4efa0b576ee9da17173dcdabefb23b64944/build/Release/src && /usr/bin/g++ -DFFI_BUILDING -DLIBXML_STATIC -DPCRE2_STATIC -DQT_CONCURRENT_LIB -DQT_CORE_LIB -DQT_GUI_LIB -DQT_NO_KEYWORDS -DQT_O
PENGLWIDGETS_LIB -DQT_OPENGL_LIB -DQT_PRINTSUPPORT_LIB -DQT_STRICT_ITERATORS -DQT_WIDGETS_LIB -DQWT_MOC_INCLUDE -DQWT_NO_SVG -DU_STATIC_IMPLEMENTATION -DXML_STATIC -I/home/conan/.conan/data/qwt/6.2.0/_/_/build/4438b4efa0b576ee9da17173dcda
befb23b64944/build/Release/src/qwt_objects_autogen/include -isystem /home/conan/.conan/data/qt/6.3.0/_/_/package/37b79edf1f9287ae72a0010b85f7826c4d07ac12/include -isystem /home/conan/.conan/data/qt/6.3.0/_/_/package/37b79edf1f9287ae72a001
0b85f7826c4d07ac12/include/QtCore -isystem /home/conan/.conan/data/zlib/1.2.12/_/_/package/1d877a3df840030e6a8abb74c5ffb9088d08b47a/include -isystem /home/conan/.conan/data/pcre2/10.37/_/_/package/63e2e082db68514d73a3597341e8a175e002e762/
include -isystem /home/conan/.conan/data/bzip2/1.0.8/_/_/package/a5875aed3fc7ae8dd0488f7e5e99acbc480d721d/include -isystem /home/conan/.conan/data/double-conversion/3.2.0/_/_/package/56e0cf6d16ee57367a0661ab743f4e43b29223f8/include -isyst
em /home/conan/.conan/data/icu/71.1/_/_/package/e9d2554556d77c2b930cb43fee1cf1b2036c86a7/include -isystem /home/conan/.conan/data/qt/6.3.0/_/_/package/37b79edf1f9287ae72a0010b85f7826c4d07ac12/include/QtConcurrent -isystem /home/conan/.con
an/data/qt/6.3.0/_/_/package/37b79edf1f9287ae72a0010b85f7826c4d07ac12/include/QtPrintSupport -isystem /home/conan/.conan/data/qt/6.3.0/_/_/package/37b79edf1f9287ae72a0010b85f7826c4d07ac12/include/QtGui -isystem /home/conan/.conan/data/fre
etype/2.12.1/_/_/package/5cb6fe105f36831a2c2b03ab53c73974c359b192/include -isystem /home/conan/.conan/data/freetype/2.12.1/_/_/package/5cb6fe105f36831a2c2b03ab53c73974c359b192/include/freetype2 -isystem /home/conan/.conan/data/libpng/1.6.
37/_/_/package/c5f06ea0d3a7d6f35f03d832e3609fcc34e36a44/include -isystem /home/conan/.conan/data/brotli/1.0.9/_/_/package/224dcd91ed677bf7e341484d95860c4bc8fdde41/include -isystem /home/conan/.conan/data/brotli/1.0.9/_/_/package/224dcd91e
d677bf7e341484d95860c4bc8fdde41/include/brotli -isystem /home/conan/.conan/data/fontconfig/2.13.93/_/_/package/d8858e187cb415894861d32e891e69d5d34c2e1a/include -isystem /home/conan/.conan/data/expat/2.5.0/_/_/package/9a29d10b97b42a53958ce
2a89aa2fe8027567806/include -isystem /home/conan/.conan/data/libuuid/1.0.3/_/_/package/1d877a3df840030e6a8abb74c5ffb9088d08b47a/include -isystem /home/conan/.conan/data/libuuid/1.0.3/_/_/package/1d877a3df840030e6a8abb74c5ffb9088d08b47a/in
clude/uuid -isystem /usr/include/uuid -isystem /home/conan/.conan/data/wayland/1.21.0/_/_/package/e03b7a95afb3f8592db7fbbfc064dda3c6b2962a/include -isystem /home/conan/.conan/data/libffi/3.4.3/_/_/package/1d877a3df840030e6a8abb74c5ffb9088
d08b47a/include -isystem /home/conan/.conan/data/xkbcommon/1.4.1/_/_/package/32f30edd12cd947a8e026711c233844c6677ddbe/include -isystem /home/conan/.conan/data/libxml2/2.10.3/_/_/package/ef73374486ad1894a99815dc78ddec5b517ae320/include -is
ystem /home/conan/.conan/data/libxml2/2.10.3/_/_/package/ef73374486ad1894a99815dc78ddec5b517ae320/include/libxml2 -isystem /home/conan/.conan/data/libiconv/1.17/_/_/package/1d877a3df840030e6a8abb74c5ffb9088d08b47a/include -isystem /usr/in
clude/libdrm -isystem /home/conan/.conan/data/harfbuzz/4.4.1/_/_/package/d52cbe692d0e339b67aa3ab317dd44fe82e14052/include -isystem /home/conan/.conan/data/harfbuzz/4.4.1/_/_/package/d52cbe692d0e339b67aa3ab317dd44fe82e14052/include/harfbuzz -isystem /home/conan/.conan/data/glib/2.75.2/_/_/package/02ae235820b1cc0e761686ccf0ced4cb8b458c83/include/gio-unix-2.0 -isystem /home/conan/.conan/data/glib/2.75.2/_/_/package/02ae235820b1cc0e761686ccf0ced4cb8b458c83/include -isystem /home/conan/.conan/data/glib/2.75.2/_/_/package/02ae235820b1cc0e761686ccf0ced4cb8b458c83/include/glib-2.0 -isystem /home/conan/.conan/data/glib/2.75.2/_/_/package/02ae235820b1cc0e761686ccf0ced4cb8b458c83/lib/glib-2.0/include -isystem /home/conan/.conan/data/libmount/2.36.2/_/_/package/1d877a3df840030e6a8abb74c5ffb9088d08b47a/include -isystem /home/conan/.conan/data/libmount/2.36.2/_/_/package/1d877a3df840030e6a8abb74c5ffb9088d08b47a/include/libmount -isystem /home/conan/.conan/data/libselinux/3.3/_/_/package/3cdf9c40ed41ce093aec6e5f6607274047658b2d/include -isystem /home/conan/.conan/data/libelf/0.8.13/_/_/package/1d877a3df840030e6a8abb74c5ffb9088d08b47a/include -isystem /home/conan/.conan/data/libelf/0.8.13/_/_/package/1d877a3df840030e6a8abb74c5ffb9088d08b47a/include/libelf -isystem /home/conan/.conan/data/md4c/0.4.8/_/_/package/1f0857ade7461814b59ab8670ee33ac1589f95f3/include -isystem /home/conan/.conan/data/qt/6.3.0/_/_/package/37b79edf1f9287ae72a0010b85f7826c4d07ac12/include/QtWidgets -isystem /home/conan/.conan/data/qt/6.3.0/_/_/package/37b79edf1f9287ae72a0010b85f7826c4d07ac12/include/QtOpenGL -isystem /home/conan/.conan/data/qt/6.3.0/_/_/package/37b79edf1f9287ae72a0010b85f7826c4d07ac12/include/QtOpenGLWidgets -m64 -Wall -Wextra -Wpedantic -Wcast-qual     -Wcast-align -Wredundant-decls -Wformat -Wshadow -Woverloaded-virtual     -fno-math-errno -funsafe-math-optimizations -O3 -DNDEBUG -fPIC -fPIC -std=c++11 -o CMakeFiles/qwt_objects.dir/qwt_magnifier.cpp.o -c /home/conan/.conan/data/qwt/6.2.0/_/_/build/4438b4efa0b576ee9da17173dcdabefb23b64944/src/src/qwt_magnifier.cpp
In file included from /home/conan/.conan/data/qwt/6.2.0/_/_/build/4438b4efa0b576ee9da17173dcdabefb23b64944/src/src/qwt_global.h:13,
                 from /home/conan/.conan/data/qwt/6.2.0/_/_/build/4438b4efa0b576ee9da17173dcdabefb23b64944/src/src/qwt_interval_symbol.h:13,
                 from /home/conan/.conan/data/qwt/6.2.0/_/_/build/4438b4efa0b576ee9da17173dcdabefb23b64944/src/src/qwt_interval_symbol.cpp:10:
/home/conan/.conan/data/qt/6.3.0/_/_/package/37b79edf1f9287ae72a0010b85f7826c4d07ac12/include/QtCore/qglobal.h:125:6: error: #error "Qt requires a C++17 compiler"
 #    error "Qt requires a C++17 compiler"

I also try adding compiler.cppstd=17 to my profile, but there was not change

@ashley-b
Copy link
Contributor Author

ashley-b commented Mar 1, 2023

As a follow up I've found if I build qwt recipe locally with the following patch line removed, it builds successfully

@EstebanDugueperoux2
Copy link
Contributor

Hi @ashley-b

I don't use anymore images from https://github.com/conan-io/conan-docker-tools#gcc but as recommended I use modern ones (https://github.com/conan-io/conan-docker-tools/tree/master/modern#gcc).

For information, qwt (https://qwt.sourceforge.io/) use qmake as build system, but to ease conan integration (https://github.com/conan-io/conan-center-index/tree/master/recipes/qwt/all) patches to use cmake has been added to replace qmake but only in conan center ().

Indeed "settings.compiler.cppstd" seems preferable to specify C++ standard instead of having it specified directly in CMAKE_CXX_STANDARD.

I think you can make a simple pull request to remove this CMAKE_CXX_STANDARD line.

Regards.

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