Bug #6119
closedUsage of CPPFLAGS during configure result in duplicated values for RbConfig CPPFLAGS information
Description
When attempted to use FD_SETSIZE preprocesor definition under Windows to increase number of file descriptions, found that configure script replicated it.
A simple configure invoke with `sh configure --enable-shared CPPFLAGS='-DFD_SETSIZE=32767' result in the following value returned by RbConfig:
irb(main):001:0> require "rbconfig" => false irb(main):002:0> RbConfig::CONFIG["CPPFLAGS"] => "-DFD_SETSIZE=32767 -DFD_SETSIZE=32767"
Above is result from Ruby 1.9.3, and for ruby-trunk:
irb(main):001:0> require "rbconfig" => false irb(main):002:0> RbConfig::CONFIG["CPPFLAGS"] => "-DFD_SETSIZE=32767 -D_WIN32_WINNT=0x0501 -DFD_SETSIZE=32767"
I'm not very versed on configure.in, so can't find the culprit of this duplication, sorry about that.
Updated by jonforums (Jon Forums) about 13 years ago
I bet $CPPFLAGS and $cppflags are doing a two step. See if you have something similar to the following (from trunk) in the lib\ruby\1.9.1\i386-mingw32\rbconfig.rb
file:
grep "S["CPPFLAGS" config.status
S["CPPFLAGS"]="-DFD_SETSIZE=32767 -D_WIN32_WINNT=0x0501 $(DEFS) ${cppflags}"
grep "S["cppflags" config.status
S["cppflags"]="-DFD_SETSIZE=32767"
Couldn't find a RUBY_APPEND_OPTION(CPPFLAGS, ...)
that appeared to cause the issue, but there may be something else in configure.in like https://github.com/ruby/ruby/blob/trunk/configure.in#L2731
Updated by shyouhei (Shyouhei Urabe) about 13 years ago
- Status changed from Open to Assigned
Updated by nobu (Nobuyoshi Nakada) almost 13 years ago
- Tracker changed from Bug to Backport
- Project changed from Ruby to 13
- Category deleted (
build) - Target version deleted (
1.9.3)
I don't see this issue with trunk.
Updated by nobu (Nobuyoshi Nakada) almost 13 years ago
- Tracker changed from Backport to Bug
- Project changed from 13 to Ruby
Sorry, reproduced.
Updated by nobu (Nobuyoshi Nakada) almost 13 years ago
- Status changed from Assigned to Closed
- % Done changed from 0 to 100
This issue was solved with changeset r36550.
Luis, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.
configure.in: get rid of duplication in CPPFLAGS
- configure.in (RUBY_CPPOUTFILE): get rid of variable conflict so
CPPFLAGS is not duplicated. [ruby-core:43097] [Bug #6119]