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

pull hebasto wants to merge 1 commits into bitcoin:master from hebasto:220112-m4 changing 1 files +1 −1
  1. hebasto commented at 3:41 pm on January 12, 2022: member

    Fixes bitcoin/bitcoin#24037.

    With this PR:

    0# ./autogen.sh 
    1configure.ac:16: error: PKG_PROG_PKG_CONFIG macro not found. Please install pkg-config and re-run autogen.sh
    2configure.ac:16: the top level
    3autom4te: /usr/bin/m4 failed with exit status: 1
    4aclocal: error: /usr/bin/autom4te failed with exit status: 1
    5autoreconf: aclocal failed with exit status: 1
    
  2. build: Improve error message when pkg-config is not installed 18f304d988
  3. DrahtBot added the label Build system on Jan 12, 2022
  4. jarolrod commented at 7:50 pm on January 12, 2022: member

    ACK 18f304d988117f2675e7393adda9f960fbf3cb3a

    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:

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

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

    0configure.ac:16: error: PKG_PROG_PKG_CONFIG macro not found. Please install pkg-config and re-run autogen.sh
    1configure.ac:16: the top level
    
  5. laanwj commented at 10:13 am on January 13, 2022: member

    Tested ACK 18f304d988117f2675e7393adda9f960fbf3cb3a

    0 ./autogen.sh 
    1configure.ac:16: error: PKG_PROG_PKG_CONFIG macro not found. Please install pkg-config and re-run autogen.sh
    2configure.ac:16: the top level
    3autom4te: /usr/bin/m4 failed with exit status: 1
    4aclocal: error: /usr/bin/autom4te failed with exit status: 1
    5autoreconf: 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.

  6. laanwj merged this on Jan 13, 2022
  7. laanwj closed this on Jan 13, 2022

  8. hebasto deleted the branch on Jan 13, 2022
  9. sidhujag referenced this in commit d548ed3c83 on Jan 13, 2022
  10. DrahtBot locked this on Jan 13, 2023

github-metadata-mirror

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: 2024-12-04 06:12 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me