From: Jon Forums Date: 2012-03-07T05:33:03+09:00 Subject: [ruby-core:43098] [ruby-trunk - Bug #6119] Usage of CPPFLAGS during configure result in duplicated values for RbConfig CPPFLAGS information Issue #6119 has been updated by Jon Forums. 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 ---------------------------------------- Bug #6119: Usage of CPPFLAGS during configure result in duplicated values for RbConfig CPPFLAGS information https://bugs.ruby-lang.org/issues/6119 Author: Luis Lavena Status: Open Priority: Normal Assignee: Nobuyoshi Nakada Category: build Target version: 1.9.3 ruby -v: ruby 1.9.3p163 (2012-03-06 revision 34932) [i386-mingw32] 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. -- http://bugs.ruby-lang.org/