std::log2 not in c++11 on 10.6 BuiltBot?

Michael Dickens michaelld at macports.org
Wed Apr 22 16:39:53 PDT 2015


Interesting; the macro is actually "_GLIBCXX_USE_C99_MATH_TR1", with
just 1 preceding "_"; at least on my 10.8 & 10.10 installs.

This macro is set at
"/opt/local/include/gcc49/c++/x86_64-apple-darwin12/bits/c++config.h:1276"
on my install, which is part of the configuration of GCC. So, I'd guess
this macro is not set on the 10.6 build of GCC49. No idea why not.
Oddly, the comment for this macro is:
{{{
/* Define if C99 functions or macros in <math.h> should be imported in
<tr1/cmath> in namespace std::tr1. */
}}}
but it is clearly used in /opt/local/include/gcc49/c++/cmath to
determine whether most of the math functions from math.h are declared in
std:: or not (not just std::tr1::). There's also c++/tr1/cmath, which to
a high degree replicated the functionality of c++/cmath but for
std::tr1::.

Quite odd!

Anyway, I think I'll just ignore this issue since it's only on 10.6 &
nobody has complained about it ;) - MLD

On Wed, Apr 22, 2015, at 05:27 PM, Mihai Moldovan wrote:
> I can reproduce your problem in my 10.6 VM.
> 
> std::log2() is only defined if the internal macro __GLIBCXX_USE_C99_MATH_TR1 is defined.
> 
> This is not true for 10.6 (but for instance for 10.9.)
> 
> I do not know off-hand why this is not the case on 10.6. Maybe Google can help you to determine how/when this gets set?


More information about the macports-dev mailing list