Configure should return an error with not supported versions of QT libraries #15688

issue lucayepa opened this issue on March 28, 2019
  1. lucayepa commented at 6:02 PM on March 28, 2019: contributor

    While configuring with a non-supported version of QT libraries, configure should exit with an error.

    Environment:

    $ git log --oneline -1
    9e7dc68 Merge [#15616](/bitcoin-bitcoin/15616/): rpc: Clarify decodescript RPCResult doc
    $ ls /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5.3.2
    /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5.3.2
    $ /usr/lib/x86_64-linux-gnu/qt5/bin/moc --version
    moc 5.3.2
    $ uname -srv
    Linux 4.9.0-0.bpo.7-amd64 [#1](/bitcoin-bitcoin/1/) SMP Debian 4.9.110-3+deb9u2~deb8u1 (2018-08-14)
    

    Steps to replicate:

    $ ./autogen.sh
    $ ./configure --with-incompatible-bdb >/dev/null 2>/dev/null && echo OK
    OK
    

    Expected behavior: configure should exit with an error due to version of QT libraries not supported.

    Details:

    $ ./configure --with-incompatible-bdb | grep -i qt
    configure: WARNING: Found Berkeley DB other than 4.8; wallets opened by this build will not be portable!
    checking for QT5... yes
    checking for QT_TEST... yes
    checking for QT_DBUS... yes
    checking for static Qt... no
    checking whether -fPIE can be used with this Qt config... no
    checking for moc-qt5... no
    checking for moc... /usr/lib/x86_64-linux-gnu/qt5/bin/moc
    checking for uic-qt5... no
    checking for uic... /usr/lib/x86_64-linux-gnu/qt5/bin/uic
    checking for rcc-qt5... no
    checking for rcc... /usr/lib/x86_64-linux-gnu/qt5/bin/rcc
    checking for lrelease-qt5... no
    checking for lrelease... /usr/lib/x86_64-linux-gnu/qt5/bin/lrelease
    checking for lupdate-qt5... no
    checking for lupdate... /usr/lib/x86_64-linux-gnu/qt5/bin/lupdate
    checking whether to build Bitcoin Core GUI... yes (Qt5)
    configure: WARNING: libzmq version 4.x or greater not found, disabling
    checking whether to build test_bitcoin-qt... yes
    config.status: creating share/qt/Info.plist
      with gui / qt = yes
    
  2. laanwj added the label Build system on Mar 28, 2019
  3. laanwj added the label GUI on Mar 28, 2019
  4. MarcoFalke commented at 8:43 PM on March 28, 2019: member
  5. MarcoFalke added the label good first issue on Mar 28, 2019
  6. Sjors commented at 7:45 AM on March 29, 2019: member

    Note to self: check checks before making a PR...

  7. lucayepa commented at 9:12 PM on March 29, 2019: contributor

    Yes @MarcoFalke , I've seen the check, but somehow that part of the code is never used (it is used only when there is no pkg-config, and this is forbidden on linux systems). On top of that, in the code there is no evaluation of the QT libraries version when pkg-config is active (again, pkg-config is always active on linux).

    I tested it with two systems (Debian Jessie and Debian Stretch), with depends and without, with pkgconfig and without (by embedding in the code not to use pkgconfig, like we do with $host==*mingw*) and adding --with-gui=qt5 or not. Here are the results:

    Environment Pkgconfig Depends (5.9.7) --with-gui= Result
    Jessie (5.3.2) Yes Yes Yes (1 3)
    Jessie (5.3.2) Yes Yes qt5 Yes (3)
    Jessie (5.3.2) Yes No Yes (1)
    Jessie (5.3.2) Yes No qt5 Yes (1)
    Jessie (5.3.2) No Yes No (2)
    Jessie (5.3.2) No Yes qt5 Error (4)
    Jessie (5.3.2) No No No (2)
    Jessie (5.3.2) No No qt5 Error (4)
    Stretch (5.7.1) Yes Yes Yes (1 3)
    Stretch (5.7.1) Yes Yes qt5 Yes (3)
    Stretch (5.7.1) Yes No Yes (1)
    Stretch (5.7.1) Yes No qt5 Yes (1)
    Stretch (5.7.1) No Yes No (2)
    Stretch (5.7.1) No Yes qt5 Error (4)
    Stretch (5.7.1) No No No (2)
    Stretch (5.7.1) No No qt5 Error (4)

    Results:

    • Yes (1):
    checking for QT5... yes
    checking for QT_TEST... yes
    checking for QT_DBUS... yes
    checking for static Qt... no
    checking whether -fPIE can be used with this Qt config... no
    checking for moc-qt5... no
    checking for moc... /usr/lib/x86_64-linux-gnu/qt5/bin/moc
    checking for uic-qt5... no
    checking for uic... /usr/lib/x86_64-linux-gnu/qt5/bin/uic
    checking for rcc-qt5... no
    checking for rcc... /usr/lib/x86_64-linux-gnu/qt5/bin/rcc
    checking for lrelease-qt5... no
    checking for lrelease... /usr/lib/x86_64-linux-gnu/qt5/bin/lrelease
    checking for lupdate-qt5... no
    checking for lupdate... /usr/lib/x86_64-linux-gnu/qt5/bin/lupdate
    checking whether to build Bitcoin Core GUI... yes (Qt5)
    checking whether to build test_bitcoin-qt... yes
    config.status: creating share/qt/Info.plist
    with gui / qt = yes
    
    • No (2): This happens every time there is pkg-config=no (hardcoded by me) and there is no option --with-gui=qt5.
    checking QtPlugin usability... no
    configure: WARNING: QtCore headers missing; bitcoin-qt frontend will not be built
    checking QtPlugin presence... no
    checking for QtPlugin... no
    checking whether to build Bitcoin Core GUI... no (Qt5)
    with gui / qt = no
    
    • Yes (3): This happens every time pkg-config is activated (it's always pre-activated on linux), and depends is on and there is the option --with-gui=qt5.
    checking for QT5... yes
    checking for QT_TEST... yes
    checking for QT_DBUS... yes
    checking for static Qt... yes
    checking for QTFONTDATABASE... yes
    checking for QTEVENTDISPATCHER... yes
    checking for QTTHEME... yes
    checking for QTDEVICEDISCOVERY... yes
    checking for QTACCESSIBILITY... yes
    checking for QTFB... yes
    checking for QTXCBQPA... yes
    checking for static Qt plugins: -lqminimal... yes
    checking for static Qt plugins: -lqxcb -lxcb-static... yes
    checking whether -fPIE can be used with this Qt config... yes
    checking for moc-qt5... no
    checking for uic-qt5... no
    checking for rcc-qt5... no
    checking for lrelease-qt5... no
    checking for lupdate-qt5... no
    checking whether to build Bitcoin Core GUI... yes (Qt5)
    checking whether to build test_bitcoin-qt... yes
    with gui / qt = yes
    
    • Error (4): This happens every time I use the option --with-gui=qt5 with pkg-config not active (it is always active for linux systems):
    checking QtPlugin usability... no
    checking QtPlugin presence... no
    checking for QtPlugin... no
    configure: error: QtCore headers missing
    
  8. lucayepa commented at 5:25 AM on March 30, 2019: contributor

    I will add a PR, that fixes the issue, in a few hours. I'm testing it with different configurations.

  9. lucayepa referenced this in commit 9d74d35dfc on Mar 30, 2019
  10. lucayepa referenced this in commit 25e43fcd48 on Oct 3, 2019
  11. lucayepa referenced this in commit 050b3e6152 on Oct 4, 2019
  12. lucayepa referenced this in commit f1b6f527bf on Oct 4, 2019
  13. lucayepa referenced this in commit 35c46bcb68 on Jan 24, 2020
  14. fanquake removed the label GUI on Aug 15, 2020
  15. fanquake removed the label good first issue on Aug 15, 2020
  16. fanquake commented at 12:33 AM on August 15, 2020: member

    Removing "GUI" and "good first issue" here, as this is a build system issue, and there's a PR open that will likely take care of this.

  17. fanquake closed this on Aug 24, 2020

  18. sidhujag referenced this in commit dafb919f5c on Aug 24, 2020
  19. xdustinface referenced this in commit 3e8687603d on Feb 17, 2021
  20. gades referenced this in commit 0e12d032a0 on Jun 27, 2021
  21. MarcoFalke locked this on Feb 15, 2022
  22. gades referenced this in commit 7516624810 on Mar 16, 2022

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-05-01 15:14 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me