Menu

#29 Compilation fails when autotools is not installed.

None
accepted
nobody
None
1
2024-09-15
2024-09-11
No

The release tarball of dia2code, like most autotools using projects, contains a pregenerated configure script, Makefile.in, etc. Unfortunately, it is broken and nonfunctional.

$ ./configure
[...]
$ make
(CDPATH="${ZSH_VERSION+.}:" && cd . && /bin/sh /tmp/dia2code-1.0.0/missing autoheader)
/tmp/dia2code-1.0.0/missing: 81: autoheader: not found
WARNING: 'autoheader' is missing on your system.
         You should only need it if you modified 'acconfig.h' or
         'configure.ac' or m4 files included by 'configure.ac'.
         The 'autoheader' program is part of the GNU Autoconf package:
         <http://www.gnu.org/software/autoconf/>
         It also requires GNU m4 and Perl in order to run:
         <http://www.gnu.org/software/m4/>
         <http://www.perl.org/>
make: *** [Makefile:379: config.h.in] Error 127

The root of the problem is the reconfig.sh script, which is erroneous. Upstream autotools says you should run autoreconf -fi and it will handle everything for you, replacing the use of home-grown cobbled together scripts.

The specific error in this case is that reconfig.sh tries to run autoheader before aclocal, which means the resulting config.h.in contains broken contents which are also out of date compared to aclocal.m4.

If autoheader happens to be installed on the system, which is not at all guaranteed, then it deletes and recreates config.h.in at make time.

Originally reported downstream at https://bugs.gentoo.org/939469 (we have a quality assurance check that catches running these tools at "make" time so that we can add an explicit build dependency on the necessary tools).

Discussion

  • Oliver Kellogg

    Oliver Kellogg - 2024-09-15
    • status: open --> accepted
    • Group: -->
     
  • Oliver Kellogg

    Oliver Kellogg - 2024-09-15

    Thanks for reporting.
    Addressed by commits 961a597 and 186b9c9.
    It would be great if you could test whether this works for you.

     

    Last edit: Oliver Kellogg 2024-09-15

Log in to post a comment.

MongoDB Logo MongoDB