[MacPorts] #53226: gcc5 @5.4: error: 'std::log2' has not been declared
MacPorts
noreply at macports.org
Fri Jan 6 21:26:03 UTC 2017
#53226: gcc5 @5.4: error: 'std::log2' has not been declared
-----------------------+----------------------
Reporter: noloader | Owner: mww@…
Type: defect | Status: assigned
Priority: Normal | Milestone:
Component: ports | Version: 2.3.5
Resolution: | Keywords: powerpc
Port: gcc5 |
-----------------------+----------------------
Comment (by kencu):
some more data - from an Intel 10.5 machine. Same issue on the Intel
machine, and also same issue with clang++. So it's looking more like a
10.5 issue than anything else, at the moment - not specific to gcc, and
not specific to PPC. The `llrint` missing definitions you noted are a
recognized issue with systems < 10.7, btw, see
<https://github.com/jeremyhu/libcxx/commit/720feba4874d4ca3131753dc31af127e3c509c36>
{{{
$ cat math.cxx
#include <cmath>
#include <stdio.h>
int main(int argc, char* argv[])
{
int i = 1000;
double b = std::log2(i);
printf("%f \n",b);
double d = std::log2(2.3456789f);
printf("%f \n",d);
return 0;
}
}}}
{{{
$ g++ --version
i686-apple-darwin9-llvm-g++-4.2 (GCC) 4.2.1 (Based on Apple Inc. build
5555) (LLVM build 2064.3)
Copyright (C) 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE.
}}}
{{{
$ g++ -o math.intel math.cxx
math.cxx: In function ‘int main(int, char**)’:
math.cxx:6: error: ‘log2’ is not a member of ‘std’
math.cxx:9: error: ‘log2’ is not a member of ‘std’
}}}
{{{
$ clang++ --version
clang version 3.7.1 (tags/RELEASE_371/final)
Target: i686-apple-darwin9.8.0
Thread model: posix
}}}
{{{
$ clang++ -o math.intel math.cxx
math.cxx:6:16: error: no member named 'log2' in namespace 'std'; did you
mean simply 'log2'?
double b = std::log2(i);
^~~~~~~~~
log2
/usr/include/architecture/i386/math.h:316:15: note: 'log2' declared here
extern double log2 ( double );
^
math.cxx:9:16: error: no member named 'log2' in namespace 'std'; did you
mean simply 'log2'?
double d = std::log2(2.3456789f);
^~~~~~~~~
log2
/usr/include/architecture/i386/math.h:316:15: note: 'log2' declared here
extern double log2 ( double );
^
}}}
--
Ticket URL: <https://trac.macports.org/ticket/53226#comment:5>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list