Bug #14692 configure accepts invalid ---with* and --without* options
Submitted: 7 Nov 2005 7:58 Modified: 30 Mar 2006 3:20
Reporter: Philip Stoev Email Updates:
Status: Won't fix Impact on me:
None 
Category:MySQL Server: Compiling Severity:S3 (Non-critical)
Version:5.0-BK, 5.0.15 OS:Linux (Linux)
Assigned to: Kent Boortz CPU Architecture:Any

[7 Nov 2005 7:58] Philip Stoev
Description:
The configure script does not do strict checking on the --with* and --without* options. Therefore, it is possible to pass it an invalid option and the compile will happily proceed.

Please see http://bugs.mysql.com/?id=14685 which may be related.

How to repeat:
[root@aude mysql-5.0.15]# ./configure --with-nothing-in-particular
checking build system type... i686-pc-linux-gnu

[root@aude mysql-5.0.15]# ./configure --without-nothing-in-particular
checking build system type... i686-pc-linux-gnu

[root@aude mysql-5.0.15]# ./configure --nothing-in-particular
configure: error: unrecognized option: --nothing-in-particular
Try `./configure --help' for more information.

Suggested fix:
Enumerate all possible --with* and --without* options, and strict-check them and document all of them in the manual. At this time, it is a bit confusing as to which stuff must be explicitly turned on to be included and which must be explicitly turned off to be excluded.
[7 Nov 2005 8:36] Valeriy Kravchuk
Thank you for a problem report. Yes, these options are not checked seriously. And it may lead to the problems like described in the report you mentioned.
[30 Mar 2006 3:20] Kent Boortz
As long as we are using autoconf, we have to live with this limitation.
From the user manual:

`configure' scripts do not complain about `--with-PACKAGE' options
that they do not support.  This behavior permits configuring a source
tree containing multiple packages with a top-level `configure' script
when the packages support different options, without spurious error
messages about options that some of the packages support.  An
unfortunate side effect is that option spelling errors are not
diagnosed.  No better approach to this problem has been suggested so
far.
[25 Jul 2008 16:27] Paul DuBois
Adding this comment per request from Marc Alff. IRC transcript below. (The bug I was referring to in my initial statement is Bug#38359.)

11:11:paul: marc_alff: I'm glad to see you file that bug report about configure options
11:12:marc_alff: paul: have you see the comments also ?
11:12:marc_alff: (I haded some today)
11:13:marc_alff: err, added
11:13:paul: marc_alff: I have read some of them, not all
11:15:paul: marc_alff: Related observation: I note that when I upgrade to autoconf 2.62, I can no longer build MySQL from source, because apparently we are not compatible with 2.62 for some reason. *However* autoreconf emits some interesting output, like this:
11:15:paul: storage/falcon/plug.in:8: warning: AC_CACHE_VAL(falcon_supported_by_machine, ...): suspicious cache-id, must contain _cv_ to be cached
11:15:paul: configure.in:2447: warning: AC_CACHE_VAL(falcon_cxx_enable_exceptions, ...): suspicious cache-id, must contain _cv_ to be cached
11:15:paul: configure.in:2447: warning: AC_CACHE_VAL(falcon_cxx_no_invalid_offsetof, ...): suspicious cache-id, must contain _cv_ to be cached
11:15:paul: configure.in:1882: warning: AC_CACHE_VAL(mysql_use_mysys_new, ...): suspicious cache-id, must contain _cv_ to be cached
11:16:paul: And then when I run configure, I get:
11:16:paul: configure: WARNING: Unrecognized options: --with-archive-storage-engine, --with-blackhole-storage-engine, --with-csv-storage-engine, --with-example-storage-engine, --with-federated-storage-engine, --with-innodb, --without-bench, --with-partition, --with-row-based-replication
11:16:marc_alff: I am not familiar with this, but it seems easy to fix : required prefix by AC_CACHE_VAL
11:16:paul: marc_alff: Yes, but the interesting thing here is that configure tells you about options that it doesn't recognize.
11:17:marc_alff: Oh, got it
11:17:paul: Which helped me realize why stuff like InnoDB no longer worked when I tried to use the resulting server. :-)
11:18:paul: I had to revert to autoconf 2.61 because I prefer a working server :-)  But I don't recall earlier autoconf versions ever telling me about unrecognized options. Perhaps they do and I didn't notice.
11:19:marc_alff: paul: could you add comments related to what you found in AC 2.62 to bug#14692 ?
[25 Jul 2008 16:33] Marc ALFF
Extract from the Autoconf 2.62 release notes:

** Warnings are now generated by default when an installer invokes
~   'configure' with an unknown --enable-* or --with-* option.
~   These warnings can be disabled with the new AC_DISABLE_OPTION_CHECKING
~   macro, or by invoking 'configure' with --disable-option-checking.

When/if mysql uses autoconf 2.62, the "won't fix" status of this bug
should be re-evaluated (likely to be fixed by autoconf 2.62)