All listed deps are necessary for autogen.sh to do its job. It currently shows cryptic and non-actionable error messages if some of those deps are missing
build: Fail early and show actionable messages if autogen deps are missing #25523
pull bubelov wants to merge 1 commits into bitcoin:master from bubelov:autogen-assert-deps changing 1 files +19 −4-
bubelov commented at 12:27 PM on July 1, 2022: contributor
-
in autogen.sh:17 in 6f611ebfe8 outdated
13 | + return 1 14 | + fi 15 | + done 16 | +} 17 | + 18 | +assert_deps aclocal autoreconf libtool pkg-config
hebasto commented at 12:34 PM on July 1, 2022:libtoolpackage haslibtoolizebinary:assert_deps aclocal autoreconf libtoolize pkg-configBut message "configuration failed, please install libtoolize first" still useless.
bubelov commented at 12:49 PM on July 1, 2022:@hebasto yep, it seems like
libtoolbinary is not always present so it can't be used. It's present in Archlibtoolbut it's not provided by DebianWithout this check, it looks like this:
Can't exec "libtoolize": No such file or directory at /usr/share/autoconf/Autom4te/FileUtils.pm line 293. autoreconf: error: libtoolize failed with exit status: 2So maybe it would still look a bit cleaner
DrahtBot added the label Build system on Jul 1, 2022jarolrod commented at 2:54 AM on July 27, 2022: memberA clean commit history is required. Please squash your commits, see: CONTRIBUTING.md#squashing-commits
bubelov force-pushed on Jul 27, 2022fanquake commented at 10:29 AM on August 1, 2022: memberThis PR doesn't currently work, because libtoolize is glibtoolize on macOS. Overall I think this change is ~0.
Fail early if autogen deps are missing 862dc6f20ebubelov force-pushed on Aug 2, 2022bubelov commented at 6:11 AM on August 2, 2022: contributor@fanquake thanks for the tip, I fixed that. Although I agree that this change is minor, I believe it's a net positive for the following reasons:
- The current version of this script already checks for certain deps, namely
autoreconf, and it fails early in case it's missing. Adding other deps or removing this check would make this script more consistent - Failing early is usually a good practice, it saves time and de-clutters output
- Every missing dep currently causes inconsistent and cryptic output. Showing the same error template with clear and actionable message is especially helpful for people who aren't familiar with building C/C++ software and for people who used other build systems
- It's tempting to assume that those packages are always present or that everyone knows about them, but it's not always the case. For instance, many cloud and container images are intentionally minimized, so the situation when some crucial deps are missing isn't that uncommon
- Listing all the deps explicitly improves visibility, it makes it easier to understand what Bitcoin Core relies on at every point in the build pipeline
DrahtBot commented at 11:14 AM on September 23, 2022: contributor<!--e57a25ab6845829454e8d69fc972939a-->
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
<!--021abf342d371248e50ceaed478a90ca-->
Reviews
See the guideline for information on the review process. A summary of reviews will appear here.
<!--174a7506f384e20aa4161008e828411d-->
Conflicts
No conflicts as of last run.
achow101 commented at 7:40 PM on October 12, 2022: memberAre you still working on this?
in autogen.sh:23 in 862dc6f20e
20 | +# libtoolize is glibtoolize on macOS 21 | if [ -z "${LIBTOOLIZE}" ] && GLIBTOOLIZE="$(command -v glibtoolize)"; then 22 | LIBTOOLIZE="${GLIBTOOLIZE}" 23 | export LIBTOOLIZE 24 | +else 25 | + assert_deps libtoolize
TheCharlatan commented at 8:46 AM on January 30, 2023:This does not instruct the user to look for
glibtoolizeon macOS.TheCharlatan changes_requestedfanquake commented at 12:36 PM on February 16, 2023: memberThanks. However I don't think we are going to merge this. We'll also soon be migrating away from autotools & friends.
fanquake closed this on Feb 16, 2023bitcoin locked this on Feb 16, 2024Labels
This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-17 09:13 UTC
More mirrored repositories can be found on mirror.b10c.me