Skip to content

Conversation

fanquake
Copy link
Member

We no longer support macOS < 10.12 (our binaries will not run), so remove the fallback for when getentropy() wasn't available. From the manpage:

HISTORY
     The getentropy() function appeared in OSX 10.12

Note that compiling on macOS you'll see a new unused function warning:

random.cpp:256:13: warning: unused function 'GetDevURandom' [-Wunused-function]
static void GetDevURandom(unsigned char *ent32)
            ^
1 warning generated.

This will likely be addressed as part of #17563.

@vasild
Copy link
Contributor

vasild commented Mar 17, 2020

ACK f9f210d (code review, not tested)

@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.

@elichai
Copy link
Contributor

elichai commented Mar 17, 2020

Looks good.
utACK f9f210d

@practicalswift
Copy link
Contributor

ACK f9f210d -- patch looks correct

@bitcoin bitcoin deleted a comment from Josmithaq Mar 17, 2020
@hebasto
Copy link
Member

hebasto commented Mar 17, 2020

Concept ACK.

Copy link
Member

@hebasto hebasto left a comment

Choose a reason for hiding this comment

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

ACK f9f210d, tested on macOS 10.13.6: compiled

$ make > /dev/null
random.cpp:256:13: warning: unused function 'GetDevURandom' [-Wunused-function]
static void GetDevURandom(unsigned char *ent32)
            ^
1 warning generated.
...

Comment on lines +318 to +319
/* getentropy() is available on macOS 10.12 and later.
*/
Copy link
Member

Choose a reason for hiding this comment

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

nit: This comment seems redundant, no?

@laanwj
Copy link
Member

laanwj commented Mar 17, 2020

Nice, by removing a fallback-to-/dev/urandom case this would simplify PRs like #17563.

ACK f9f210d

I'd like to keep the comment for now so that people who see the compilation fail on older MacOS have a refernce point.

@laanwj laanwj merged commit 1d64dfe into bitcoin:master Mar 17, 2020
@fanquake fanquake deleted the macos_remove_1012_fallback branch March 18, 2020 01:08
@DrahtBot
Copy link
Contributor

Gitian builds

File commit 7060d2d
(master)
commit 3af7cf4
(master and this pull)
bitcoin-0.19.99-aarch64-linux-gnu-debug.tar.gz 5b9186070107220b... 0214e076643255f3...
bitcoin-0.19.99-aarch64-linux-gnu.tar.gz 46ebc9a3709ee36e... 8f2e42e567695c86...
bitcoin-0.19.99-arm-linux-gnueabihf-debug.tar.gz 504c74bd26f07540... 7883b7b4999248f4...
bitcoin-0.19.99-arm-linux-gnueabihf.tar.gz 3919216a5bf8f3dd... d99d64a720b6db00...
bitcoin-0.19.99-osx-unsigned.dmg d1f66a95f5f5f232... d1f7d0b6d49a049f...
bitcoin-0.19.99-osx64.tar.gz b50eccfb91530cd2... 184a6f2a1272a990...
bitcoin-0.19.99-riscv64-linux-gnu-debug.tar.gz 058eab28b1ecb654... 3e34a693ed085c01...
bitcoin-0.19.99-riscv64-linux-gnu.tar.gz a2f43a20ba1daa43... 58d777dd70dc9188...
bitcoin-0.19.99-win64-debug.zip fcd929b8db071268... 10d221df4f70907a...
bitcoin-0.19.99-win64-setup-unsigned.exe a2f82605ec48ba21... 9d64067d6f487c42...
bitcoin-0.19.99-win64.zip 4d1973ac4aceb162... d1ba2d22fe3e8768...
bitcoin-0.19.99-x86_64-linux-gnu-debug.tar.gz ab203e4d096d364a... 2b38ec4f4d775fdc...
bitcoin-0.19.99-x86_64-linux-gnu.tar.gz c750572356e2cbf2... a49669f8fe9ee29f...
bitcoin-0.19.99.tar.gz d3ffdc3066c90f20... 21463cf3b9e690c0...
bitcoin-core-linux-0.20-res.yml 45c1139e40fb65f0... ec63f9928bc5264d...
bitcoin-core-osx-0.20-res.yml d4c974cdabd43648... 89087f266038ea3a...
bitcoin-core-win-0.20-res.yml bc0b5685df3e3a0a... 4eb6db229e92f8fc...
linux-build.log cbc5a54bd3bcd79f... 63f08114d520997d...
osx-build.log 7a752a3d6ad2cae8... dec7b18deb430209...
win-build.log 4d6918ca84bcc227... 69141565232dba2e...
bitcoin-core-linux-0.20-res.yml.diff 1e537f3bb1e0d1e9...
bitcoin-core-osx-0.20-res.yml.diff dd2bdf04ef45858e...
bitcoin-core-win-0.20-res.yml.diff 4006e5ac8e1823bf...
linux-build.log.diff bc56650ac4fd157f...
osx-build.log.diff 6f530251cf67eb36...
win-build.log.diff 332acbc4b54b73d6...

sidhujag pushed a commit to syscoin/syscoin that referenced this pull request Mar 18, 2020
… 10.12

f9f210d doc: fix GetTimeMicros() comment in random.cpp (fanquake)
a889711 rand: remove getentropy() fallback for macOS < 10.12 (fanquake)

Pull request description:

  We [no longer support macOS < 10.12](bitcoin#17550) (our binaries will not run), so remove the fallback for when `getentropy()` wasn't available. From the manpage:

  ```bash
  HISTORY
       The getentropy() function appeared in OSX 10.12
  ```

  Note that compiling on macOS you'll see a new unused function warning:
  ```bash
  random.cpp:256:13: warning: unused function 'GetDevURandom' [-Wunused-function]
  static void GetDevURandom(unsigned char *ent32)
              ^
  1 warning generated.
  ```

  This will likely be addressed as part of bitcoin#17563.

ACKs for top commit:
  vasild:
    ACK f9f210d (code review, not tested)
  elichai:
    utACK f9f210d
  practicalswift:
    ACK f9f210d -- patch looks correct
  laanwj:
    ACK f9f210d
  hebasto:
    ACK f9f210d, tested on macOS 10.13.6: compiled

Tree-SHA512: 6bd2a721f23605a8bca0b7b51f42d628ebf92a18e74eb43194331ba745ee449223aff84119892781c40b188c70b75417447f4e390e3d9ac549292de2b1e8b308
@Sjors
Copy link
Member

Sjors commented Mar 24, 2020

I can confirm I see this warning :-)

random.cpp:256:13: warning: unused function 'GetDevURandom'

sidhujag pushed a commit to syscoin-core/syscoin that referenced this pull request Nov 10, 2020
… 10.12

f9f210d doc: fix GetTimeMicros() comment in random.cpp (fanquake)
a889711 rand: remove getentropy() fallback for macOS < 10.12 (fanquake)

Pull request description:

  We [no longer support macOS < 10.12](bitcoin#17550) (our binaries will not run), so remove the fallback for when `getentropy()` wasn't available. From the manpage:

  ```bash
  HISTORY
       The getentropy() function appeared in OSX 10.12
  ```

  Note that compiling on macOS you'll see a new unused function warning:
  ```bash
  random.cpp:256:13: warning: unused function 'GetDevURandom' [-Wunused-function]
  static void GetDevURandom(unsigned char *ent32)
              ^
  1 warning generated.
  ```

  This will likely be addressed as part of bitcoin#17563.

ACKs for top commit:
  vasild:
    ACK f9f210d (code review, not tested)
  elichai:
    utACK f9f210d
  practicalswift:
    ACK f9f210d -- patch looks correct
  laanwj:
    ACK f9f210d
  hebasto:
    ACK f9f210d, tested on macOS 10.13.6: compiled

Tree-SHA512: 6bd2a721f23605a8bca0b7b51f42d628ebf92a18e74eb43194331ba745ee449223aff84119892781c40b188c70b75417447f4e390e3d9ac549292de2b1e8b308
Fabcien pushed a commit to Bitcoin-ABC/bitcoin-abc that referenced this pull request Jan 8, 2021
Summary:
We no longer support macOS < 10.12

This is a backport of Core [[bitcoin/bitcoin#18364 | PR18364]]

Test Plan:
`ninja`

@bot build-osx

Reviewers: #bitcoin_abc, deadalnix

Reviewed By: #bitcoin_abc, deadalnix

Subscribers: deadalnix

Differential Revision: https://reviews.bitcoinabc.org/D8848
kwvg added a commit to kwvg/dash that referenced this pull request Jul 15, 2021
kwvg added a commit to kwvg/dash that referenced this pull request Jul 15, 2021
kwvg added a commit to kwvg/dash that referenced this pull request Jul 20, 2021
kwvg added a commit to kwvg/dash that referenced this pull request Jul 20, 2021
kwvg added a commit to kwvg/dash that referenced this pull request Jul 20, 2021
kwvg added a commit to kwvg/dash that referenced this pull request Jul 20, 2021
kwvg added a commit to kwvg/dash that referenced this pull request Aug 1, 2021
kwvg added a commit to kwvg/dash that referenced this pull request Aug 24, 2021
kwvg added a commit to kwvg/dash that referenced this pull request Aug 24, 2021
kwvg added a commit to kwvg/dash that referenced this pull request Aug 25, 2021
kwvg added a commit to kwvg/dash that referenced this pull request Aug 25, 2021
kwvg added a commit to kwvg/dash that referenced this pull request Aug 26, 2021
kwvg added a commit to kwvg/dash that referenced this pull request Aug 26, 2021
kwvg added a commit to kwvg/dash that referenced this pull request Aug 26, 2021
kwvg added a commit to kwvg/dash that referenced this pull request Aug 27, 2021
kwvg added a commit to kwvg/dash that referenced this pull request Aug 30, 2021
kwvg added a commit to kwvg/dash that referenced this pull request Sep 1, 2021
kwvg added a commit to kwvg/dash that referenced this pull request Sep 1, 2021
kwvg added a commit to kwvg/dash that referenced this pull request Sep 1, 2021
kwvg added a commit to kwvg/dash that referenced this pull request Sep 1, 2021
kwvg added a commit to kwvg/dash that referenced this pull request Sep 2, 2021
kwvg added a commit to kwvg/dash that referenced this pull request Sep 3, 2021
kwvg added a commit to kwvg/dash that referenced this pull request Sep 3, 2021
kwvg added a commit to kwvg/dash that referenced this pull request Sep 3, 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