build: Fail to build Qt in depends on ARM 32bit #18536

issue hebasto opened this issue on April 6, 2020
  1. hebasto commented at 11:21 AM on April 6, 2020: member

    Having the low-end system ODROID-HC1:

    $ uname -srm
    Linux 4.14.173-173 armv7l
    $ lsb_release -ds
    Ubuntu 18.04.4 LTS
    $ /usr/bin/make --version | head -2
    GNU Make 4.1
    Built for arm-unknown-linux-gnueabihf
    

    Trying to build depends:

    $ make -C depends
    ...
    Configure summary:
    
    Build type: linux-g++ (arm, CPU features: <none>)
    Configuration: enable_new_dtags largefile precompile_header silent release c++11 dbus no-qml-debug reduce_exports release_tools static stl
    Build options:
      Mode ................................... release; optimized tools
      Optimize release build for size ........ no
      Building shared libraries .............. no
      Using C++ standard ..................... C++11
      Using ccache ........................... no
      Using gold linker ...................... no
      Using new DTAGS ........................ yes
      Using precompiled headers .............. yes
      Using LTCG ............................. no
      Target compiler supports:
        NEON ................................. no
      Build parts ............................ libs tools
    Qt modules and options:
      Qt Concurrent .......................... no
      Qt D-Bus ............................... yes
      Qt D-Bus directly linked to libdbus .... no
      Qt Gui ................................. yes
      Qt Network ............................. yes
      Qt Sql ................................. no
      Qt Testlib ............................. yes
      Qt Widgets ............................. yes
      Qt Xml ................................. no
    Support enabled for:
      Using pkg-config ....................... yes
      QML debugging .......................... no
      udev ................................... no
      Using system zlib ...................... yes
    Qt Core:
      DoubleConversion ....................... yes
        Using system DoubleConversion ........ no
      GLib ................................... no
      iconv .................................. no
      ICU .................................... no
      Logging backends:
        journald ............................. no
        syslog ............................... no
        slog2 ................................ no
      Using system PCRE2 ..................... no
    Qt Network:
      getaddrinfo() .......................... yes
      getifaddrs() ........................... yes
      IPv6 ifname ............................ yes
      libproxy ............................... no
      OpenSSL ................................ yes
        Qt directly linked to OpenSSL ........ yes
      SCTP ................................... no
      Use system proxies ..................... yes
    Qt Gui:
      Accessibility .......................... yes
      FreeType ............................... yes
        Using system FreeType ................ yes
      HarfBuzz ............................... yes
        Using system HarfBuzz ................ no
      Fontconfig ............................. yes
      Image formats:
        GIF .................................. no
        ICO .................................. no
        JPEG ................................. no
          Using system libjpeg ............... no
        PNG .................................. yes
          Using system libpng ................ no
      EGL .................................... no
      OpenVG ................................. no
      OpenGL:
        Desktop OpenGL ....................... no
        OpenGL ES 2.0 ........................ no
        OpenGL ES 3.0 ........................ no
        OpenGL ES 3.1 ........................ no
      Session Management ..................... no
    Features used by QPA backends:
      evdev .................................. yes
      libinput ............................... no
      INTEGRITY HID .......................... no
      mtdev .................................. no
      tslib .................................. no
      xkbcommon-evdev ........................ no
    QPA backends:
      DirectFB ............................... no
      EGLFS .................................. no
      LinuxFB ................................ no
      VNC .................................... no
      Mir client ............................. no
      X11:
        Using system-provided XCB libraries .. no
        EGL on X11 ........................... no
        Xinput2 .............................. no
        XCB XKB .............................. yes
        XLib ................................. no
        XCB render ........................... yes
        XCB GLX .............................. no
        XCB Xlib ............................. no
        Using system-provided xkbcommon ...... no
    Qt Widgets:
      GTK+ ................................... no
      Styles ................................. Fusion Windows
    Qt PrintSupport:
      CUPS ................................... no
    Qt Sql:
      DB2 (IBM) .............................. no
      InterBase .............................. no
      MySql .................................. no
      OCI (Oracle) ........................... no
      ODBC ................................... no
      PostgreSQL ............................. no
      SQLite2 ................................ no
      SQLite ................................. no
        Using system provided SQLite ......... no
      TDS (Sybase) ........................... no
    ...
    Project ERROR: Unknown module(s) in QT: xml
    funcs.mk:251: recipe for target '/home/hebasto/bitcoin/depends/work/build/armv7l-unknown-linux-gnueabihf/qt/5.9.8-32c67940323/qtbase/.stamp_configured' failed
    

    With NO_QT=1 depends are built successfully.

  2. hebasto added the label Bug on Apr 6, 2020
  3. fanquake added the label Build system on Apr 6, 2020
  4. fanquake commented at 1:58 AM on April 7, 2020: member

    I'm pretty sure this is an issue with Qt and newer versions of make. What version are you using here?

  5. fanquake added the label Upstream on Apr 7, 2020
  6. hebasto commented at 9:44 AM on April 7, 2020: member

    I'm pretty sure this is an issue with Qt and newer versions of make. What version are you using here?

    Qt is 5.9.8 as it is built in depends.

    $ dpkg --status make | grep Version
    Version: 4.1-9.1ubuntu1
    

    It seems nothing unusual...

  7. fanquake commented at 12:02 PM on April 7, 2020: member

    If you try and build with an older version of make, like 3.8x, I'm pretty certain it will work. I have seen this same failure before.

  8. fanquake removed the label Bug on Apr 7, 2020
  9. hebasto commented at 5:53 PM on April 8, 2020: member

    If you try and build with an older version of make, like 3.8x, I'm pretty certain it will work. I have seen this same failure before.

    Built and installed the old make:

    $ make --version
    GNU Make 3.81
    Copyright (C) 2006  Free Software Foundation, Inc.
    This is free software; see the source for copying conditions.
    There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
    PARTICULAR PURPOSE.
    
    This program built for armv7l-unknown-linux-gnu
    

    but it didn't help:

    $ make qt -C depends
    ...
    Project ERROR: Unknown module(s) in QT: xml
    make: *** [/home/hebasto/bitcoin/depends/work/build/armv7l-unknown-linux-gnueabihf/qt/5.9.8-52a02fcd47f/qtbase/.stamp_configured] Error 3
    make: Leaving directory `/home/hebasto/bitcoin/depends'
    

    And the log does not mention funcs.mk:251: ... now.

  10. fanquake commented at 11:36 PM on April 8, 2020: member

    Right, so I guess it's only on macOS where using an older make fixes the issue. In any case, this seems like something that should be taken upstream to Qts bug tracker. I don't think we need an issue open for it here.

  11. hebasto closed this on Apr 9, 2020

  12. hebasto commented at 2:08 PM on July 6, 2020: member

    I've managed to build Qt in depends on Armbian Focal (on the same ODROID-HC1) with the following diff:

    diff --git a/depends/packages/qt.mk b/depends/packages/qt.mk
    index 631851855..545f4068e 100644
    --- a/depends/packages/qt.mk
    +++ b/depends/packages/qt.mk
    @@ -110,7 +110,6 @@ $(package)_config_opts += -no-feature-undostack
     $(package)_config_opts += -no-feature-undoview
     $(package)_config_opts += -no-feature-vnc
     $(package)_config_opts += -no-feature-wizard
    -$(package)_config_opts += -no-feature-xml
     
     $(package)_config_opts_darwin = -no-dbus
     $(package)_config_opts_darwin += -no-opengl
    

    Also the build system didn't find zconf.h header in the depends/armv7l-unknown-linux-gnueabihf/include directory. So the following was required:

    $ sudo apt install zlib1g-dev
    

    Eventually,

    $ make qt -C depends
    
  13. hebasto reopened this on Jul 6, 2020

  14. fanquake commented at 12:45 PM on March 16, 2021: member

    Is this fixed after #21376 ?

  15. hebasto commented at 7:43 PM on March 16, 2021: member

    @fanquake

    Is this fixed after #21376 ?

    No.

    $ head -n 4 /etc/armbian.txt
    --------------------------------------------------------------------------------
    Title:			Armbian 21.02.2 Odroidxu4 Ubuntu focal legacy
    Kernel:			Linux 
    Build date:		14.02.2021
    $
    $ git clean -xdff
    $ git rev-parse HEAD
    5ef16038a1a8adc25438d77f60d83b2c01738fcf
    $
    $ make -C depends qt_configured
    ...
    Project ERROR: Unknown module(s) in QT: xml
    make: *** [funcs.mk:276: /home/hebasto/bitcoin/depends/work/build/armv7l-unknown-linux-gnueabihf/qt/5.12.10-6a06b2c1f18/./.stamp_configured] Error 3
    make: Leaving directory '/home/hebasto/bitcoin/depends'
    
  16. hebasto commented at 8:48 PM on March 16, 2021: member

    FWIW, the following patch did not help:

    --- a/depends/packages/qt.mk
    +++ b/depends/packages/qt.mk
    @@ -135,6 +135,7 @@ $(package)_config_opts_linux += -no-opengl
     $(package)_config_opts_linux += -no-feature-vulkan
     $(package)_config_opts_linux += -dbus-runtime
     $(package)_config_opts_arm_linux += -platform linux-g++ -xplatform bitcoin-linux-g++
    +$(package)_config_opts_armv7l_linux += -platform linux-arm-gnueabihf-g++
     $(package)_config_opts_i686_linux  = -xplatform linux-g++-32
     $(package)_config_opts_x86_64_linux = -xplatform linux-g++-64
     $(package)_config_opts_aarch64_linux = -xplatform linux-aarch64-gnu-g++
    @@ -233,6 +234,8 @@ define $(package)_preprocess_cmds
       cp -f $($(package)_patch_dir)/mac-qmake.conf qtbase/mkspecs/macx-clang-linux/qmake.conf && \
       cp -r qtbase/mkspecs/linux-arm-gnueabi-g++ qtbase/mkspecs/bitcoin-linux-g++ && \
       sed -i.old "s/arm-linux-gnueabi-/$(host)-/g" qtbase/mkspecs/bitcoin-linux-g++/qmake.conf && \
    +  cp -r qtbase/mkspecs/linux-arm-gnueabi-g++ qtbase/mkspecs/linux-arm-gnueabihf-g++ && \
    +  sed -i.old "s/arm-linux-gnueabi-/arm-linux-gnueabihf-/g" qtbase/mkspecs/linux-arm-gnueabihf-g++/qmake.conf && \
       echo "!host_build: QMAKE_CFLAGS     += $($(package)_cflags) $($(package)_cppflags)" >> qtbase/mkspecs/common/gcc-base.conf && \
       echo "!host_build: QMAKE_CXXFLAGS   += $($(package)_cxxflags) $($(package)_cppflags)" >> qtbase/mkspecs/common/gcc-base.conf && \
       echo "!host_build: QMAKE_LFLAGS     += $($(package)_ldflags)" >> qtbase/mkspecs/common/gcc-base.conf && \
    
  17. hebasto commented at 9:35 AM on May 6, 2021: member
  18. fanquake closed this on Jul 18, 2021

  19. sidhujag referenced this in commit 4a59fda74b on Jul 23, 2021
  20. DrahtBot locked this on Aug 18, 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-04-17 00:14 UTC

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