Opened 4 years ago

Closed 4 years ago

#59551 closed defect (fixed)

dvisvgm @2.8 does not build on PPC Leopard, Mac OS X 10.5.8, because "'hypot' is not a member of 'std'' and "'lround' is not a member of 'std'"

Reported by: ballapete (Peter "Pete" Dyballa) Owned by: kencu (Ken)
Priority: Normal Milestone:
Component: ports Version: 2.6.2
Keywords: leopard Cc: michaelld@…
Port: dvisvgm

Description

libtool: compile:  /opt/local/bin/g++-mp-6 -std=gnu++11 -DHAVE_CONFIG_H -I. -I../.. -I/opt/local/include -I../../libs/variant/include -pipe -Os -D_GLIBCXX_USE_CXX11_ABI=0 -arch ppc -MT RedundantElementRemover.lo -MD -MP -MF .deps/RedundantElementRemover.Tpo -c RedundantElementRemover.cpp -o RedundantElementRemover.o >/dev/null 2>&1
depbase=`echo SVGOptimizer.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`;\
	/bin/sh ../../libtool  --tag=CXX   --mode=compile /opt/local/bin/g++-mp-6 -std=gnu++11 -DHAVE_CONFIG_H -I. -I../..   -I/opt/local/include -I../../libs/variant/include -pipe -Os -D_GLIBCXX_USE_CXX11_ABI=0 -arch ppc -MT SVGOptimizer.lo -MD -MP -MF $depbase.Tpo -c -o SVGOptimizer.lo SVGOptimizer.cpp &&\
	mv -f $depbase.Tpo $depbase.Plo
libtool: compile:  /opt/local/bin/g++-mp-6 -std=gnu++11 -DHAVE_CONFIG_H -I. -I../.. -I/opt/local/include -I../../libs/variant/include -pipe -Os -D_GLIBCXX_USE_CXX11_ABI=0 -arch ppc -MT SVGOptimizer.lo -MD -MP -MF .deps/SVGOptimizer.Tpo -c SVGOptimizer.cpp  -fno-common -DPIC -o .libs/SVGOptimizer.o
In file included from ../BoundingBox.hpp:30:0,
                 from ../GraphicsPath.hpp:29,
                 from ../Glyph.hpp:24,
                 from ../GFGlyphTracer.hpp:27,
                 from ../FontWriter.hpp:28,
                 from ../SVGTree.hpp:30,
                 from SVGOptimizer.cpp:25:
../Pair.hpp: In member function 'double Pair<T>::length() const':
../Pair.hpp:43:50: error: 'hypot' is not a member of 'std'
   double length () const                 {return std::hypot(_x, _y);}
                                                  ^~~
../Pair.hpp:43:50: note: suggested alternative:
In file included from /usr/include/math.h:26:0,
                 from /opt/local/include/gcc6/c++/cmath:45,
                 from /opt/local/include/gcc6/c++/valarray:37,
                 from ../Color.hpp:25,
                 from ../SVGTree.hpp:29,
                 from SVGOptimizer.cpp:25:
/usr/include/architecture/ppc/math.h:464:15: note:   'hypot'
 extern double hypot( double, double );
               ^~~~~
In file included from ../BoundingBox.hpp:30:0,
                 from ../GraphicsPath.hpp:29,
                 from ../Glyph.hpp:24,
                 from ../GFGlyphTracer.hpp:27,
                 from ../FontWriter.hpp:28,
                 from ../SVGTree.hpp:30,
                 from SVGOptimizer.cpp:25:
../Pair.hpp: In function 'DPair round(const DPair&)':
../Pair.hpp:82:15: error: 'lround' is not a member of 'std'
  return DPair(std::lround(p.x()), std::lround(p.y()));
               ^~~
../Pair.hpp:82:15: note: suggested alternative:
In file included from /usr/include/math.h:26:0,
                 from /opt/local/include/gcc6/c++/cmath:45,
                 from /opt/local/include/gcc6/c++/valarray:37,
                 from ../Color.hpp:25,
                 from ../SVGTree.hpp:29,
                 from SVGOptimizer.cpp:25:
/usr/include/architecture/ppc/math.h:503:17: note:   'lround'
 extern long int lround( double );
                 ^~~~~~
In file included from ../BoundingBox.hpp:30:0,
                 from ../GraphicsPath.hpp:29,
                 from ../Glyph.hpp:24,
                 from ../GFGlyphTracer.hpp:27,
                 from ../FontWriter.hpp:28,
                 from ../SVGTree.hpp:30,
                 from SVGOptimizer.cpp:25:
../Pair.hpp:82:35: error: 'lround' is not a member of 'std'
  return DPair(std::lround(p.x()), std::lround(p.y()));
                                   ^~~
../Pair.hpp:82:35: note: suggested alternative:
In file included from /usr/include/math.h:26:0,
                 from /opt/local/include/gcc6/c++/cmath:45,
                 from /opt/local/include/gcc6/c++/valarray:37,
                 from ../Color.hpp:25,
                 from ../SVGTree.hpp:29,
                 from SVGOptimizer.cpp:25:
/usr/include/architecture/ppc/math.h:503:17: note:   'lround'
 extern long int lround( double );
                 ^~~~~~
make[3]: *** [SVGOptimizer.lo] Error 1
make[3]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_graphics_dvisvgm/dvisvgm/work/mgieseki-dvisvgm-9ef67e7/src/optimizer'
make[2]: *** [all-recursive] Error 1

Dunno what this means…

Attachments (1)

main.log (62.9 KB) - added by ballapete (Peter "Pete" Dyballa) 4 years ago.
Main.log from PPC Leopard

Download all attachments as: .zip

Change History (4)

Changed 4 years ago by ballapete (Peter "Pete" Dyballa)

Attachment: main.log added

Main.log from PPC Leopard

comment:1 Changed 4 years ago by ballapete (Peter "Pete" Dyballa)

It builds with configure.compiler=macports-gcc-7.

comment:2 Changed 4 years ago by kencu (Ken)

yes, all the c++11 math fixes were backported into gcc7, but not into gcc6. There is another ticket where Riccardo has backported the c++11 math fixes into older gcc versions, so far never committed.

comment:3 Changed 4 years ago by kencu (Ken)

Owner: set to kencu
Resolution: fixed
Status: newclosed

In 36c3e009699df53e255b013df3bad2c6793008a2/macports-ports (master):

dvisvgm: use compiler.cxx_standard

this is the current recommendation
and fixes the build with gcc as well

closes: #59551

Note: See TracTickets for help on using tickets.