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

issue lucayepa openend 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:

    0$ git log --oneline -1
    19e7dc68 Merge [#15616](/bitcoin-bitcoin/15616/): rpc: Clarify decodescript RPCResult doc
    2$ ls /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5.3.2
    3/usr/lib/x86_64-linux-gnu/libQt5Gui.so.5.3.2
    4$ /usr/lib/x86_64-linux-gnu/qt5/bin/moc --version
    5moc 5.3.2
    6$ uname -srv
    7Linux 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:

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

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

    Details:

     0$ ./configure --with-incompatible-bdb | grep -i qt
     1configure: WARNING: Found Berkeley DB other than 4.8; wallets opened by this build will not be portable!
     2checking for QT5... yes
     3checking for QT_TEST... yes
     4checking for QT_DBUS... yes
     5checking for static Qt... no
     6checking whether -fPIE can be used with this Qt config... no
     7checking for moc-qt5... no
     8checking for moc... /usr/lib/x86_64-linux-gnu/qt5/bin/moc
     9checking for uic-qt5... no
    10checking for uic... /usr/lib/x86_64-linux-gnu/qt5/bin/uic
    11checking for rcc-qt5... no
    12checking for rcc... /usr/lib/x86_64-linux-gnu/qt5/bin/rcc
    13checking for lrelease-qt5... no
    14checking for lrelease... /usr/lib/x86_64-linux-gnu/qt5/bin/lrelease
    15checking for lupdate-qt5... no
    16checking for lupdate... /usr/lib/x86_64-linux-gnu/qt5/bin/lupdate
    17checking whether to build Bitcoin Core GUI... yes (Qt5)
    18configure: WARNING: libzmq version 4.x or greater not found, disabling
    19checking whether to build test_bitcoin-qt... yes
    20config.status: creating share/qt/Info.plist
    21  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):
     0checking for QT5... yes
     1checking for QT_TEST... yes
     2checking for QT_DBUS... yes
     3checking for static Qt... no
     4checking whether -fPIE can be used with this Qt config... no
     5checking for moc-qt5... no
     6checking for moc... /usr/lib/x86_64-linux-gnu/qt5/bin/moc
     7checking for uic-qt5... no
     8checking for uic... /usr/lib/x86_64-linux-gnu/qt5/bin/uic
     9checking for rcc-qt5... no
    10checking for rcc... /usr/lib/x86_64-linux-gnu/qt5/bin/rcc
    11checking for lrelease-qt5... no
    12checking for lrelease... /usr/lib/x86_64-linux-gnu/qt5/bin/lrelease
    13checking for lupdate-qt5... no
    14checking for lupdate... /usr/lib/x86_64-linux-gnu/qt5/bin/lupdate
    15checking whether to build Bitcoin Core GUI... yes (Qt5)
    16checking whether to build test_bitcoin-qt... yes
    17config.status: creating share/qt/Info.plist
    18with 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.
    0checking QtPlugin usability... no
    1configure: WARNING: QtCore headers missing; bitcoin-qt frontend will not be built
    2checking QtPlugin presence... no
    3checking for QtPlugin... no
    4checking whether to build Bitcoin Core GUI... no (Qt5)
    5with 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.
     0checking for QT5... yes
     1checking for QT_TEST... yes
     2checking for QT_DBUS... yes
     3checking for static Qt... yes
     4checking for QTFONTDATABASE... yes
     5checking for QTEVENTDISPATCHER... yes
     6checking for QTTHEME... yes
     7checking for QTDEVICEDISCOVERY... yes
     8checking for QTACCESSIBILITY... yes
     9checking for QTFB... yes
    10checking for QTXCBQPA... yes
    11checking for static Qt plugins: -lqminimal... yes
    12checking for static Qt plugins: -lqxcb -lxcb-static... yes
    13checking whether -fPIE can be used with this Qt config... yes
    14checking for moc-qt5... no
    15checking for uic-qt5... no
    16checking for rcc-qt5... no
    17checking for lrelease-qt5... no
    18checking for lupdate-qt5... no
    19checking whether to build Bitcoin Core GUI... yes (Qt5)
    20checking whether to build test_bitcoin-qt... yes
    21with 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):
    0checking QtPlugin usability... no
    1checking QtPlugin presence... no
    2checking for QtPlugin... no
    3configure: 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 0: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: 2024-12-18 15:12 UTC

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