[MacPorts] #53226: gcc5 @5.4: error: 'std::log2' has not been declared

MacPorts noreply at macports.org
Fri Jan 6 05:35:58 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):

 there is a slight difference in the way gcc work on 10.5 PPC, it appears.

 On PPC, it works OK if you just leave the std:: part off:

 {{{
 #include <cmath>
 #include <stdio.h>
 int main(int argc, char* argv[])
 {
     int i = 1000;
     double b = log2(i);
     printf("%f \n",b);

     double d = log2(2.3456789f);
     printf("%f \n",d);
     return 0;
 }

 }}}

 {{{
 $ g++ -std=c++11 math.cxx -o math
 LeopardG5:mathtest $ ./math
 9.965784
 1.230005
 }}}

 The same code on the intel machine I'm using to compare works with the
 std:: part on or off.

 Right at the moment, I don't have gcc installed on my 10.5 intel machine
 to see if it's a 10.5 difference or an intel/ppc difference.

--
Ticket URL: <https://trac.macports.org/ticket/53226#comment:3>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list