BITCOIN_QT_PATH_PROGS
should conform to it’s documentation for parameter $3
:
dnl Inputs: $3: Look for $2 here before $PATH
Prior to the change, when $3
was specified, the function would not check $PATH
. Fixing this resolves the case where the lrelease
, lupdate
and lconvert
binaries live in a different directory than the other QT Base binaries, hindering ./configure
from detecting them. The issue was observed on Nix(OS) which has different binary folders for nixpkgs.qt5.qtbase
and nixpkgs.qt5.qttools
, causing ./configure
to not allow building bitcoin-qt
.
(This issue is GUI-related but involves the build system).
Testing
- Install NixOS or the
nix
package manager (https://nixos.org/download/). - Clone the Bitcoin Core repo.
- Copy
shell.nix
from https://gist.github.com/cbergqvist/7d9ce7663414214bb991007ab8138725 into the repo directory - Run
nix-shell
from the CLI inside the repo directory. - Run
make clean && ./configure
and observe change in output depending on whether this change is applied to the repo or not.
Expected output from ./configure
without the change
0checking for Qt5Core >= 5.11.3... yes
1checking for Qt5Gui >= 5.11.3... yes
2checking for Qt5Widgets >= 5.11.3... yes
3checking for Qt5Network >= 5.11.3... yes
4checking for Qt5Test >= 5.11.3... yes
5checking for Qt5DBus >= 5.11.3... yes
6checking for static Qt... no
7checking whether -fPIE can be used with this Qt config... no
8checking for moc-qt5... no
9checking for moc5... no
10checking for moc... /nix/store/78yxzzk2fb6am5v4dihalw9hrrj0rg8l-qtbase-5.15.12-dev/bin/moc
11checking for uic-qt5... no
12checking for uic5... no
13checking for uic... /nix/store/78yxzzk2fb6am5v4dihalw9hrrj0rg8l-qtbase-5.15.12-dev/bin/uic
14checking for rcc-qt5... no
15checking for rcc5... no
16checking for rcc... /nix/store/78yxzzk2fb6am5v4dihalw9hrrj0rg8l-qtbase-5.15.12-dev/bin/rcc
17checking for lrelease-qt5... no
18checking for lrelease5... no
19checking for lrelease... no
20configure: WARNING: LRELEASE not found; bitcoin-qt frontend will not be built
21checking whether to build Bitcoin Core GUI... no
Expected output from ./configure
with the change
0checking for Qt5Core >= 5.11.3... yes
1checking for Qt5Gui >= 5.11.3... yes
2checking for Qt5Widgets >= 5.11.3... yes
3checking for Qt5Network >= 5.11.3... yes
4checking for Qt5Test >= 5.11.3... yes
5checking for Qt5DBus >= 5.11.3... yes
6checking for static Qt... no
7checking whether -fPIE can be used with this Qt config... no
8checking for moc-qt5... no
9checking for moc5... no
10checking for moc... /nix/store/78yxzzk2fb6am5v4dihalw9hrrj0rg8l-qtbase-5.15.12-dev/bin/moc
11checking for uic-qt5... no
12checking for uic5... no
13checking for uic... /nix/store/78yxzzk2fb6am5v4dihalw9hrrj0rg8l-qtbase-5.15.12-dev/bin/uic
14checking for rcc-qt5... no
15checking for rcc5... no
16checking for rcc... /nix/store/78yxzzk2fb6am5v4dihalw9hrrj0rg8l-qtbase-5.15.12-dev/bin/rcc
17checking for lrelease-qt5... no
18checking for lrelease5... no
19checking for lrelease... no
20checking for lrelease-qt5... no
21checking for lrelease5... no
22checking for lrelease... /nix/store/4dc19x6k1ma72s13i4gs75amgsxz5jmy-qttools-5.15.12-dev/bin/lrelease
23checking for lupdate-qt5... no
24checking for lupdate5... no
25checking for lupdate... no
26checking for lupdate-qt5... no
27checking for lupdate5... no
28checking for lupdate... /nix/store/4dc19x6k1ma72s13i4gs75amgsxz5jmy-qttools-5.15.12-dev/bin/lupdate
29checking for lconvert-qt5... no
30checking for lconvert5... no
31checking for lconvert... no
32checking for lconvert-qt5... no
33checking for lconvert5... no
34checking for lconvert... /nix/store/4dc19x6k1ma72s13i4gs75amgsxz5jmy-qttools-5.15.12-dev/bin/lconvert
35checking whether to build Bitcoin Core GUI... yes (Qt5)