Skip to content

Conversation

hebasto
Copy link
Member

@hebasto hebasto commented Mar 22, 2020

This PR gets rid of the all patches for ZeroMQ:

@hebasto hebasto changed the title build: Drop ZeroMQ patch for Mingw-w64 < 4.0 build: Drop all of the ZeroMQ patches Mar 22, 2020
hebasto added 2 commits March 22, 2020 21:26
The Mingw-w64 5.0 (Ubuntu 18.04 Bionic) is used to build the Windows
binaries now.
It is safe to use pthread_setname_np since bitcoin#17538 when the minimal glibc
version is set to 2.17.
@hebasto hebasto force-pushed the 20200322-zmq-mingw branch from 763b839 to f642b49 Compare March 22, 2020 19:29
Copy link
Contributor

@promag promag left a comment

Choose a reason for hiding this comment

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

Concept ACK.

@practicalswift
Copy link
Contributor

Concept ACK: less is more

Copy link
Contributor

@theStack theStack left a comment

Choose a reason for hiding this comment

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

Concept ACK

@maflcko
Copy link
Member

maflcko commented Mar 23, 2020

+ make -j1 -C /home/ubuntu/build/bitcoin/depends HOST=x86_64-linux-gnu
make: Entering directory '/home/ubuntu/build/bitcoin/depends'
sha256sum: /home/ubuntu/build/bitcoin/depends/patches/zeromq/0001-fix-build-with-older-mingw64.patch: No such file or directory
sha256sum: /home/ubuntu/build/bitcoin/depends/patches/zeromq/0002-disable-pthread_set_name_np.patch: No such file or directory
Extracting zeromq...
/home/ubuntu/cache/common/zeromq-4.3.1.tar.gz: OK
Preprocessing zeromq...
/bin/sh: 1: cd: can't cd to /home/ubuntu/build/bitcoin/depends/patches/zeromq
cp: cannot stat '0001-fix-build-with-older-mingw64.patch': No such file or directory
/bin/sh: 1: cd: can't cd to /home/ubuntu/build/bitcoin/depends/patches/zeromq
cp: cannot stat '0002-disable-pthread_set_name_np.patch': No such file or directory
funcs.mk:251: recipe for target '/home/ubuntu/build/bitcoin/depends/work/build/x86_64-linux-gnu/zeromq/4.3.1-726059c460b/.stamp_preprocessed' failed
make: *** [/home/ubuntu/build/bitcoin/depends/work/build/x86_64-linux-gnu/zeromq/4.3.1-726059c460b/.stamp_preprocessed] Error 1
make: Leaving directory '/home/ubuntu/build/bitcoin/depends'

@hebasto
Copy link
Member Author

hebasto commented Mar 23, 2020

@MarcoFalke
gitian builds were maid against 763b839
The current top commit is f642b49
Sorry.

Mind re-assigning "Needs gitian build"?

@bitcoin bitcoin deleted a comment from DrahtBot Mar 23, 2020
@dongcarl
Copy link
Contributor

Looks like most "stable" releases of distributions have mingw-w64 > 4 as well: https://repology.org/project/mingw-w64/versions

@DrahtBot
Copy link
Contributor

Gitian builds

File commit 97b0687
(master)
commit abea5e0
(master and this pull)
bitcoin-0.19.99-aarch64-linux-gnu-debug.tar.gz 7260c91322d82300... 96eeee3197b2a802...
bitcoin-0.19.99-aarch64-linux-gnu.tar.gz be65012c3a53b578... 89ed9a73e59ae509...
bitcoin-0.19.99-arm-linux-gnueabihf-debug.tar.gz 9bac4388162dc0a8... d1cba91d1de7de7e...
bitcoin-0.19.99-arm-linux-gnueabihf.tar.gz 9e410f69d407a61d... d2de09008162646d...
bitcoin-0.19.99-osx-unsigned.dmg 27f65bd66efda624... 01ea267a15c089ce...
bitcoin-0.19.99-osx64.tar.gz 6a195fe8a00dbde9... 58ca51a50fb05b77...
bitcoin-0.19.99-riscv64-linux-gnu-debug.tar.gz ee932eb82f08241d... 93ffa5223b142714...
bitcoin-0.19.99-riscv64-linux-gnu.tar.gz a0d5446f6f754b99... e9ab91cf72f43d9a...
bitcoin-0.19.99-win64-debug.zip dd039834c140ec2e... 9b2fc3fbb51182cd...
bitcoin-0.19.99-win64-setup-unsigned.exe 84de0daceca0cceb... e2652b38ba38d54e...
bitcoin-0.19.99-win64.zip f49e4aeba287379b... 17ab754152739284...
bitcoin-0.19.99-x86_64-linux-gnu-debug.tar.gz b0516e1c6d427605... aa22353bde4c6ef3...
bitcoin-0.19.99-x86_64-linux-gnu.tar.gz 971606878e2a293e... 3a9f7820a8402b04...
bitcoin-0.19.99.tar.gz c7400029d295c415... 2b3d2790fef1d7b7...
bitcoin-core-linux-0.20-res.yml 5ea8b7b5ad29e51c... 61f80f344dad9349...
bitcoin-core-osx-0.20-res.yml 8f4eb71802425782... f3a729021fb9e93d...
bitcoin-core-win-0.20-res.yml 2ddb9e211fda4101... d06efed0b6bd0da5...
linux-build.log 8b32031c6542efaa... 77d301343b37d5a8...
osx-build.log 759793b56c7053bb... 2940d6fda70dc3c4...
win-build.log 026fbb8f65312bf4... cdeae42f46ba7e77...
bitcoin-core-linux-0.20-res.yml.diff 1d8f90ee2c13633a...
bitcoin-core-osx-0.20-res.yml.diff 9e26de8d3df2e9d2...
bitcoin-core-win-0.20-res.yml.diff baded43cc30bbfa0...
linux-build.log.diff 04480144b7ad2a2e...
osx-build.log.diff 680fe474b44745ba...
win-build.log.diff 82d4ae24eb9a1715...

@laanwj
Copy link
Member

laanwj commented Mar 26, 2020

Concept ACK, though I don't think there's any hurry to do this. I'd like to avoid going back and forth debate over this as happened with #18427.

@DrahtBot
Copy link
Contributor

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

Conflicts

Reviewers, this pull request conflicts with the following ones:

If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

Copy link
Member

@fanquake fanquake left a comment

Choose a reason for hiding this comment

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

ACK f642b49.

079df96 - This is ok. As noted most distros have a much more recent version of mingw-w64 available. Also if someone is using mingw-w64 < 4 (i.e Ubuntu 14.04), at least the failure will be obvious, as zmq in depends will fail to build:

In file included from src/windows.hpp:61:0,
                 from src/precompiled.hpp:49,
                 from src/address.cpp:30:
/usr/share/mingw-w64/include/iphlpapi.h:147:5: error: 'SOCKADDR_IN6' does not name a type
     SOCKADDR_IN6 Ipv6Address;
     ^
cc1plus: warning: unrecognized command line option "-Wno-tautological-constant-compare" [enabled by default]
cc1plus: warning: unrecognized command line option "-Wno-atomic-alignment" [enabled by default]
make[1]: *** [src/src_libzmq_la-address.lo] Error 1

However, if they are cross-compiling for Windows using 14.04, they've already got other issues to deal with. Qt doesn't build:

compiling qwindowsnativeinterface.cpp
compiling qwindowsopengltester.cpp
compiling qwin10helpers.cpp
qwin10helpers.cpp:60:37: fatal error: uiviewsettingsinterop.h: No such file or directory
 #  include <uiviewsettingsinterop.h>
                                     ^
compilation terminated.
compiling qwindowsclipboard.cpp
compiling qwindowsdrag.cpp
compiling qwindowstabletsupport.cpp
make[5]: *** [.obj/release/qwin10helpers.o] Error 1

and even if you build depends, skipping QT and zeromq, bitcoind doesn't compile, due to the inclusion of the <codecvt> header:

  CXX      libbitcoin_common_a-netbase.o
  CXX      libbitcoin_common_a-net_permissions.o
netbase.cpp:19:19: fatal error: codecvt: No such file or directory
 #include <codecvt>
                   ^
compilation terminated.
  CXX      libbitcoin_common_a-outputtype.o
  CXX      policy/libbitcoin_common_a-feerate.o
make[2]: *** [libbitcoin_common_a-netbase.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: Leaving directory `/bitcoin/src'

f642b49 - as mentioned, pthread_setname_np has been available since glibc 2.12. We now require 2.17+.


the Mingw-w64 5.0 (Ubuntu 18.04 bionic) is used to build the Windows binaries

I do want to mention that this by itself isn't sufficient justification for dropping patches, as the version of Ubuntu we use to build releases (which can be quite recent) isn't the only OS we have to worry about supporting.

@fanquake fanquake merged commit c6b730d into bitcoin:master Aug 25, 2020
sidhujag pushed a commit to syscoin/syscoin that referenced this pull request Aug 25, 2020
f642b49 build: Drop ZeroMQ patch for glibc < 2.12 (Hennadii Stepanov)
079df96 build: Drop ZeroMQ patch for Mingw-w64 < 4.0 (Hennadii Stepanov)

Pull request description:

  This PR gets rid of the all patches for ZeroMQ:
  - the [Mingw-w64 5.0 (Ubuntu 18.04 bionic)](https://packages.ubuntu.com/bionic/mingw-w64) is used to build the [Windows](https://github.com/bitcoin/bitcoin/blob/master/doc/build-windows.md) binaries
  - it is safe to use `pthread_setname_np` since bitcoin#17538 when the minimal `glibc` version is set to 2.17; see: bitcoin#11986 (comment)

ACKs for top commit:
  fanquake:
    ACK f642b49.

Tree-SHA512: a2c97cdb682cd7d96a666ad099f20725a32bf8fda0842fc5534ca08a1634c90ba80afde92f9054595ed2501fbc5c02abbe3da765934ecff12d836ff25e277fc5
@hebasto hebasto deleted the 20200322-zmq-mingw branch August 25, 2020 05:42
jasonbcox pushed a commit to Bitcoin-ABC/bitcoin-abc that referenced this pull request Oct 5, 2020
Summary:
```
This PR gets rid of the all patches for ZeroMQ:
 - the Mingw-w64 5.0 (Ubuntu 18.04 bionic) is used to build the Windows
binaries
 - it is safe to use pthread_setname_np since #17538 when the minimal
glibc version is set to 2.17; see: #11986 (comment)
```

Note: Debian Buster has MinGw 6.0 and we enforce glibc >= 2.19.

Backport of core [[bitcoin/bitcoin#18405 | PR18405]].

Test Plan:
  make build-all

Reviewers: #bitcoin_abc, majcosta

Reviewed By: #bitcoin_abc, majcosta

Differential Revision: https://reviews.bitcoinabc.org/D7760
ftrader pushed a commit to bitcoin-cash-node/bitcoin-cash-node that referenced this pull request Aug 13, 2021
Summary:
```
This PR gets rid of the all patches for ZeroMQ:
 - the Mingw-w64 5.0 (Ubuntu 18.04 bionic) is used to build the Windows
binaries
 - it is safe to use pthread_setname_np since #17538 when the minimal
glibc version is set to 2.17; see: #11986 (comment)
```

Note: Debian Buster has MinGw 6.0 and we enforce glibc >= 2.19.

Backport of core [[bitcoin/bitcoin#18405 | PR18405]].

Test Plan:
  make build-all

Reviewers: #bitcoin_abc, majcosta

Reviewed By: #bitcoin_abc, majcosta

Differential Revision: https://reviews.bitcoinabc.org/D7760
kwvg added a commit to kwvg/dash that referenced this pull request Aug 28, 2021
PastaPastaPasta added a commit to dashpay/dash that referenced this pull request Aug 31, 2021
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Feb 15, 2022
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.

9 participants