Skip to content

doc: improve depends prefix documentation - #16691

Merged
fanquake merged 2 commits into
bitcoin:masterfrom
fanquake:depends_improve_prefix_docs
Aug 23, 2019
Merged

fanquake merged 2 commits into
bitcoin:masterfrom
fanquake:depends_improve_prefix_docs

Conversation

@fanquake

@fanquake fanquake commented Aug 23, 2019 •

Copy link
Copy Markdown
Member

There seems to be some confusion about exactly how to use depends, when to pass a prefix to ./configure etc (see #16367, #16654).

I've cherry-picked two of russ's commits out of #16367, as they are clear stand-alone improvements and we don't have to wait for #16367 to improve the depends documentation.

@fanquake fanquake added the Docs label Aug 23, 2019
@fanquake
fanquake requested a review from ryanofsky August 23, 2019 03:37

@ryanofsky ryanofsky left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

ACK 0b1c2b0418ac39d6935bf3eb207915d33c9d983a. Maybe discount this review because I wrote these commits, but I agree they make sense in this standalone PR.

@ryanofsky

Copy link
Copy Markdown
Contributor

Also, I think it would be a good idea that if a depends/${host}/share/config.site file exists, bitcoin configure script would just use depends/$(host) as the default --prefix value instead of /usr/local.

This way using depends would just require running 'make -C depends; ./configure; make` without needing to figure out the host triple or look at depends output.

@fanquake

Copy link
Copy Markdown
Member Author

@ryanofsky Thanks. Probably out of scope to make those changes here, but I've opened #16692 to track.

@practicalswift

practicalswift commented Aug 23, 2019 •

Copy link
Copy Markdown
Contributor

Should it be clarified that --prefix is used not in its usual meaning of "when you run ./configure --prefix=/foo/bar, you are indicating that the software should be installed under the /foo/bar directory"?

That seems to be a recurring source of confusion.

Has it been discussed if we could use something else than --prefix for the "where to find dependencies"-meaning we're talking about here?

@hebasto hebasto left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Concept ACK

Comment thread depends/README.md Resolved
If not cross compiling, it might actually be nice for it to be picked up
automatically. But for now clarify the readme to try to minimize confusion.

bitcoin-core/libmultiprocess#4 (comment)
bitcoin-core/libmultiprocess#5 (comment)
@fanquake
fanquake force-pushed the depends_improve_prefix_docs branch from 0b1c2b0 to 2483266 Compare August 23, 2019 06:24

@hebasto hebasto left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

ACK 2483266, I have reviewed the code and it looks OK, I agree it can be merged.

@DrahtBot

Copy link
Copy Markdown
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:

  • #16367 (Multiprocess build support by ryanofsky)
  • #10102 ([experimental] Multiprocess bitcoin by ryanofsky)

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.

@Sjors

Sjors commented Aug 23, 2019

Copy link
Copy Markdown
Member

utACK 2483266

@jonasschnelli jonasschnelli left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

ACK 2483266

fanquake added a commit that referenced this pull request Aug 23, 2019
2483266 packages.md: document depends build targets (Russell Yanofsky)
be27161 Clarify need to specify --prefix with depends (Russell Yanofsky)

Pull request description:

  There seems to be some confusion about exactly how to use depends, when to pass a prefix to `./configure` etc (see #16367, #16654).

  I've cherry-picked two of russ's commits out of #16367, as they are clear stand-alone improvements and we don't have to wait for #16367 to improve the depends documentation.

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

Tree-SHA512: a198c288248f573519a3b0ef384626b61cc803803280af9a448c28466e3d9949bed0332af6618dac19e81c5a6e9694afa83d976b176fd13c32a6c2c3fea3fc1f

@jonatack jonatack left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

ACK. After my questions on the #bitcoin-builds irc channel, like you I was thinking this info would be useful to add here.

Comment thread depends/packages.md

## Build targets:

To build an individual package (useful for debugging), following build targets are available.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

nit: missing "the" before "following"

@fanquake
fanquake merged commit 2483266 into bitcoin:master Aug 23, 2019
@fanquake
fanquake deleted the depends_improve_prefix_docs branch August 23, 2019 10:43
deadalnix pushed a commit to Bitcoin-ABC/bitcoin-abc that referenced this pull request Apr 2, 2020
Summary:
Introduced in D5608.

Backport of core [[bitcoin/bitcoin#16691 | PR16691]].
Only commit 2483266
(bitcoin/bitcoin@2483266)
is applicable for us, since the first one is autotools documentation
while we recommand cmake.

Test Plan: Read the doc.

Reviewers: #bitcoin_abc, deadalnix

Reviewed By: #bitcoin_abc, deadalnix

Differential Revision: https://reviews.bitcoinabc.org/D5634
fanquake added a commit that referenced this pull request Apr 13, 2021
223b1ba doc: Use CONFIG_SITE instead of --prefix (Hennadii Stepanov)

Pull request description:

  The current examples of `--prefix=...` option usage to point `configure` script to appropriate `depends` directory is not [standard](https://www.gnu.org/prep/standards/html_node/Directory-Variables.html). This causes some [confusion](#16691) and a bit of inconvenience.

  Consider a CentOS 7 32 bit system. Packages `libdb4-devel`, `libdb4-cxx-devel`, `miniupnpc-devel` and `zeromq-devel` are unavailable from repos. After recommended build with depends:
  ```
  cd depends
  make
  cd ..
  ./autogen.sh
  ./configure --prefix=$PWD/depends/i686-pc-linux-gnu
  make
  ```
  a user is unable to `make install` compiled binaries neither locally (to `~/.local`) nor system-wide (to `/usr/local`) as `--prefix` is set already.

  Meanwhile, the standard approach with using [`config.site`](https://www.gnu.org/software/automake/manual/html_node/config_002esite.html) files allows both possibilities:

  ```
  cd depends
  make
  cd ..
  ./autogen.sh
  CONFIG_SITE=$PWD/depends/i686-pc-linux-gnu/share/config.site ./configure --prefix ~/.local
  make
  make install
  ```

  or

  ```
  CONFIG_SITE=$PWD/depends/i686-pc-linux-gnu/share/config.site ./configure
  make
  sudo make install  # install to /usr/local
  ```

  Moreover, this approach is used in [Gitian descriptors](https://github.com/bitcoin/bitcoin/tree/master/contrib/gitian-descriptors) already.

ACKs for top commit:
  practicalswift:
    ACK 223b1ba: patch looks correct
  fanquake:
    ACK 223b1ba

Tree-SHA512: 46d97924f0fc7e95ee4566737cf7c2ae805ca500e5c49af9aa99ecc3acede4b00329bc727a110aa1b62618dfbf5d1ca2234e736f16fbdf96d6ece5f821712f54
@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.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants