Skip to content

Conversation

dongcarl
Copy link
Contributor

QT LOVES to do things its own way and simply ignore all environment variables. Even listing QMAKE_CC=... in ./configure flags does't work reliably. This is why we gotta literally edit their config files for them. Thanks QT.

@maflcko
Copy link
Member

maflcko commented Nov 13, 2019

I guess we can't test this as standalone? Just see if the gitian build still passes?

@dongcarl
Copy link
Contributor Author

I guess we can't test this as standalone? Just see if the gitian build still passes?

This should only affect the OSX Gitian build, so if that passes then we should be good... Or maybe I'm misunderstanding you?

@fanquake fanquake removed the GUI label Nov 13, 2019
@maflcko
Copy link
Member

maflcko commented Nov 13, 2019

Is this a bugfix? We use a hardcoded clang-x86_64 to build for macos, so I hope this works before and after this pull request?

@maflcko maflcko closed this Nov 13, 2019
@maflcko maflcko reopened this Nov 13, 2019
@dongcarl
Copy link
Contributor Author

Is this a bugfix? We use a hardcoded clang-x86_64 to build for macos, so I hope this works before and after this pull request?

Not a bugfix but just making depends work properly: settings should propagate to all packages wherever possible. I've tested this for crossing from Linux to OSX. Can test OSX native build too.

@laanwj
Copy link
Member

laanwj commented Nov 14, 2019

Ah yes I've often noticed as well. It's quite annoying that qt and boost have to have their own build system that of course has to do everything different for no good reason.
Concept ACK

@practicalswift
Copy link
Contributor

Concept ACK

Thanks for all your great work on the build system @dongcarl

@DrahtBot
Copy link
Contributor

Gitian builds

File commit cd6cb97
(master)
commit 41fc70b
(master and this pull)
bitcoin-0.19.99-aarch64-linux-gnu-debug.tar.gz b25191cf773b0bf8... 1c84cf1696fef9b2...
bitcoin-0.19.99-aarch64-linux-gnu.tar.gz 66cddf99c1e08dde... 802de7ba02b84034...
bitcoin-0.19.99-arm-linux-gnueabihf-debug.tar.gz 301fa28e49a64bbb... e0717f8451fe9911...
bitcoin-0.19.99-arm-linux-gnueabihf.tar.gz b52d82ea2fed7f13... 517b275f4201482f...
bitcoin-0.19.99-i686-pc-linux-gnu-debug.tar.gz bd623b4dc3cf5a9a... a3743f45582449b0...
bitcoin-0.19.99-i686-pc-linux-gnu.tar.gz 5de2375b033565f1... aa098c99aa114907...
bitcoin-0.19.99-osx-unsigned.dmg 694ef5744d2f6904... c6a637e42ee7ec36...
bitcoin-0.19.99-osx64.tar.gz 0114ae780385b137... f47cf40f1ead6fb9...
bitcoin-0.19.99-riscv64-linux-gnu-debug.tar.gz 294011ae38c5d280... 9e3db256b062551f...
bitcoin-0.19.99-riscv64-linux-gnu.tar.gz dbe88f197d552d41... 4d78ed041f10e00b...
bitcoin-0.19.99-win64-debug.zip 936007bb2ebddd0d... 94050955d320f8f8...
bitcoin-0.19.99-win64-setup-unsigned.exe b3c867b01b2d44ec... 1b0057d90bb10364...
bitcoin-0.19.99-win64.zip 1b2d78df9702a910... 1d0f84cf1ff060ad...
bitcoin-0.19.99-x86_64-linux-gnu-debug.tar.gz bfb1d4efbb97a704... 767675c63e76925e...
bitcoin-0.19.99-x86_64-linux-gnu.tar.gz 3511c219e80118c4... fa19912da2d3bfda...
bitcoin-0.19.99.tar.gz 65d3c95876c7164a... 0f894460983b2657...
bitcoin-core-linux-0.20-res.yml 643bafb017a19819... 9049354734cc1862...
bitcoin-core-osx-0.20-res.yml 3b0156f8bb686f5c... 35b75c1c988d0440...
bitcoin-core-win-0.20-res.yml 0a1e31be7a54ff9b... c4c84e26ab66bf99...
linux-build.log 8e7bb3e54025c401... e2beec7bf41bbb74...
osx-build.log 5b343fc43338d92c... 8f940f59be2b0c2d...
win-build.log 24b7cda24344151a... eac9dc3bc5922331...
bitcoin-core-linux-0.20-res.yml.diff 619329a6764a467e...
bitcoin-core-osx-0.20-res.yml.diff 735c4ada4d2ad648...
bitcoin-core-win-0.20-res.yml.diff a9844ce5401c17b5...
linux-build.log.diff c5987fb3392d93ee...
osx-build.log.diff 0f1bc2c84c871b6f...
win-build.log.diff c294ee3bcea65dc0...

@@ -202,6 +202,8 @@ define $(package)_preprocess_cmds
sed -i.old "s|QMAKE_CFLAGS += |!host_build: QMAKE_CFLAGS = $($(package)_cflags) $($(package)_cppflags) |" qtbase/mkspecs/win32-g++/qmake.conf && \
sed -i.old "s|QMAKE_CXXFLAGS += |!host_build: QMAKE_CXXFLAGS = $($(package)_cxxflags) $($(package)_cppflags) |" qtbase/mkspecs/win32-g++/qmake.conf && \
sed -i.old "0,/^QMAKE_LFLAGS_/s|^QMAKE_LFLAGS_|!host_build: QMAKE_LFLAGS = $($(package)_ldflags)\n&|" qtbase/mkspecs/win32-g++/qmake.conf && \
sed -i.old "s|QMAKE_CC = clang|QMAKE_CC = $($(package)_cc)|" qtbase/mkspecs/common/clang.conf && \
sed -i.old "s|QMAKE_CXX = clang++|QMAKE_CXX = $($(package)_cxx)|" qtbase/mkspecs/common/clang.conf && \
Copy link
Member

@laanwj laanwj Nov 15, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BTW, not in this PR, but we really need something that detects when these sed's fail to replace anything. This is very prone to breaking with very subtle effects when Qt is updated.
(imagine they changed the number of spaces, for ex.)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, tracked in: #16838

@laanwj
Copy link
Member

laanwj commented Nov 18, 2019

ACK bc728d1

laanwj added a commit that referenced this pull request Nov 18, 2019
bc728d1 depends: qt: Fix C{,XX} pickup (Carl Dong)

Pull request description:

  QT LOVES to do things its own way and simply ignore all environment variables. Even listing `QMAKE_CC=...` in `./configure` flags does't work reliably. This is why we gotta literally edit their config files for them. Thanks QT.

ACKs for top commit:
  laanwj:
    ACK bc728d1

Tree-SHA512: 3d6a0535174d70937d11b8f44ac2ab720870345a2d5a541c3e0181163ffa1988ab4f934788e9c841b646d6f53c6dc51a4fe39b294dd042c38976091c0fb96c96
@laanwj laanwj merged commit bc728d1 into bitcoin:master Nov 18, 2019
sidhujag pushed a commit to syscoin/syscoin that referenced this pull request Nov 18, 2019
bc728d1 depends: qt: Fix C{,XX} pickup (Carl Dong)

Pull request description:

  QT LOVES to do things its own way and simply ignore all environment variables. Even listing `QMAKE_CC=...` in `./configure` flags does't work reliably. This is why we gotta literally edit their config files for them. Thanks QT.

ACKs for top commit:
  laanwj:
    ACK bc728d1

Tree-SHA512: 3d6a0535174d70937d11b8f44ac2ab720870345a2d5a541c3e0181163ffa1988ab4f934788e9c841b646d6f53c6dc51a4fe39b294dd042c38976091c0fb96c96
MarkLTZ added a commit to litecoinz-core/litecoinz that referenced this pull request Nov 29, 2019
deadalnix pushed a commit to Bitcoin-ABC/bitcoin-abc that referenced this pull request Apr 3, 2020
Summary:
```
QT LOVES to do things its own way and simply ignore all environment
variables. Even listing QMAKE_CC=... in ./configure flags does't work
reliably. This is why we gotta literally edit their config files for
them. Thanks QT.
```

Backport of core [[bitcoin/bitcoin#17466 | PR17466]].

Depends on D5656.

Test Plan: Run the OSX Gitian build.

Reviewers: #bitcoin_abc, deadalnix

Reviewed By: #bitcoin_abc, deadalnix

Subscribers: deadalnix

Differential Revision: https://reviews.bitcoinabc.org/D5657
sidhujag pushed a commit to syscoin-core/syscoin that referenced this pull request Nov 10, 2020
bc728d1 depends: qt: Fix C{,XX} pickup (Carl Dong)

Pull request description:

  QT LOVES to do things its own way and simply ignore all environment variables. Even listing `QMAKE_CC=...` in `./configure` flags does't work reliably. This is why we gotta literally edit their config files for them. Thanks QT.

ACKs for top commit:
  laanwj:
    ACK bc728d1

Tree-SHA512: 3d6a0535174d70937d11b8f44ac2ab720870345a2d5a541c3e0181163ffa1988ab4f934788e9c841b646d6f53c6dc51a4fe39b294dd042c38976091c0fb96c96
kwvg added a commit to kwvg/dash that referenced this pull request Nov 24, 2021
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Dec 16, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants