On Thu, Dec 3, 2009 at 8:00 PM, Pavel Heimlich, a.k.a. hajma
<tropikhajma at gmail.com> wrote:
> 2009/12/3 Ben Taylor <bentaylor.solx86 at gmail.com>:
>> After updating the stdcxx module to the Dude r.3072 with explicit patches,
>> and fixing the ncurses c++ patch to use -lstdcxx4 instead of -lstdcxx, I
>> found that ncurses no longer builds.
>>
>> I reported an error earlier with foss-flags.inc which has %{CPPFLAGS_}
>> includes
>> %{_DEFINES_C} which has things like -xpg6, which tend to botch up C++
>> compiles when they include ${CPPFLAGS} in their CXXFLAGS.
>>
>> This is the entry from foss-flags.inc for _DEFINES_C:
>> # These are defines for C compiles only
>> %define _DEFINES_C ? ? ? -D_XOPEN_SOURCE=600 -D_XPG6
>> -D_POSIX_C_SOURCE=200112L -D__XOPEN_OR_POSIX -D_STRICT_STDC -D_STR
>> ICT_STDC__ -D_STDC_C99 -D_ISOC99_SOURCE
>>
>> That's exactly what happened with ?the ncurses c++ module.
>>
>> Applying this patch allows ncurses to build correctly on both
>> 32-bit and 64-bit "intel/amd" systems.
>>
>> I tried to work around the issue by removing the %_DEFINES_C flags
>> from %CPPFLAGS, which worked correctly in the configure section,
>> and duplicated it in the %build section, but it still failed to compile.
>>
>> I would assume that impact to C++ modules is 0, since anything
>> that is already building is either not including CPPFLAGS or
>> has reset CPPFLAGS so that this wont' be an issue. The only thing
>
>> that may be a little suspect now is compiling test programs that
>> don't include CFLAGS.
>
> I'd be afraid there are some instances of this. However I can see you
> commited it already, so we'll find out :-)
Given that I built approximately 140 FOSS packages with those flags,
I have a pretty high confidence level that there won't be much fallout.
Anyway, any module that needs %_DEFINES_C can add them to
CPPFLAGS, if the fact they are now in CFLAGS_ doesn't help.
I tried some interesting techniques to remove %_DEFINES_C from
the CPPFLAGS (which according to FOSSncurses.log did what
it was supposed to), but somewhere else was hiding those flags
which caused the fail to compile.
Ben