Visitar URL original
tests: fix build for automake < 1.16 by jay · Pull Request #22960 · curl/curl · GitHub
Skip to content

tests: fix build for automake < 1.16 - #22960

Open
jay wants to merge 1 commit into
curl:masterfrom
jay:fix_tests_for_old_automake
Open

jay wants to merge 1 commit into
curl:masterfrom
jay:fix_tests_for_old_automake

Conversation

@jay

@jay jay commented Sep 15, 2026

Copy link
Copy Markdown
Member
  • Specify actual filename for SOURCES in Makefile.am.

Prior to this change some of the Makefiles in tests used a variable $(BUNDLE).c to specify the filename. Old automake does not expand the variable properly at some point, resulting in depfiles like $(BUNDLE).Po on disk rather than the actual name, eg '.deps/perf.Po'.

That would cause make test to fail:

make[2]: *** No rule to make target '.deps/perf.Po'. Stop.

Likely caused by a bug in old automake.

Ref: https://lists.gnu.org/archive/html/bug-automake/2015-01/msg00001.html

Fixes #22958
Closes #xxxx

@jay
jay requested a review from vszakats September 15, 2026 19:00
@jay
jay force-pushed the fix_tests_for_old_automake branch from 5730fa7 to 27cfb46 Compare September 15, 2026 19:06
- Specify actual filename for SOURCES in Makefile.am.

Prior to this change some of the Makefiles in tests used a variable
`$(BUNDLE).c` to specify the filename. Old automake does not expand the
variable properly at some point, resulting in depfiles like
`$(BUNDLE).Po` on disk rather than the actual name, eg '.deps/perf.Po'.

That would cause `make test` to fail:

make[2]: *** No rule to make target '.deps/perf.Po'.  Stop.

Likely caused by a bug in old automake.

Ref: https://lists.gnu.org/archive/html/bug-automake/2015-01/msg00001.html

Fixes curl#22958
Closes #xxxx
@jay
jay force-pushed the fix_tests_for_old_automake branch from 27cfb46 to a852ac0 Compare September 15, 2026 19:08
@bagder

bagder commented Sep 15, 2026

Copy link
Copy Markdown
Member

Automake 1.16 was released on February 25, 2018

As this is a rather small fix I think it is acceptable, but otherwise I wouldn't mind bumping up our requirement.

@dfandrich

dfandrich commented Sep 15, 2026 via email

Copy link
Copy Markdown
Contributor

@bagder

bagder commented Sep 17, 2026

Copy link
Copy Markdown
Member

Especially since we ship source with a working version of autoconf output, so it's only developers that would be affected by such a version bump.

Good point that I think says we should just bump the minimum support version.

@vszakats

Copy link
Copy Markdown
Member

My thought also to bump, since catching this (and other old
automake issues) in CI is non-trivial.

old-linux uses automake 1.15, yet the issue doesn't surface there.
Perhaps a bug that's been retroffitted there, but not in Ubuntu?
Or maybe me misreading something?

@jay

jay commented Sep 24, 2026

Copy link
Copy Markdown
Member Author

old-linux uses automake 1.15, yet the issue doesn't surface there.
Perhaps a bug that's been retroffitted there, but not in Ubuntu?
Or maybe me misreading something?

According to this answer the reason is because that configure runs with --disable-dependency-tracking.

Except for tests the rest of curl doesn't need the updated automake afaict so I will see if there's a way to apply a minimum version just to tests. However if there isn't or everyone is ok with making it apply to the entire build process then I think this would probably work:

diff --git a/configure.ac b/configure.ac
index a2843b4..98103ab 100644
--- a/configure.ac
+++ b/configure.ac
@@ -42,6 +42,7 @@ AH_TOP([/* !checksrc! disable COPYRIGHT all */])
 AC_CONFIG_MACRO_DIR([m4])
 AM_MAINTAINER_MODE
 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
+AM_INIT_AUTOMAKE([1.16])
 
 CURL_CHECK_OPTION_DEBUG
 AM_CONDITIONAL(DEBUGBUILD, test "$want_debug" = "yes")

@vszakats

vszakats commented Oct 8, 2026 •

Copy link
Copy Markdown
Member

old-linux uses automake 1.15, yet the issue doesn't surface there.
Perhaps a bug that's been retroffitted there, but not in Ubuntu?
Or maybe me misreading something?

According to this answer the reason is because that configure runs with --disable-dependency-tracking.

I've confirmed this to be accurate, via this test job:
https://github.com/curl/curl/actions/runs/37714915914/job/113109086415?pr=23308

Looks like a feasible workaround to use 1.15 (and below?).

Except for tests the rest of curl doesn't need the updated automake afaict so I will see if there's a way to apply a minimum version just to tests. However if there isn't or everyone is ok with making it apply to the entire build process then I think this would probably work:

diff --git a/configure.ac b/configure.ac
index a2843b4..98103ab 100644
--- a/configure.ac
+++ b/configure.ac
@@ -42,6 +42,7 @@ AH_TOP([/* !checksrc! disable COPYRIGHT all */])
 AC_CONFIG_MACRO_DIR([m4])
 AM_MAINTAINER_MODE
 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
+AM_INIT_AUTOMAKE([1.16])
 
 CURL_CHECK_OPTION_DEBUG
 AM_CONDITIONAL(DEBUGBUILD, test "$want_debug" = "yes")

Wouldn't this break CI for old-linux? Perhaps we could instead document
the --disable-dependency-tracking workaround in docs/INSTALL.md,
and keep the minimum as-is?

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

Development

Successfully merging this pull request may close these issues.

automake < 1.16 doesn't properly generate Makefiles for tests

4 participants