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

build: Improve error message when pkg-config is not installed #24048

Merged
merged 1 commit into from Jan 13, 2022

Conversation

hebasto
Copy link
Member

@hebasto hebasto commented Jan 12, 2022

Fixes #24037.

With this PR:

# ./autogen.sh 
configure.ac:16: error: PKG_PROG_PKG_CONFIG macro not found. Please install pkg-config and re-run autogen.sh
configure.ac:16: the top level
autom4te: /usr/bin/m4 failed with exit status: 1
aclocal: error: /usr/bin/autom4te failed with exit status: 1
autoreconf: aclocal failed with exit status: 1

Copy link
Member

@jarolrod jarolrod left a comment

Choose a reason for hiding this comment

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

ACK 18f304d

Although the referenced issue is really a case of not reading the docs (@laanwj :D), this is still more helpful than the original message. If anyone ends up in this situation, this will help them get out of it.

Out of the m4 diagnostic messages, diagnostic macros, m4_fatal looks appropriate for this use case.

master: error message without pkg-config installed, running autogen.sh on Debian:

libtoolize: copying file 'build-aux/m4/lt~obsolete.m4'
configure.ac:16: error: possibly undefined macro: AC_MSG_ERROR
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.
configure.ac:261: error: possibly undefined macro: AC_DEFINE
configure.ac:662: error: possibly undefined macro: AC_MSG_WARN
autoreconf: /usr/bin/autoconf failed with exit status: 1

pr: error message without pkg-config installed, running autogen.sh on Debian:

configure.ac:16: error: PKG_PROG_PKG_CONFIG macro not found. Please install pkg-config and re-run autogen.sh
configure.ac:16: the top level

@laanwj
Copy link
Member

laanwj commented Jan 13, 2022

Tested ACK 18f304d

 ./autogen.sh 
configure.ac:16: error: PKG_PROG_PKG_CONFIG macro not found. Please install pkg-config and re-run autogen.sh
configure.ac:16: the top level
autom4te: /usr/bin/m4 failed with exit status: 1
aclocal: error: /usr/bin/autom4te failed with exit status: 1
autoreconf: aclocal failed with exit status: 1

Although the referenced issue is really a case of not reading the docs (@laanwj :D)

I agree, but the error message in this case was just absurd.

@laanwj laanwj merged commit 31db3dd into bitcoin:master Jan 13, 2022
@hebasto hebasto deleted the 220112-m4 branch January 13, 2022 11:15
sidhujag pushed a commit to syscoin/syscoin that referenced this pull request Jan 13, 2022
…not installed

18f304d build: Improve error message when pkg-config is not installed (Hennadii Stepanov)

Pull request description:

  Fixes bitcoin#24037.

  With this PR:
  ```
  # ./autogen.sh
  configure.ac:16: error: PKG_PROG_PKG_CONFIG macro not found. Please install pkg-config and re-run autogen.sh
  configure.ac:16: the top level
  autom4te: /usr/bin/m4 failed with exit status: 1
  aclocal: error: /usr/bin/autom4te failed with exit status: 1
  autoreconf: aclocal failed with exit status: 1
  ```

ACKs for top commit:
  laanwj:
    Tested ACK 18f304d
  jarolrod:
    ACK 18f304d

Tree-SHA512: ba845f44c966fea6cf7cee0db9cacc431072e2005ad065c8f2bbe3cffd8415c3af6ed443cccf9606df7de4df2ff3e72636afb5f3776d2a96af8572aab7018549
@bitcoin bitcoin locked and limited conversation to collaborators Jan 13, 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.

Unclear error when pkg-config is not installed
4 participants