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

Michael Dickens michaelld at macports.org
Wed Apr 22 13:39:40 PDT 2015


Yes, the code includes cmathv (indirectly). This code works on the other
buildbots; just not on the 10.6 one. Is 10.6's GCC 4.9 special somehow?
Maybe I need to include cmath directly? - MLD

Here's more info from the compiler, just FYI:
{{{
FILE.cc:46:54: note: suggested alternative:
In file included from /usr/include/math.h:28:0,
                 from /opt/local/include/gcc49/c++/cmath:44,
                 from /opt/local/include/gcc49/c++/random:38,
                 from /opt/local/include/gcc49/c++/bits/stl_algo.h:66,
                 from /opt/local/include/gcc49/c++/algorithm:62,
                 from
                 /opt/local/include/boost/smart_ptr/shared_ptr.hpp:37,
                 from /opt/local/include/boost/shared_ptr.hpp:17,
                 from /opt/local/include/gnuradio/types.h:27,
                 from /opt/local/include/gnuradio/runtime_types.h:27,
                 from /opt/local/include/gnuradio/io_signature.h:27,
                 from FILE.cc:25:
/usr/include/architecture/i386/math.h:307:15: note: "log2";
 extern double log2 ( double );
}}}
On Wed, Apr 22, 2015, at 04:02 PM, Mihai Moldovan wrote:
> On 22.04.2015 09:51 PM, Michael Dickens wrote:
> > One of my ports won't build on the 10.6 buildbot, because it claims the
> > following (snipped for brevity):
> > {{{
> > /opt/local/bin/g++-mp-4.9 [snip] -std=c++11 -o FILE.cc.o -c FILE.cc
> > FILE.cc: In constructor "FILE(std::vector<std::vector<float> >)":
> > FILE.cc:46:54: error: "log2" is not a member of "std"
> >                (unsigned)(((float)chip_seq[0].size())/std::log2((float)chip_seq.size()))),
> > }}}
> > 
> > According to every source I've found, std::log2 should exist in c++11 --
> > not before this, but as of c++11. The compiler goes on to suggest using
> > just "double log2(double)"; whatever.
> > 
> > Anybody know what's going on here?
> 
> Is the code including cmath?


More information about the macports-dev mailing list