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

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

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

    Trying to build depends:

      0$ make -C depends
      1...
      2Configure summary:
      3
      4Build type: linux-g++ (arm, CPU features: <none>)
      5Configuration: enable_new_dtags largefile precompile_header silent release c++11 dbus no-qml-debug reduce_exports release_tools static stl
      6Build options:
      7  Mode ................................... release; optimized tools
      8  Optimize release build for size ........ no
      9  Building shared libraries .............. no
     10  Using C++ standard ..................... C++11
     11  Using ccache ........................... no
     12  Using gold linker ...................... no
     13  Using new DTAGS ........................ yes
     14  Using precompiled headers .............. yes
     15  Using LTCG ............................. no
     16  Target compiler supports:
     17    NEON ................................. no
     18  Build parts ............................ libs tools
     19Qt modules and options:
     20  Qt Concurrent .......................... no
     21  Qt D-Bus ............................... yes
     22  Qt D-Bus directly linked to libdbus .... no
     23  Qt Gui ................................. yes
     24  Qt Network ............................. yes
     25  Qt Sql ................................. no
     26  Qt Testlib ............................. yes
     27  Qt Widgets ............................. yes
     28  Qt Xml ................................. no
     29Support enabled for:
     30  Using pkg-config ....................... yes
     31  QML debugging .......................... no
     32  udev ................................... no
     33  Using system zlib ...................... yes
     34Qt Core:
     35  DoubleConversion ....................... yes
     36    Using system DoubleConversion ........ no
     37  GLib ................................... no
     38  iconv .................................. no
     39  ICU .................................... no
     40  Logging backends:
     41    journald ............................. no
     42    syslog ............................... no
     43    slog2 ................................ no
     44  Using system PCRE2 ..................... no
     45Qt Network:
     46  getaddrinfo() .......................... yes
     47  getifaddrs() ........................... yes
     48  IPv6 ifname ............................ yes
     49  libproxy ............................... no
     50  OpenSSL ................................ yes
     51    Qt directly linked to OpenSSL ........ yes
     52  SCTP ................................... no
     53  Use system proxies ..................... yes
     54Qt Gui:
     55  Accessibility .......................... yes
     56  FreeType ............................... yes
     57    Using system FreeType ................ yes
     58  HarfBuzz ............................... yes
     59    Using system HarfBuzz ................ no
     60  Fontconfig ............................. yes
     61  Image formats:
     62    GIF .................................. no
     63    ICO .................................. no
     64    JPEG ................................. no
     65      Using system libjpeg ............... no
     66    PNG .................................. yes
     67      Using system libpng ................ no
     68  EGL .................................... no
     69  OpenVG ................................. no
     70  OpenGL:
     71    Desktop OpenGL ....................... no
     72    OpenGL ES 2.0 ........................ no
     73    OpenGL ES 3.0 ........................ no
     74    OpenGL ES 3.1 ........................ no
     75  Session Management ..................... no
     76Features used by QPA backends:
     77  evdev .................................. yes
     78  libinput ............................... no
     79  INTEGRITY HID .......................... no
     80  mtdev .................................. no
     81  tslib .................................. no
     82  xkbcommon-evdev ........................ no
     83QPA backends:
     84  DirectFB ............................... no
     85  EGLFS .................................. no
     86  LinuxFB ................................ no
     87  VNC .................................... no
     88  Mir client ............................. no
     89  X11:
     90    Using system-provided XCB libraries .. no
     91    EGL on X11 ........................... no
     92    Xinput2 .............................. no
     93    XCB XKB .............................. yes
     94    XLib ................................. no
     95    XCB render ........................... yes
     96    XCB GLX .............................. no
     97    XCB Xlib ............................. no
     98    Using system-provided xkbcommon ...... no
     99Qt Widgets:
    100  GTK+ ................................... no
    101  Styles ................................. Fusion Windows
    102Qt PrintSupport:
    103  CUPS ................................... no
    104Qt Sql:
    105  DB2 (IBM) .............................. no
    106  InterBase .............................. no
    107  MySql .................................. no
    108  OCI (Oracle) ........................... no
    109  ODBC ................................... no
    110  PostgreSQL ............................. no
    111  SQLite2 ................................ no
    112  SQLite ................................. no
    113    Using system provided SQLite ......... no
    114  TDS (Sybase) ........................... no
    115...
    116Project ERROR: Unknown module(s) in QT: xml
    117funcs.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.

    0$ dpkg --status make | grep Version
    1Version: 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:

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

    but it didn’t help:

    0$ make qt -C depends
    1...
    2Project ERROR: Unknown module(s) in QT: xml
    3make: *** [/home/hebasto/bitcoin/depends/work/build/armv7l-unknown-linux-gnueabihf/qt/5.9.8-52a02fcd47f/qtbase/.stamp_configured] Error 3
    4make: 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:

     0diff --git a/depends/packages/qt.mk b/depends/packages/qt.mk
     1index 631851855..545f4068e 100644
     2--- a/depends/packages/qt.mk
     3+++ b/depends/packages/qt.mk
     4@@ -110,7 +110,6 @@ $(package)_config_opts += -no-feature-undostack
     5 $(package)_config_opts += -no-feature-undoview
     6 $(package)_config_opts += -no-feature-vnc
     7 $(package)_config_opts += -no-feature-wizard
     8-$(package)_config_opts += -no-feature-xml
     9 
    10 $(package)_config_opts_darwin = -no-dbus
    11 $(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:

    0$ sudo apt install zlib1g-dev
    

    Eventually,

    0$ 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.

     0$ head -n 4 /etc/armbian.txt
     1--------------------------------------------------------------------------------
     2Title:			Armbian 21.02.2 Odroidxu4 Ubuntu focal legacy
     3Kernel:			Linux 
     4Build date:		14.02.2021
     5$
     6$ git clean -xdff
     7$ git rev-parse HEAD
     85ef16038a1a8adc25438d77f60d83b2c01738fcf
     9$
    10$ make -C depends qt_configured
    11...
    12Project ERROR: Unknown module(s) in QT: xml
    13make: *** [funcs.mk:276: /home/hebasto/bitcoin/depends/work/build/armv7l-unknown-linux-gnueabihf/qt/5.12.10-6a06b2c1f18/./.stamp_configured] Error 3
    14make: 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:

     0--- a/depends/packages/qt.mk
     1+++ b/depends/packages/qt.mk
     2@@ -135,6 +135,7 @@ $(package)_config_opts_linux += -no-opengl
     3 $(package)_config_opts_linux += -no-feature-vulkan
     4 $(package)_config_opts_linux += -dbus-runtime
     5 $(package)_config_opts_arm_linux += -platform linux-g++ -xplatform bitcoin-linux-g++
     6+$(package)_config_opts_armv7l_linux += -platform linux-arm-gnueabihf-g++
     7 $(package)_config_opts_i686_linux  = -xplatform linux-g++-32
     8 $(package)_config_opts_x86_64_linux = -xplatform linux-g++-64
     9 $(package)_config_opts_aarch64_linux = -xplatform linux-aarch64-gnu-g++
    10@@ -233,6 +234,8 @@ define $(package)_preprocess_cmds
    11   cp -f $($(package)_patch_dir)/mac-qmake.conf qtbase/mkspecs/macx-clang-linux/qmake.conf && \
    12   cp -r qtbase/mkspecs/linux-arm-gnueabi-g++ qtbase/mkspecs/bitcoin-linux-g++ && \
    13   sed -i.old "s/arm-linux-gnueabi-/$(host)-/g" qtbase/mkspecs/bitcoin-linux-g++/qmake.conf && \
    14+  cp -r qtbase/mkspecs/linux-arm-gnueabi-g++ qtbase/mkspecs/linux-arm-gnueabihf-g++ && \
    15+  sed -i.old "s/arm-linux-gnueabi-/arm-linux-gnueabihf-/g" qtbase/mkspecs/linux-arm-gnueabihf-g++/qmake.conf && \
    16   echo "!host_build: QMAKE_CFLAGS     += $($(package)_cflags) $($(package)_cppflags)" >> qtbase/mkspecs/common/gcc-base.conf && \
    17   echo "!host_build: QMAKE_CXXFLAGS   += $($(package)_cxxflags) $($(package)_cppflags)" >> qtbase/mkspecs/common/gcc-base.conf && \
    18   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: 2024-07-05 19:13 UTC

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