bitcoin: depens: bdb build fails on Intel macOS 13.6.6

Current behaviour

Building BDB as part of depends fails with a permission denied error for creating a temporary directory. The directory exists after make fails. Deleting it and running make once more, creates it again and the same error is shown.

Does not happen on my newer Intel macOS 14.4.1 machine.

Expected behaviour

make succeeds

Steps to reproduce

cd depends
make NO_BOOST=1 NO_LIBEVENT=1 NO_QT=1 NO_SQLITE=1 NO_UPNP=1 NO_NATPMP=1 NO_USDT=1

Relevant log output

depends % make NO_BOOST=1 NO_LIBEVENT=1 NO_QT=1 NO_SQLITE=1 NO_UPNP=1 NO_NATPMP=1 NO_USDT=1
Fetching db-4.8.30.NC.tar.gz from https://download.oracle.com/berkeley-db
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 21.7M  100 21.7M    0     0  15.4M      0  0:00:01  0:00:01 --:--:-- 15.4M
/.../bitcoin-depends/depends/work/download/bdb-4.8.30/db-4.8.30.NC.tar.gz.temp: OK
Extracting bdb...
/.../bitcoin-depends/depends/sources/db-4.8.30.NC.tar.gz: OK
Preprocessing bdb...
patching file 'dbinc/atomic.h'
Can't create '/var/folders/qp/bskkps293_v5w198m17h7zrm0000gn/T/patcho2C1xcCJMLh', output is in '/var/folders/qp/bskkps293_v5w198m17h7zrm0000gn/T/patcho2C1xcCJMLh': Permission denied
patch: **** can't create '/var/folders/qp/bskkps293_v5w198m17h7zrm0000gn/T/patcho2C1xcCJMLh': Permission denied
make: *** [/.../bitcoin-depends/depends/work/build/x86_64-apple-darwin22.6.0/bdb/4.8.30-c4f10ceb835/.stamp_preprocessed] Error 2

How did you obtain Bitcoin Core

Compiled from source

What version of Bitcoin Core are you using?

master@3b12fc7bcd94cf214984911f68612feb468d5404

Operating system and version

macOS 13.6.6

Apple clang version 15.0.0

Machine specifications

Intel iMac 2017.

About this issue

  • Original URL
  • State: closed
  • Created 3 months ago
  • Comments: 15 (15 by maintainers)

Commits related to this issue

Most upvoted comments

It seems to:

mkdir /tmp/test

% TMPDIR=/tmp/test  make NO_BOOST=1 NO_LIBEVENT=1 NO_QT=1 NO_SQLITE=1 NO_UPNP=1 NO_NATPMP=1 NO_USDT=1
Preprocessing bdb...
patching file 'dbinc/atomic.h'
Can't create '/tmp/test/patchoSHQPQFIlmq', output is in '/tmp/test/patchoSHQPQFIlmq': Permission denied
patch: **** can't create '/tmp/test/patchoSHQPQFIlmq': Permission denied
make: *** [/Volumes/SSD/test/bitcoin/depends/work/build/x86_64-apple-darwin22.6.0/bdb/4.8.30-0de9a3a86cb/.stamp_preprocessed] Error 2

It seems to want the temp dir to live on the same volume:

TMPDIR=/Volumes/SSD/temp/test  make ...

^ works