Opened 5 years ago

Closed 5 years ago

#57887 closed defect (fixed)

povray @3.7.0.8: error: no member named 'shared_ptr' in namespace 'std'

Reported by: ryandesign (Ryan Carsten Schmidt) Owned by: ryandesign (Ryan Carsten Schmidt)
Priority: Normal Milestone:
Component: ports Version:
Keywords: mountainlion lion snowleopard leopard tiger Cc:
Port: povray

Description

povray @3.7.0.8 fails to build on Mountain Lion and earlier with libstdc++:

	/usr/bin/clang++ -DHAVE_CONFIG_H -I. -I..  -I.. -I../source/backend -I../source/base -I../source/frontend -I../unix -I../vfe -I../vfe/unix -I/opt/local/include/SDL -D_GNU_SOURCE=1 -D_THREAD_SAFE -D_THREAD_SAFE -I/opt/local/include/OpenEXR -I/opt/local/lib/../include -I/opt/local/lib/../include -I/opt/local/lib/../include -I/opt/local/lib/../include -I/opt/local/include -pthread -I/opt/local/include  -I/usr/include  -pipe -Wno-multichar -Wno-write-strings -O3 -ffast-math -march=native -pipe -Os -stdlib=libstdc++ -arch x86_64 -D_THREAD_SAFE -MT backend/colour/colour.o -MD -MP -MF $depbase.Tpo -c -o backend/colour/colour.o backend/colour/colour.cpp &&\
	mv -f $depbase.Tpo $depbase.Po
In file included from pov_mem.cpp:36:
In file included from ./backend/frame.h:53:
In file included from ./base/configbase.h:40:
In file included from ../vfe/unix/syspovconfigbase.h:35:
../vfe/unix/syspovconfig.h:101:26: error: no member named 'shared_ptr' in namespace 'std'
using POV_TR1_NAMESPACE::shared_ptr;
      ~~~~~~~~~~~~~~~~~~~^

In vfe/unix/syspovconfig.h it says:

#include <boost/version.hpp>
#if BOOST_VERSION < 106500
    // Pulling in smart pointers is easy with Boost versions prior to 1.65.0, with the
    // `boost/tr1/*.hpp` set of headers simply pulling in whatever is available (C++11, TR1 or
    // boost's own implementation) and making it available in the `std::tr1` namespace.
    #include <boost/tr1/memory.hpp>
    #define POV_TR1_NAMESPACE std::tr1
#else
    // With `boost/tr1/*.hpp` unavailable, we're currently blindly relying on the compiler to
    // be compliant with C++11.
    #include <memory>
    #define POV_TR1_NAMESPACE std
#endif

MacPorts currently has boost 1.66.0, so I required a C++11-capable compiler, but the build still fails with macports-libstdc++ (there are some overlapping lines due to parallel building):

	/opt/local/bin/clang++-mp-5.0 -DHAVE_CONFIG_H -I. -I..  -I.. -I../source/backend -I../source/base -I../source/frontend -I../unix -I../vfe -I../vfe/unix -I/opt/local/include/SDL -D_GNU_SOURCE=1 -D_THREAD_SAFE -D_THREAD_SAFE -I/opt/local/include/OpenEXR -I/opt/local/lib/../include -I/opt/local/lib/../include -I/opt/local/lib/../include -I/opt/local/lib/../include -I/opt/local/include -pthread -I/opt/local/include  -I/usr/include  -pipe -Wno-multichar -Wno-write-strings -O3 -ffast-math -march=native -pipe -Os -D_GLIBCXX_USE_CXX11_ABI=0 -stdlib=macports-libstdc++ -arch x86_64 -D_THREAD_SAFE -MT backend/colour/colour.o -MD -MP -MF $depbase.Tpo -c -o backend/colour/colour.o backend/colour/colour.cpp &&\
	mv -f $depbase.Tpo $depbase.Po
In file included from backend/bounding/bsphere.cpp:35:
In file included from ./backend/frame.h:53:
In file included from ./base/configbase.h:40:
In file included from ../vfe/unix/syspovconfigbase.h:In file included from backend/bounding/bbox.cpp:43:
In file included from ./backend/frame.h:53:
In file included from ./base/configbase.h:40:
In file included from ../vfe/unix/syspovconfigbase.h:35:
../vfe/unix/syspovconfig.h:101:26: error: no member named 'shared_ptr' in namespace 'std'
using POV_TR1_NAMESPACE::shared_ptr;
      ~~~~~~~~~~~~~~~~~~~^

Change History (1)

comment:1 Changed 5 years ago by ryandesign (Ryan Carsten Schmidt)

Owner: set to ryandesign
Resolution: fixed
Status: newclosed

In c8da1380a63b36f8ab7303f5470f0562cb060618/macports-ports (master):

povray: Enable C++11 mode in compiler

Closes: #57887

Note: See TracTickets for help on using tickets.