Skip to content

Fail noisily if an unknown --enable or --disable flag is passed to configure - #5395

Merged
graydon merged 1 commit into
stellar:masterfrom
graydon:fail-unknown-configure-flags
Sep 17, 2026
Merged

graydon merged 1 commit into
stellar:masterfrom
graydon:fail-unknown-configure-flags

Conversation

@graydon

@graydon graydon commented Jul 29, 2026 •

Copy link
Copy Markdown
Contributor

If, like me, you regularly mis-spell a configure --enable-foo or --disable-foo flag and it gets silently ignored, you might enjoy this PR: it enables a thing in autoconf that catches and complains about such misspellings rather than silently ignoring them!

(Apparently this is normally the default until you have sub-configures like we have, in which case it switches. But you can switch it back. Thanks robot for discovering this!)

Fixes #2635

Copilot AI review requested due to automatic review settings July 29, 2026 20:23

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Makes top-level configuration fail on misspelled or unknown feature flags while preserving permissive recursive configuration.

Changes:

  • Sets Autoconf option checking to fatal.
  • Documents why recursive sub-configures remain unaffected.

@dmkozh dmkozh left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's very much appreciated, thanks!

@sisuresh
sisuresh added this pull request to the merge queue Aug 27, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Aug 27, 2026
@graydon
graydon added this pull request to the merge queue Sep 17, 2026
Merged via the queue into stellar:master with commit 6d05545 Sep 17, 2026
69 checks passed
@graydon
graydon deleted the fail-unknown-configure-flags branch September 17, 2026 19:25
pull Bot pushed a commit to DIGIIX-Ltd/stellar-core that referenced this pull request Sep 21, 2026
…configure (stellar#5462)

In PR stellar#5395 I modified
`configure` to notice and complain if you pass an unknown `--enable-foo`
command.

Unfortunately this revealed a quirk in the way our configure.ac was
already working that was previously being ignored, that breaks the
build: configure modified its own `ac_configure_args` when invoking
gperftools sub-configure (recursively) to contain flags known to
gperftools configure, but not the outer configure. This modified
`ac_configure_args` then got written into the config.status file that
re-runs configure automatically when autotools files change, re-invoking
the top-level configure with the arguments for gperftools configure.
Before stellar#5395 that was fine, they were silently ignored. But after they
cause the self-auto-reconfiguration steps of already-configured builds
to break.

The symptom is that you type `make` in an already-configured build, and
you get a complaint about some unknown weird `--enable-foo` commands you
never even passed to configure. Not great!

The "fix" for this (if you can stand to call it that) is to only update
`ac_configure_args` _after_ config.status has been emitted, but before
we start launching recursive sub-configures. Disgusting. I feel ashamed
even posting this, but here we are.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Configure ignores invalid arguments silently

3 participants