Skip to content

Conversation

jonasschnelli
Copy link
Contributor

Configuring --without-bdb on MacOS leads to a compile error (when BerkeleyDB is not installed). brew --prefix berkeley-db4 always reports the target directory (even if not installed).

This PR prevents BDB_CFLAGS (et al) from being populated when configuring --without-bdb

ld: warning: directory not found for option '-L/Users/user/Documents/homebrew/Cellar/berkeley-db@4/4.8.30/lib'
ld: warning: directory not found for option '-L/Users/user/Documents/homebrew/Cellar/berkeley-db@4/4.8.30/lib'
ld: library not found for -ldb_cxx-4.8
ld: library not found for -ldb_cxx-4.8

@jonasschnelli
Copy link
Contributor Author

Missed in #20202.

@promag
Copy link
Contributor

promag commented Nov 24, 2020

Tested ACK 982e548.

@@ -643,7 +643,7 @@ case $host in

bdb_prefix=$($BREW --prefix berkeley-db4 2>/dev/null)
Copy link
Member

Choose a reason for hiding this comment

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

I guess it shouldn't even call brew here in case bdb is not used?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

brew just returns the expected directory (based on the available - also uninstalled – formulas). But we could also just avoid the brew call (complicated the folding though...)

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 982e548, tested on macOS 11 Big Sur.

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

@jonasschnelli jonasschnelli merged commit 277c225 into bitcoin:master Dec 1, 2020
sidhujag pushed a commit to syscoin/syscoin that referenced this pull request Dec 1, 2020
jonasschnelli added a commit that referenced this pull request Dec 4, 2020
…tually installed

d3ef947 build: Check that Homebrew's berkeley-db4 package is actually installed (Hennadii Stepanov)

Pull request description:

  On master (a0489f3) the `configure` script is not able to determine that Homebrew's `berkeley-db4` package is uninstalled. This causes a compile error on macOS.

  With this PR, and with the [uninstalled](https://stackoverflow.com/questions/20802320/detect-if-homebrew-package-is-installed) `berkeley-db4` package:
  ```
  % ./configure -q
  configure: error: libdb_cxx headers missing, Bitcoin Core requires this library for BDB wallet support (--without-bdb to disable BDB wallet support)
  ```

  Related #20478.

ACKs for top commit:
  promag:
    Tested ACK d3ef947.
  willcl-ark:
    tACK d3ef947
  jonasschnelli:
    utACK d3ef947

Tree-SHA512: 8dc532e08249ec63bd357594aa458d314b6e8537fc63f5b1d509c84d0d71d5b1f70172caa1a7efe2fc8af31c829e7982a0695cf3fbe5cbc477019550269915e1
@hebasto
Copy link
Member

hebasto commented Dec 4, 2020

It seems this change is no longer required since #20563 has been merged. Maybe revert it as a part of #20527?

nm

maflcko pushed a commit to maflcko/bitcoin-core that referenced this pull request Dec 10, 2020
@maflcko
Copy link
Member

maflcko commented Dec 10, 2020

Backported in #20612 because #20527 has been marked for backport

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

6 participants