Commit graph

94 commits

Author SHA1 Message Date
Hennadii Stepanov
4747f03095
depends, doc: List packages required to build qt package separately 2024-11-04 11:22:33 +00:00
Antoine Poinsot
1b6dec98da
depends: drop miniupnpc 2024-10-25 09:27:30 -04:00
laanwj
a0c9595810 doc: Make list of targets in depends README consistent
The description of `i686-pc-linux-gnu` and `x86_64-pc-linux-gnu` is
incomplete and inconsistent with the rest. Fix this. Also use "64 bit"
consistently instead of "64-bit".
2024-10-23 20:19:22 +02:00
fanquake
184f12c154
doc: remove dependency install instructions from win docs
This duplicates what is in depends, and is outdated.
2024-10-16 14:47:11 +01:00
Ava Chow
c33eb2360e
Merge bitcoin/bitcoin#30043: net: Replace libnatpmp with built-in PCP+NATPMP implementation
5c7cacf649 ci: Remove natpmp build option and libnatpmp dependency (laanwj)
7e7ec984da doc: Remove mention of natpmp build options (laanwj)
061c3e32a2 depends: Drop natpmp and associated option from depends (laanwj)
20a18bf6aa build: Drop libnatpmp from build system (laanwj)
7b04709862 qt: Changes for built-in PCP+NAT-PMP (laanwj)
52f8ef66c6 net: Replace libnatpmp with built-in NATPMP+PCP implementation in mapport (laanwj)
97c97177cd net: Add PCP and NATPMP implementation (laanwj)
d72df63d16 net: Use GetLocalAddresses in Discover (laanwj)
e02030432b net: Add netif utility (laanwj)
754e425438 crypto: Add missing WriteBE16 function (laanwj)

Pull request description:

  Continues #30005. Closes #17012..

  This PR adds PCP (Port Control Protocol) from [RFC6887](https://datatracker.ietf.org/doc/html/rfc6887).  This adds, in addition to the existing IPv4 port mapping (which now uses PCP, with fallback to NAT-PMP), support for IPv6 pinholing-that is, opening a port on the firewall to make it reachable.

  PCP, like NAT-PMP is a simple UDP-based protocol, and the implementation is self-contained, so this gets rid of lthe libnatpnp dependency without adding a new one. It should otherwise be a drop-in replacement. NAT-PMP fallback is implemented so this will not make router support worse.

  For now it is disabled by default, though in the future (not in this PR) we could consider enable it by default to increase the number of connectable nodes without adding significant attack surface.

  To test:
  ```bash
  bitcoind -regtest -natpmp=1 -debug=net
  ```

  (most of the changes in this PR are, ironically, removing the libnatpmp dependency and associated build system and build docs)

  ## TODO

  - [x] Default gateway discovery on Linux / FreeBSD
  - [x] Default gateway discovery on Windows
  - [x] Default gateway discovery on MacOS
  - [x] Either solve FreeBSD compile issue (probably upstream issue) or remove FreeBSD support

  ## Things to consider for follow-up PRs

  - https://github.com/bitcoin/bitcoin/pull/30043#discussion_r1658764974 avoid unreachable nets (not given to -onlynet=)

  - https://github.com/bitcoin/bitcoin/pull/30043#discussion_r1658949236 could announce an addr:port where we do not listen (no -bind)

  - https://github.com/bitcoin/bitcoin/pull/30043#discussion_r1684368824 could announce the wrong port because it uses GetListenPort()

  - https://github.com/bitcoin/bitcoin/pull/30043#discussion_r1679709347 if we requested one port but another was assigned, then which one to use in the renewal?

  - https://github.com/bitcoin/bitcoin/pull/30043#discussion_r1772017020 Use `GetAdapterAddresses` to discover local addresses for Windows

ACKs for top commit:
  Sjors:
    ACK 5c7cacf649
  achow101:
    ACK 5c7cacf649
  vasild:
    ACK 5c7cacf649

Tree-SHA512: e35b69e56d5f5449a3d48a799f9b7b65107c65eeb3e245c2c1e9d42221e469ca5ead90afae423160601cd664dd553a51c859e04f4492f335b064aae3bf23e3bc
2024-09-30 16:27:47 -04:00
laanwj
061c3e32a2 depends: Drop natpmp and associated option from depends 2024-09-30 11:37:55 +02:00
Hennadii Stepanov
4cf84b344d
depends, doc: No need to specify general requirement
CMake is no longer required solely for `libmultiprocess`.
2024-09-26 11:56:15 +01:00
Hennadii Stepanov
712d105e09
depends, doc: Do not install Autotools packages 2024-09-14 13:38:33 +01:00
Hennadii Stepanov
6ce50fd9d0
doc: Update for CMake-based build system
Co-authored-by: Lőrinc <pap.lorinc@gmail.com>
Co-authored-by: pablomartin4btc <pablomartin4btc@gmail.com>
2024-08-16 21:24:08 +01:00
fanquake
9ebdd5e9e0
depends: update install docs for macOS cross compilation 2024-06-10 13:15:23 +01:00
fanquake
e9a44faf14
depends: remove FORCE_USE_SYSTEM_CLANG 2024-06-10 13:15:23 +01:00
fanquake
a27e1ceb9f
depends: consolidate dependency docs
Adds missing `g++` for macOS. This is needed by Qt:
```bash
Configuring qt...
Creating qmake...
gmake[1]: Entering directory '/bitcoin/depends/work/build/arm64-apple-darwin/qt/5.15.14-4bca24c8f89/qtbase/qmake'
gmake[1]: g++: No such file or directory
gmake[1]: *** [Makefile:250: main.o] Error 127
```

`xz-utils` was also missing (but generally already installed), and is
needed for the `.tar.xz` tarballs.

Remove bsdmainutils, as this is only needed by the main build system
(for tests), and isn't needed to complete a depends build.
2024-05-31 09:30:24 +01:00
Hennadii Stepanov
5deb0b024e
build, test, doc: Temporarily remove Android-related stuff
Previously, our Android builds were geared towards generating APKs,
which relied on Qt. However, after migrating to C++20, compiling for
Android became unfeasible due to Qt 5.15's compatibility limitations
with NDK only up to r25, which includes an outdated embedded libc++.

All removed stuff will be reinstated after migrating the build system to
CMake and upgrading Qt to version 6.x."
2024-05-06 11:29:14 +01:00
Hennadii Stepanov
9381052194
doc: Bash is needed in gen_id and is not installed on FreeBSD by default 2024-04-24 15:40:14 +01:00
fanquake
2ac2821a74
Merge bitcoin/bitcoin#29185: build: remove --enable-lto
2d1b1c7dae build: remove --enable-lto (fanquake)

Pull request description:

  This has outlived its usefulness, doesn't gel well with newer compilers & `-flto` related options, i.e thin vs full, or `=auto`, and having `-flto` as the only option means that sometimes this just needs to be worked around, i.e in oss-fuzz:
  https://github.com/google/oss-fuzz/blob/master/projects/bitcoin-core/build.sh.

  While it was convenient when `-flto` was newer, support for `-flto` is now in all compilers we use, and there's also no-longer any real need for us to treat `-flto` different to any other optimization option.

  Remove it, to remove build complexity, and so there's no need to port a similar option to CMake.

  Note that the LTO option remains in depends, because we still a way to build packages that have LTO specific patches/options.

ACKs for top commit:
  TheCharlatan:
    ACK 2d1b1c7dae
  hebasto:
    ACK 2d1b1c7dae.

Tree-SHA512: 91812de7da35346f51850714a188fcffbac478bc8b348bf756c2555fcbde86ba622ac2fb77d294dea0378c741d3656f06121ef3a795aeed63fd170fc31bfa5af
2024-01-16 09:42:12 +00:00
Hennadii Stepanov
080763a058
build: Drop ALLOW_HOST_PACKAGES support in depends
The `ALLOW_HOST_PACKAGES` variable was introduced in bitcoin#10508 "to
speed up build and avoid timeout".

It is no longer the case for our CI infrastructure, which uses self-
hosted persistent workers and depends caching.

In the current circumstances, it does not seem worth porting this
feature to the upcoming CMake-based build system.
2024-01-08 15:56:25 +00:00
fanquake
2d1b1c7dae
build: remove --enable-lto
This has outlived its usefulness, doesn't gel well with
newer compilers & `-flto` related options, i.e thin vs full, or `=auto`,
and having `-flto` as the only option means that sometimes this just
needs to be worked around, i.e in oss-fuzz:
https://github.com/google/oss-fuzz/blob/master/projects/bitcoin-core/build.sh.

While it was convenient when `-flto` was newer, support for `-flto` is now
in all compilers we use, and there's also no-longer any real need
for us to treat `-flto` different to any other optimization option.

Remove it, to remove build complexity, and so there's no need
to port a similar option to CMake.

Note that the LTO option remains in depends, because we still a way to
build packages that have LTO specific patches/options.

If we decide to merge this, I'll follow up downstream in oss-fuzz first,
to make sure we don't break the build.
2024-01-05 15:17:50 +00:00
MarcoFalke
fa67f096bd
build: Require C++20 compiler 2023-12-07 11:05:33 +01:00
fanquake
97d53e90ba
ci: remove libz-dev from macOS build deps
Remove no-longer used libz-dev (from DMG compression).
Followup to #28432.
Missed this in #28932.
2023-11-30 15:17:19 +00:00
fanquake
0ffcc5b680
ci: remove python3-setuptools from mac build deps 2023-11-23 17:52:38 +00:00
fanquake
b5790c35f7
build: remove dmg dependencies 2023-09-15 13:47:50 +01:00
Hennadii Stepanov
a128111c29
build: produce a .zip for macOS distribution
Instead of a .dmg.

Co-authored-by: fanquake <fanquake@gmail.com>
2023-09-15 13:47:50 +01:00
fanquake
94955b4b1d
depends: use LLVM/Clang 15.0.6 for macOS cross-compile
There is no x86_64 binaries for 15.0.7.
2023-08-27 10:02:55 +01:00
MarcoFalke
fa29651c3f
doc: Rework build-unix.md 2023-05-17 14:31:03 +02:00
fanquake
436df1e826
depends: add NO_HARDEN option
Add an option that when passed, will disable hardening options, and
pass `--disable-hardening` through to configure. Due to the way
we link libssp for Windows builds, they now fail (after #27118),
if building with depends, and configuring with --disable-hardening.
See:
https://github.com/bitcoin/bitcoin/pull/27118#issuecomment-1492606272.

This change would add a depends opiton such that, if someone wants to
build with, for windows, without hardening, they can do so. This may
also be useful when building for debugging.
2023-04-04 10:07:41 +01:00
Hennadii Stepanov
c9aace2bfd
depends, doc: Document NO_USDT option 2023-04-01 10:26:10 +01:00
fanquake
14ce84388f
doc: add new NO_* options from #26833 2023-01-18 16:59:01 +00:00
fanquake
0953c622f9
doc: install binutils, not binutils-gold in depends
We don't use the gold linker.
binutils-gold just installs binutils (and the gold linker) in any case.
2022-11-25 17:20:05 +00:00
fanquake
f7595f1354
build: add and use CXX_STANDARD in depends 2022-06-16 17:01:05 +01:00
fanquake
7e7b3e42fa
build: add and use C_STANDARD in depends 2022-06-16 16:59:05 +01:00
fanquake
094772656d
build: support LTO in depends
No Qt for now.
2022-06-14 12:08:27 +01:00
Hennadii Stepanov
7f650883b7
depends: Add file-based logging for individual packages 2022-04-14 13:44:28 +02:00
fanquake
471d15536f
build: add support for OpenBSD to depends 2022-02-10 12:33:10 +00:00
jarolrod
edd70b52fc
doc: add arm macOS depends platform triplet 2022-01-26 17:32:46 +08:00
fanquake
e09773d20a
build: use a static .tiff for macOS .dmg over generating
Co-authored-by: Pavol Rusnak <pavol@rusnak.io>
2022-01-02 15:38:19 +08:00
Hennadii Stepanov
94a7f09de6
doc: Drop outdated note
It is outdated since bitcoin/bitcoin#23060.
2021-12-25 15:41:58 +02:00
Hennadii Stepanov
66a20a54a2
build, qt: Drop support for i686-linux-android host 2021-12-11 08:15:25 +02:00
fanquake
1b76b18f8a
Merge bitcoin/bitcoin#23585: scripted-diff: Drop Darwin version for better maintainability
2f356a0ca8 scripted-diff: Drop Darwin version for better maintainability (Hennadii Stepanov)

Pull request description:

  After this PR, any macOS tools version bumping in the future will touch fewer files in the repo.

  Pointing a Darwin version for the `--host` system does not matter for the following reasons:

  - in terms of the resulted binaries, we should only care about the minimum supported macOS version which is a separated parameter in our build system.

  - in terms of the build system itself, the usage of the `$(host)` variable is self-consistent enough. Btw `$(host_os)` value already has the version dropped:
  ```
  $ make -C depends --no-print-directory print-host_os HOST=x86_64-apple-darwin19
  host_os=darwin
  ```

ACKs for top commit:
  gruve-p:
    ACK 2f356a0ca8
  promag:
    ACK 2f356a0ca8.
  fanquake:
    ACK 2f356a0ca8

Tree-SHA512: 374896ab0ba02b0d8b4b21431fe963bd213b0d09586e0898c13a4c5fa294c1b693f1b2c92880c245c4157c14217b4825b36522f461930477f4d2a727086ebb2a
2021-12-09 16:13:33 +08:00
Hennadii Stepanov
d0204199d6
Revert "doc: Install Rosetta on M1-macOS for qt in depends"
This reverts commit cdb41d5573.

It is no longer required because of the previous commit.
2021-11-25 09:35:25 +02:00
Hennadii Stepanov
2f356a0ca8
scripted-diff: Drop Darwin version for better maintainability
-BEGIN VERIFY SCRIPT-
sed -i 's/darwin19/darwin/g' $(git grep --files-with-matches 'darwin19')
-END VERIFY SCRIPT-
2021-11-25 01:12:46 +02:00
Hennadii Stepanov
6393bdcd53
doc: Move Android dependencies guide into build-android.md 2021-11-10 18:51:33 +02:00
fanquake
a43b8e9555
build: set OSX_MIN_VERSION to 10.15
This is required to use std::filesystem on macOS as support for it only
landed in the libc++ dylib shipped with 10.15.

See also: https://developer.apple.com/documentation/xcode-release-notes/xcode-11-release-notes

Clang now supports the C++17 <filesystem> library for iOS 13, macOS 10.15, watchOS 6, and tvOS 13.
2021-09-16 17:50:19 +08:00
Hennadii Stepanov
cdb41d5573
doc: Install Rosetta on M1-macOS for qt in depends 2021-07-05 13:42:14 +03:00
Jarol Rodriguez
5e7d1997fc doc: note on SDK for macOS depends cross-compile 2021-04-22 16:14:06 -04:00
Hennadii Stepanov
223b1ba7d9
doc: Use CONFIG_SITE instead of --prefix 2021-04-09 12:25:18 +03:00
Hennadii Stepanov
3272e34f9c
build: Add xkbcommon 0.8.4
Co-authored-by: fanquake <fanquake@gmail.com>
2021-03-10 08:23:47 +08:00
Hennadii Stepanov
f7f3829a68
build, doc: Drop libbz2-dev from macOS cross-compiling dependencies 2021-03-03 22:43:08 +02:00
Hennadii Stepanov
d8239362e2
build, doc: Drop libcap-dev from macOS cross-compiling dependencies 2021-03-03 22:38:45 +02:00
fanquake
5b41d84b34
doc: add xorriso to macOS depends packages
This was missed in #20470.
2021-01-22 16:22:11 +08:00
Hennadii Stepanov
ae749d12dd
doc: Add libnatpmp stuff 2021-01-07 18:07:10 +02:00