mainAutoconf - Support: sr #110503, Autoconf 2.70 problem:...

 
 

sr #110503: Autoconf 2.70 problem: gkt-doc/gtkdocize is now unconditionally required

Submitter:  Marvin Scholz <epirat>
Submitted:  Tue 01 Jun 2021 09:51:46 PM UTC
   
 
Priority:  * 3 - Release N+1 Severity:  3 - Normal
Status:  Confirmed Privacy:  Public
Assigned to:  None Open/Closed:  Open
Operating System:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Mon 18 Dec 2023 11:44:16 PM UTC, comment #7: 

I understand the problem now.  You have an aclocal.m4 that defines GTK_DOC_CHECK, so the m4_ifdef evaluates true and autoreconf does observe a use of the macro and therefore tries to invoke gtkdocize.

In order to figure out how to make autoreconf reliable regardless of what's available on the system, we're going to need to read up on actual uses of gtk-doc and also on what pieces of it people tend to have installed, and there isn't time for that before the next release, so I'm marking this deferred.

Zack Weinberg <zackw>
Group administrator
Sat 24 Jun 2023 06:06:26 PM UTC, comment #6: 

Sorry that it took so long, I just worked around it and had kind of forgotten to get back to this issue till now. I've attached repro.sh that reproduces the issue for me with autoconf 2.71, please let me know if you have further questions.

Marvin Scholz <epirat>
Thu 19 Jan 2023 07:17:12 PM UTC, comment #5: 

I tried just now to flesh out the fragment you provided into a complete test case, and I failed.  Given this configure.ac


AC_INIT([issue110503], [1])
AM_INIT_AUTOMAKE([foreign])

# check for gtk-doc
m4_ifdef([GTK_DOC_CHECK], [
GTK_DOC_CHECK([1.14],[--flavour no-tmpl])
],[
AM_CONDITIONAL([ENABLE_GTK_DOC], false)
])

AC_CONFIG_FILES([Makefile])
AC_OUTPUT


and a stub Makefile.am to match, autoreconf -iv prints:


autoreconf: export WARNINGS=
autoreconf: Entering directory '.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal
autoreconf: configure.ac: tracing
autoreconf: configure.ac: not using Libtool
autoreconf: configure.ac: not using Intltool
autoreconf: configure.ac: not using Gtkdoc
autoreconf: running: /usr/bin/autoconf
autoreconf: configure.ac: not using Autoheader
autoreconf: running: automake --add-missing --copy --no-force
configure.ac:2: installing './install-sh'
configure.ac:2: installing './missing'
autoreconf: Leaving directory '.'


This with Autoconf 2.71.  Please supply us with a complete configure.ac that reproduces the problem.

Zack Weinberg <zackw>
Group administrator
Wed 01 Sep 2021 07:54:43 AM UTC, comment #4: 

comment #3:

> Can you clarify what you mean by self-contained example? All it takes is to create a configure.ac with the snippet I quoted in the previous comment and run
> autoreconf -fiv.

I mean a standalone shell script that reproduces the problem. The information given naively suggests this:


cat >configure.ac <<'EOF'
# check for gtk-doc
m4_ifdef([GTK_DOC_CHECK], [
GTK_DOC_CHECK([1.14],[--flavour no-tmpl])
],[
AM_CONDITIONAL([ENABLE_GTK_DOC], false)
])
EOF
autoreconf -fiv


This is obviously wrong, though, as it fails with:


autoreconf: export WARNINGS=
autoreconf: Entering directory '.'
autoreconf: error: configure.ac: AC_INIT not found; not an autoconf script?
autoreconf: Leaving directory '.'


What would be the right shell script to reproduce the problem?

Paul Eggert <eggert>
Group administrator
Wed 01 Sep 2021 04:19:46 AM UTC, comment #3: 

I'm not sure what happened to the documentation but to see what it looks like, here is the archive version of it:

https://web.archive.org/web/20210306043255/https://developer.gnome.org/gtk-doc-manual/stable/settingup_autoconf.html.en

This worked fine with previous versions of autoconf, as side-effect of the new feature this is now broken. Even if this only ever worked by luck, clearly projects out there relied on this method to achieve something that seems quite useful behavior: Keep gtkdocize optional for people who do not care about generation of the documentation.

Two projects that use the problematic snippet are gnutls and harfbuzz.

Can you clarify what you mean by self-contained example? All it takes is to create a configure.ac with the snippet I quoted in the previous comment and run
autoreconf -fiv.

A possible workaround for other people stumbling over this bug report is to set gtkdocize via an env variable to a different "dummy" tool:

GTKDOCIZE=false autoreconf -fiv

Even if this is now what it is and can not be fixed or there is no desire to, it would be quite helpful for autoreconf to fail with a more descriptive error than:

> Can't exec "gtkdocize": No such file or directory at /usr/share/autoconf/Autom4te/FileUtils.pm line 293.
> autoreconf: error: gtkdocize failed with exit status: 2


Something like:

> gtkdocize is required by this project but could not be found

Marvin Scholz <epirat>
Wed 01 Sep 2021 01:02:14 AM UTC, comment #2: 

Could it be that this is merely a bug in the gtkdocize manual? (The URL in the June 2021 comment no longer works, so it's a bit hard to tell.)

It might help to post a complete self-contained example of the problem.

Paul Eggert <eggert>
Group administrator
Tue 01 Jun 2021 09:57:57 PM UTC, comment #1: 

Looks like I can't change the title, this is of course not a regression but a side-effect of the new feature. (I wrote the title before doing the full investigation where this error came from and forgot to change it)

Marvin Scholz <epirat>
Tue 01 Jun 2021 09:51:46 PM UTC, original submission:  

Autoconf introduced a new feature for autoreconf in 2.70:

> * autoreconf will now run gtkdocize and intltoolize when appropriate.


This has the side-effect of making the gtkdocize tool required unconditionally even for projects that follow the official documentation (Example 2-3):


# check for gtk-doc
m4_ifdef([GTK_DOC_CHECK], [
GTK_DOC_CHECK([1.14],[--flavour no-tmpl])
],[
AM_CONDITIONAL([ENABLE_GTK_DOC], false)
])


Projects that use this snippet nevertheless now fail to autoreconf properly with the following error:

> Can't exec "gtkdocize": No such file or directory at /usr/share/autoconf/Autom4te/FileUtils.pm line 293.
> autoreconf: error: gtkdocize failed with exit status: 2


Ideally autoreconf should detect if GTK_DOC_CHECK is checked with m4_ifdef and not require gtkdocize in this case. If thats too complex, possibly it could never require gtkdocize and only warn if its missing but looks like it might be needed?

Marvin Scholz <epirat>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #54866:  repro.sh added by epirat (2KiB - application/x-sh - Reproduction script)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by zackw (Posted a comment)
  • -email is unavailable- added by eggert (Posted a comment)
  • -email is unavailable- added by epirat (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2023-12-18 zackw Priority7 - Release N (Desirable) 3 - Release N+1
        StatusNeed Info Confirmed
    2023-12-08 zackw Priority5 - Unprioritized 7 - Release N (Desirable)
    2023-06-24 epirat Attached File- Added repro.sh, #54866
    2021-09-01 eggert SummaryAutoconf 2.70 regression: gkt-doc/gtkdocize is now unconditionally required Autoconf 2.70 problem: gkt-doc/gtkdocize is now unconditionally required
        StatusNone Need Info

    Back to the top

    Powered by Savane 3.14-3b9d.
    Corresponding source code