Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(build): add autoreconf dependency check #1584

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

epiccurious
Copy link
Contributor

Add check for autoreconf dependency to autogen.sh and refactor -if to long forms of optional arguments.

Impact

  • Add a functional change to improves error handling to provide a more helpful message if autoreconf is not found.
  • Add a non-functional refactor to change the autoreconf optional arguments from -if to --install --force.
  • These changes align with the format of autogen.sh on the bitcoin repo

Background

10 years ago: Created the entire file with no other updates.

@hebasto
Copy link
Member

hebasto commented Aug 13, 2024

  • Add a functional change to improves error handling to provide a more helpful message if autoreconf is not found.

On my system, the current error message is already quite descriptive:

$ ./autogen.sh 
./autogen.sh: 3: autoreconf: not found

@epiccurious
Copy link
Contributor Author

epiccurious commented Aug 14, 2024

the current error message is already quite descriptive

I agree, but the error message could be made even more helpful for those less familiar with the build process.

Since autoreconf is a part of the autoconf package, directing users to install autoconf (rather than just indicating that autoreconf is missing) makes it clearer which package to install.

autoconf is named consistently across popular Unix-based package managers, so this saves a step for users who try to install autoreconf:

apt-get install autoconf
dnf install autoconf
pacman -S autoconf
install autoconf
zypper install autoconf
apk add autoconf
nix-env -iA nixpkgs.autoconf
emerge dev-util/autoconf

Copy link
Contributor

@real-or-random real-or-random left a comment

Choose a reason for hiding this comment

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

I don't think we need this, so I don't think we should spend time reviewing this. But I'm not against merging it.

@hebasto
Copy link
Member

hebasto commented Sep 25, 2024

the current error message is already quite descriptive

I agree, but the error message could be made even more helpful for those less familiar with the build process.

Since autoreconf is a part of the autoconf package, directing users to install autoconf (rather than just indicating that autoreconf is missing) makes it clearer which package to install.

autoconf is named consistently across popular Unix-based package managers, so this saves a step for users who try to install autoreconf:

apt-get install autoconf
dnf install autoconf
pacman -S autoconf
install autoconf
zypper install autoconf
apk add autoconf
nix-env -iA nixpkgs.autoconf
emerge dev-util/autoconf

The suggested approach is incomplete. Wouldn't it be better to document build prerequisites, which also include automake, libtool, etc?

@real-or-random
Copy link
Contributor

The suggested approach is incomplete. Wouldn't it be better to document build prerequisites, which also include automake, libtool, etc?

Yes, I think so, and this should probably simply go to the README then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants