Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 230748

Summary: dev-lang/ruby-1.8.6_p287: Unrecognized options: --disable-socks, --enable-ipv6, --disable-debug, --with-dbm, --with-gdbm, --with-openssl, --with-tk
Product: Gentoo Linux Reporter: Arfrever Frehtes Taifersar Arahesis (RETIRED) <arfrever>
Component: New packagesAssignee: Gentoo Ruby Team <ruby>
Status: RESOLVED FIXED    
Severity: minor CC: a3li, galtgendo, sandro.bonazzola
Priority: High    
Version: unspecified   
Hardware: All   
OS: All   
Whiteboard:
Package list:
Runtime testing required: ---

Description Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2008-07-04 16:35:49 UTC
configure: WARNING: Unrecognized options: --disable-socks, --enable-ipv6, --disable-debug, --with-dbm, --with-gdbm, --with-openssl, --with-tk
Comment 1 Sandro Bonazzola 2008-08-17 18:33:06 UTC
The same QA notice affects 1.8.6_p287 also.
QA Notice: Unrecognized configure options:
configure: WARNING: Unrecognized options: --disable-socks, --enable-ipv6, --disable-debug, --with-dbm, --with-gdbm, --with-openssl, --with-tk
Comment 2 Rafał Mużyło 2008-09-13 21:38:39 UTC
*** Bug 237486 has been marked as a duplicate of this bug. ***
Comment 3 Alex Legler (RETIRED) archtester gentoo-dev Security 2008-09-15 22:54:56 UTC
This is a weird thing..

When running eautoreconf in the ebuild, we get a modified configure with enabled option checking. In the version upstream ships, there is no such check. That may be desired by upstream as they use a rather custom build system.

I have checked the following useflags: socks5, doc, threads, berkdb, gdbm, ssl and tk and can confirm they still work properly.
For ipv6 and debug I couldn't find any obvious change in the ruby libraries, but grepping through the Ruby source, I reckon that these are still recognized and work.

Adding "--enable-option-checking=no" to the list of configure options disables the aforementioned check and IMHO resolves that issue.
Comment 4 Rafał Mużyło 2008-09-16 01:36:18 UTC
Unless I'm missing something, there's no such thing
as "--enable-option-checking=no" configure option.
ruby seems to be keeping all of his m4 macros within configure.in
and eautoreconf can't create something that's not there.

AFAICT, all deps are automagic, but not through configure,
though their extconf.rb scripts.
Comment 5 Rafał Mużyło 2008-09-16 02:09:54 UTC
OK, my mistake there is such option (with autoconf 2.62).

Actually ebuild seems to respect useflags, but it doesn't do it 
though pure configure, it looks like one of the ruby scripts
involved in the build process parses some file (config.status,
 perhaps ?) and gets the unrecognized options from the preserved 
command line (though I can't say I'm 100% sure, cause I don't know ruby).
Comment 6 Alex Legler (RETIRED) archtester gentoo-dev Security 2008-09-16 08:51:40 UTC
(In reply to comment #5)
> OK, my mistake there is such option (with autoconf 2.62).

Have you tested with an earlier version? Does adding the flag there cause any problems/another new warning?

> Actually ebuild seems to respect useflags, but it doesn't do it 
> though pure configure, it looks like one of the ruby scripts
> involved in the build process parses some file (config.status,
>  perhaps ?) and gets the unrecognized options from the preserved 
> command line (though I can't say I'm 100% sure, cause I don't know ruby).

Yes, that's how it works. There is a library in lib/mkmf.rb, which has functions for recognizing the configure arguments and checking for header and library presence. Each extconf script requires mkmf...

The source is btw rbconfig's Config::MAKEFILE_CONFIG["configure_args"], which is set during make by mkconfig.rb.
Comment 7 Rafał Mużyło 2008-09-16 14:44:46 UTC
Straight from the info page:
The `configure' script checks its command-line options against a list
of known options, like `--help' or `--config-cache'.  An unknown option
ordinarily indicates a mistake by the user and `configure' halts with
an error.  However, by default unknown `--with-PACKAGE' and
`--enable-FEATURE' options elicit only a warning, to support
configuring entire source trees.

As such, as "--enable-option-checking" was added in 2.62, adding it to 
the ebuild would give it an implit dep on autoconf 2.62 and forced us
to use autoreconf till ruby upstream move to 2.62, otherwise
we'd be getting build failures.
Comment 8 Alex Legler (RETIRED) archtester gentoo-dev Security 2008-09-16 15:50:06 UTC
(In reply to comment #7)
> As such, as "--enable-option-checking" was added in 2.62, adding it to 
> the ebuild would give it an implit dep on autoconf 2.62 and forced us
> to use autoreconf till ruby upstream move to 2.62, otherwise
> we'd be getting build failures.

Did you actually try?
I just did and it worked fine. No warnings with both autoconf 2.59 and 2.61.

Also, you're quoting >=2.62 documentation. In the 2.61 version I can't find anything on option checking at all.

My auto-fu isn't really the best, so please correct me if I'm wrong, but seeing ruby building fine and configure not printing any warnings, I still think that adding the option is a proper fix.
Comment 9 Rafał Mużyło 2008-09-16 16:18:00 UTC
OK, I should have checked that, or rather I should have noticed I'm contradicting
myself, after all, "--enable-option-checking" is an --enable-FEATURE option (the only reason this works).
Comment 10 Alex Legler (RETIRED) archtester gentoo-dev Security 2009-02-23 14:21:37 UTC
Added --enable-option-checking=no in the latest revisions.
I consider this fixed.