Skip to content

Conversation

fanquake
Copy link
Member

@fanquake fanquake commented Jan 3, 2022

Setup to use the system Clang (11.0.1 as of FreeBSD 13.0).

Doesn't build the Qt package; that requires a few additional changes. The current issue is that FreeBSDs byacc seems to have an issue parsing something in libxkbcommon. Work in progress branch here: https://github.com/fanquake/bitcoin/tree/depends_support_freebsd_qt. In any case, I don't think building the Qt libs on FreeBSD is a super high priority (I'd also have no way to test the GUI).

@maflcko
Copy link
Member

maflcko commented Jan 3, 2022

In any case, I don't think building the Qt libs on FreeBSD is a super high priority (I'd also have no way to test the GUI).

It might be possible to use the system qt with the depends options NO_QT=1 ALLOW_HOST_PACKAGES=1

@DrahtBot
Copy link
Contributor

DrahtBot commented Jan 3, 2022

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

Conflicts

Reviewers, this pull request conflicts with the following ones:

  • #24123 ([POC] build: enable Pointer Authentication and Branch Target Identification for aarch64 (Linux) by fanquake)
  • #23998 (build: support OpenBSD in depends by fanquake)
  • #23955 (build: add support for NetBSD in depends by fanquake)

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.

@fanquake
Copy link
Member Author

fanquake commented Jan 4, 2022

Rebased on master and dropped the base commit.

It might be possible to use the system qt with the depends options NO_QT=1 ALLOW_HOST_PACKAGES=1

Yes I'd think that is possible. I'm just assuming that the number of users wanting to run (depends built) bitcoin-qt on FreeBSD is not large.

fanquake added a commit to fanquake/bitcoin that referenced this pull request Jan 18, 2022
Similar to how we specify the OS's we build Qt for, specify which OS's
we will build qrencode for (a qt dependency). This commit alone doesn't
change anything, but when we start supporting other OS's, i.e bitcoin#23948,
where we wont support qt (or at least initially), it'll skip building
the qrencode package, which would be unused.
fanquake added a commit that referenced this pull request Jan 19, 2022
bf044ef build: specify hosts for qrencode package (fanquake)

Pull request description:

  Similar to how we specify the OS's we build Qt for, specify which OS's
  we will build qrencode for (a qt dependency). This commit alone doesn't
  change anything, but when we start supporting other OS's, i.e #23948,
  where we wont support qt (or at least initially), it'll skip building
  the qrencode package, which would be unused.

  I'll rebase the other *BSD changes on top of this.

ACKs for top commit:
  hebasto:
    ACK bf044ef, I have reviewed the code and it looks OK, I agree it can be merged.

Tree-SHA512: 3f5f11f122704a664dd77d8da0b7e9b95d44b2f1514d0199deed9b8b8ad0d8883a1de1f444b796c5f4681f423a380c3905fce720d7d2b788130162c907c2ce3b
@fanquake fanquake force-pushed the depends_support_freebsd branch from 07592a4 to ae9175f Compare January 19, 2022 12:38
sidhujag pushed a commit to syscoin/syscoin that referenced this pull request Jan 20, 2022
bf044ef build: specify hosts for qrencode package (fanquake)

Pull request description:

  Similar to how we specify the OS's we build Qt for, specify which OS's
  we will build qrencode for (a qt dependency). This commit alone doesn't
  change anything, but when we start supporting other OS's, i.e bitcoin#23948,
  where we wont support qt (or at least initially), it'll skip building
  the qrencode package, which would be unused.

  I'll rebase the other *BSD changes on top of this.

ACKs for top commit:
  hebasto:
    ACK bf044ef, I have reviewed the code and it looks OK, I agree it can be merged.

Tree-SHA512: 3f5f11f122704a664dd77d8da0b7e9b95d44b2f1514d0199deed9b8b8ad0d8883a1de1f444b796c5f4681f423a380c3905fce720d7d2b788130162c907c2ce3b
@laanwj
Copy link
Member

laanwj commented Jan 25, 2022

I tested it (on FreeBSD 13) and get:

~/src/bitcoin/depends % gmake NO_QT=1
Invalid configuration `medea': machine `medea-unknown' not recognized
shasum: hosts/.mk: No such file or directory
shasum: hosts/.mk: No such file or directory
shasum: hosts/.mk: No such file or directory
…

It looks like the hostname ends up in the machine tuple somehow 😄

@laanwj
Copy link
Member

laanwj commented Jan 26, 2022

For some reason the environment variable HOST contains the hostname on this machine. I'm not sure where it comes from, but it seems FreeBSD behavior?
The makefile assumes it to be a host tuple.

With the following patch, it gets past it:

diff --git a/depends/Makefile b/depends/Makefile
index 003778b37..36f28f1c7 100644
--- a/depends/Makefile
+++ b/depends/Makefile
@@ -45,7 +45,7 @@ MULTIPROCESS ?=
 FALLBACK_DOWNLOAD_PATH ?= https://bitcoincore.org/depends-sources
 
 BUILD = $(shell ./config.guess)
-HOST ?= $(BUILD)
+HOST := $(BUILD)
 PATCHES_PATH = $(BASEDIR)/patches
 BASEDIR = $(CURDIR)
 HASH_LENGTH:=11

It removes the ability to override the host system tuple, if we want this i'd suggest using a different env variable name.

Edit: ok, stupid suggestion

@laanwj
Copy link
Member

laanwj commented Jan 26, 2022

Oh, we explicitly document the use of HOST. OK, this is kind of annoying, I don't really know how to resolve this, we could just add a big FreeBSD warning to always override it (or unset it) because the default will result in absurd behavior.

Edit: seems it's csh/tcsh that sets HOST, not FreeBSD. I'd assume someone running Linux who uses tcsh would run into the same problem
Edit.2: googling around I find I had a similar issue building clightning once, lol ElementsProject/lightning#1231
Edit.3: From man tcsh:

       HOST (+)
               Initialized to the name of the machine on which the shell is
               running, as determined by the gethostname(2) system call.

@laanwj
Copy link
Member

laanwj commented Feb 2, 2022

ACK ae9175f
We can solve the tcsh specific issue (or document it) somewhere else.

@laanwj laanwj merged commit c545a7a into bitcoin:master Feb 2, 2022
@fanquake fanquake deleted the depends_support_freebsd branch February 3, 2022 00:42
sidhujag pushed a commit to syscoin/syscoin that referenced this pull request Feb 3, 2022
ae9175f build: add FreeBSD support to depends (fanquake)

Pull request description:

  Setup to use the system Clang (11.0.1 as of FreeBSD 13.0).

  Doesn't build the Qt package; that requires a few additional changes. The current issue is that FreeBSDs `byacc` seems to have an issue parsing something in libxkbcommon. Work in progress branch here: https://github.com/fanquake/bitcoin/tree/depends_support_freebsd_qt. In any case, I don't think building the Qt libs on FreeBSD is a super high priority (I'd also have no way to test the GUI).

ACKs for top commit:
  laanwj:
    ACK ae9175f

Tree-SHA512: 1ecc7855f0195f68c96e534bd77ce17c3975db1dfb3caa35302c2b46643c8c30f75b1c2e1735cf69f1eddb70447d11e67e7f339ef5497336cdff7a59b32be961
rebroad pushed a commit to rebroad/bitcoin that referenced this pull request Feb 3, 2022
Similar to how we specify the OS's we build Qt for, specify which OS's
we will build qrencode for (a qt dependency). This commit alone doesn't
change anything, but when we start supporting other OS's, i.e bitcoin#23948,
where we wont support qt (or at least initially), it'll skip building
the qrencode package, which would be unused.
fanquake added a commit that referenced this pull request Feb 14, 2022
bcd36e1 build: correct depends FreeBSD C{XX}FLAGS (fanquake)
7b06ffc build: add NetBSD support to depends (fanquake)

Pull request description:

  Similar to #23948. Doesn't build the Qt package; I haven't looked at doing that yet, but have an assumption that it's going to fail out of the box similar to the FreeBSD build.

  Guix Build:
  ```bash
  ```

ACKs for top commit:
  theuni:
    ACK bcd36e1

Tree-SHA512: 9a0946cefbcb9a92dd730b885463f3213e304c8d4b39fea8d831fc013a73d2ef998ca84e384bf45a01fa1449cf5a35eaffaa5b57a9062c2cdda34312d33ec3fc
sidhujag pushed a commit to syscoin/syscoin that referenced this pull request Feb 15, 2022
bcd36e1 build: correct depends FreeBSD C{XX}FLAGS (fanquake)
7b06ffc build: add NetBSD support to depends (fanquake)

Pull request description:

  Similar to bitcoin#23948. Doesn't build the Qt package; I haven't looked at doing that yet, but have an assumption that it's going to fail out of the box similar to the FreeBSD build.

  Guix Build:
  ```bash
  ```

ACKs for top commit:
  theuni:
    ACK bcd36e1

Tree-SHA512: 9a0946cefbcb9a92dd730b885463f3213e304c8d4b39fea8d831fc013a73d2ef998ca84e384bf45a01fa1449cf5a35eaffaa5b57a9062c2cdda34312d33ec3fc
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jun 19, 2022
bf044ef build: specify hosts for qrencode package (fanquake)

Pull request description:

  Similar to how we specify the OS's we build Qt for, specify which OS's
  we will build qrencode for (a qt dependency). This commit alone doesn't
  change anything, but when we start supporting other OS's, i.e bitcoin#23948,
  where we wont support qt (or at least initially), it'll skip building
  the qrencode package, which would be unused.

  I'll rebase the other *BSD changes on top of this.

ACKs for top commit:
  hebasto:
    ACK bf044ef, I have reviewed the code and it looks OK, I agree it can be merged.

Tree-SHA512: 3f5f11f122704a664dd77d8da0b7e9b95d44b2f1514d0199deed9b8b8ad0d8883a1de1f444b796c5f4681f423a380c3905fce720d7d2b788130162c907c2ce3b
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jun 19, 2022
bf044ef build: specify hosts for qrencode package (fanquake)

Pull request description:

  Similar to how we specify the OS's we build Qt for, specify which OS's
  we will build qrencode for (a qt dependency). This commit alone doesn't
  change anything, but when we start supporting other OS's, i.e bitcoin#23948,
  where we wont support qt (or at least initially), it'll skip building
  the qrencode package, which would be unused.

  I'll rebase the other *BSD changes on top of this.

ACKs for top commit:
  hebasto:
    ACK bf044ef, I have reviewed the code and it looks OK, I agree it can be merged.

Tree-SHA512: 3f5f11f122704a664dd77d8da0b7e9b95d44b2f1514d0199deed9b8b8ad0d8883a1de1f444b796c5f4681f423a380c3905fce720d7d2b788130162c907c2ce3b
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jun 19, 2022
bf044ef build: specify hosts for qrencode package (fanquake)

Pull request description:

  Similar to how we specify the OS's we build Qt for, specify which OS's
  we will build qrencode for (a qt dependency). This commit alone doesn't
  change anything, but when we start supporting other OS's, i.e bitcoin#23948,
  where we wont support qt (or at least initially), it'll skip building
  the qrencode package, which would be unused.

  I'll rebase the other *BSD changes on top of this.

ACKs for top commit:
  hebasto:
    ACK bf044ef, I have reviewed the code and it looks OK, I agree it can be merged.

Tree-SHA512: 3f5f11f122704a664dd77d8da0b7e9b95d44b2f1514d0199deed9b8b8ad0d8883a1de1f444b796c5f4681f423a380c3905fce720d7d2b788130162c907c2ce3b
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jun 27, 2022
bf044ef build: specify hosts for qrencode package (fanquake)

Pull request description:

  Similar to how we specify the OS's we build Qt for, specify which OS's
  we will build qrencode for (a qt dependency). This commit alone doesn't
  change anything, but when we start supporting other OS's, i.e bitcoin#23948,
  where we wont support qt (or at least initially), it'll skip building
  the qrencode package, which would be unused.

  I'll rebase the other *BSD changes on top of this.

ACKs for top commit:
  hebasto:
    ACK bf044ef, I have reviewed the code and it looks OK, I agree it can be merged.

Tree-SHA512: 3f5f11f122704a664dd77d8da0b7e9b95d44b2f1514d0199deed9b8b8ad0d8883a1de1f444b796c5f4681f423a380c3905fce720d7d2b788130162c907c2ce3b
@bitcoin bitcoin locked and limited conversation to collaborators Feb 3, 2023
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.

5 participants