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

Autoconf 2.71 tries to call gtkdocize #23964

Closed
sethrj opened this issue May 27, 2021 · 1 comment · Fixed by #23971
Closed

Autoconf 2.71 tries to call gtkdocize #23964

sethrj opened this issue May 27, 2021 · 1 comment · Fixed by #23971

Comments

@sethrj
Copy link
Contributor

sethrj commented May 27, 2021

A change to version 2.71 of autoconf means that calling autoreconf will try to call gtkdocize when a project's autom4te macros contain GTK_DOC_CHECK, even when docs aren't being built at configure time. This currently causes cairo to fail to build:

==> cairo: Executing phase: 'autoreconf'
==> [2021-05-27-13:14:41.253237] '/bin/sh' './autogen.sh'
*** No GTK-Doc found, documentation won't be generated ***
autoreconf: export WARNINGS=
autoreconf: Entering directory '.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal -I build ${ACLOCAL_FLAGS}
autoreconf: configure.ac: tracing
autoreconf: running: glibtoolize --copy
autoreconf: configure.ac: not using Intltool
autoreconf: running: gtkdocize --copy
Can't exec "gtkdocize": No such file or directory at /usr/local/Cellar/autoconf/2.71/share/autoconf/Autom4te/FileUtils.pm line 293.
autoreconf: error: gtkdocize failed with exit status: 2

Possible solutions:

  • adding gtk-doc dependency on packages that require autoreconfiguring (bad; it's a heavy dependency if it's not used)
  • preferring autotools 2.70 and hope this "feature" gets reverted upstream? because other people are complaining about it too
  • trying to hack around the problem by exporting GTKDOCIZE=echo if the package doesn't explicitly depend on gtk-doc

The solution I have set up for the last case is:

    def setup_dependent_build_environment(self, env, dependent_spec):
        if (self.spec.satisfies('@2.71:')
            and not dependent_spec.satisfies('^gtk-doc')):
            # If an autoconf script calls GTK_DOC_CHECK, newer
            # versions of autoreconf try to call `gtkdocize --copy`, which
            # would require an extra dependency on `gtk-doc`, even if
            # documentation is disabled at configure time.
            env.set('GTKDOCIZE', 'echo')

but unfortunately it doesn't work in the particular case of cairo because its autogen.sh script clears GTKDOCIZE if there's no gtkdocize in the path. ☹️

sethrj added a commit to sethrj/spack that referenced this issue May 27, 2021
As of 2.71, `autoreconf` will try to call `gtkdocize` if it encounters
the `GTK_DOC_CHECK` macro, even if we don't plan on enabling
documentation after configuring.

This is a nasty workaround for spack#23964
sethrj added a commit to sethrj/spack that referenced this issue May 27, 2021
As of 2.71, `autoreconf` will try to call `gtkdocize` if it encounters
the `GTK_DOC_CHECK` macro, even if we don't plan on enabling
documentation after configuring.

This is a nasty workaround for spack#23964
sethrj added a commit to sethrj/spack that referenced this issue May 27, 2021
As of 2.71, `autoreconf` will try to call `gtkdocize` if it encounters
the `GTK_DOC_CHECK` macro, even if we don't plan on enabling
documentation after configuring.

This is a nasty workaround for spack#23964
@sethrj sethrj linked a pull request May 29, 2021 that will close this issue
sethrj added a commit to sethrj/spack that referenced this issue Jun 9, 2021
As of 2.71, `autoreconf` will try to call `gtkdocize` if it encounters
the `GTK_DOC_CHECK` macro, even if we don't plan on enabling
documentation after configuring.

This is a nasty workaround for spack#23964
@KangmingYang2008
Copy link

If gtkdocize isn't installed, it will fail. And it can be ignored by exporting GTKDOCIZE=echo.

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

Successfully merging a pull request may close this issue.

2 participants