error compiling c++ sample - old creepy gcc bug spotted
dragonflybsd at marino.st
Tue Aug 12 03:44:54 PDT 2014
On 8/12/2014 11:09, Markus Pfeiffer wrote:
> On Tue, Aug 12, 2014 at 12:17:44AM +0200, John Marino wrote:
>> On 8/11/2014 23:39, Volodymyr Kostyrko wrote:
>>> Hi all.
>>> There goes a reduced test case that compiles smoothly on FreeBSD
>>> 10/CentOS 6 but fails on DragonFly 3.8.1 / master:
>>> #include <string>
>>> int main()
>>> return 0;
>>> The problem is described at
>>> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52015 and it states that
>>> this is due defining _GLIBCXX_HAVE_BROKEN_VSWPRINTF somewhere. But I
>>> can't find where it can be defined in /usr/src. Can someone help me
>>> debug this issue?
>> grok.dragonflybsd.org says it's not defined in /usr/src. I didn't see
>> it recursively in /usr/src/gnu either.
> This is due to the fact that _GLIBCXX_HAVE_BROKEN_VSWPRINTF is not defined.
> The reason why this doesn't work is a different one: Looking in
> /usr/include/c++/4.7/bits/basic_string.h we find the following ifdef guard:
> #if (defined(__GXX_EXPERIMENTAL_CXX0X__) && defined(_GLIBCXX_USE_C99) \
> && !defined(_GLIBCXX_HAVE_BROKEN_VSWPRINTF))
> A quick test program revals that _GLIBCXX_USE_C99 is not set. This is due to
> os_defines.h not enabling it, so as far as I can tell, yes it's a compiler
> configuration issue, just not the one mentioned in the above mentioned bug
I don't think we have all the prequisites to define _GLIBCXX_USE_C99
yet. Or at least we didn't. I guess we could try again. We are due to
import gcc 4.7.4 anyway.
More information about the Users