NTL 8.x introduces a new class, NTL::WrappedPtr. Unfortunately, Cython does not add a namespace identifier to the name of the existing WrappedPtr class, generated from the patched files below, resulting in ambiguous references to that name. This patch simply changes the name of the existing class to avoid the name collision. diff -up src/sage/libs/polybori/decl.pxd.orig src/sage/libs/polybori/decl.pxd --- src/sage/libs/polybori/decl.pxd.orig 2015-10-11 18:10:28.994844062 -0300 +++ src/sage/libs/polybori/decl.pxd 2015-10-11 18:11:16.004845863 -0300 @@ -289,10 +289,10 @@ cdef extern from "sage/libs/polybori/pb_ int (* size)() PBPolyEntry (* get "operator[]")(int) - ctypedef struct PBFglmStrategy "PBWrappedPtr": + ctypedef struct PBFglmStrategy "WrappedPointer": PBPolyVector (* main "operator->()->main")() - PBFglmStrategy PBFglmStrategy_Constructor "PBWrappedPtr" \ + PBFglmStrategy PBFglmStrategy_Constructor "WrappedPointer" \ (PBRing from_ring, PBRing to_ring, PBPolyVector vec) cdef cppclass PBGBStrategy "GroebnerStrategy": diff -up src/sage/libs/polybori/pb_wrap.h.orig src/sage/libs/polybori/pb_wrap.h --- src/sage/libs/polybori/pb_wrap.h.orig 2015-10-11 18:10:35.738844321 -0300 +++ src/sage/libs/polybori/pb_wrap.h 2015-10-11 18:12:42.724849183 -0300 @@ -177,23 +177,23 @@ PyObject* preallocated_to_PyString(const template -class PBWrappedPtr: +class WrappedPointer: public boost::shared_ptr { - typedef PBWrappedPtr self; + typedef WrappedPointer self; typedef boost::shared_ptr base; public: - PBWrappedPtr(): base() {} - PBWrappedPtr(const self& rhs): base(rhs) {} + WrappedPointer(): base() {} + WrappedPointer(const self& rhs): base(rhs) {} template - PBWrappedPtr(const T1& arg): base(new Type(arg)) {} + WrappedPointer(const T1& arg): base(new Type(arg)) {} template - PBWrappedPtr(const T1& arg1, const T2& arg2): base(new Type(arg1, arg2)) {} + WrappedPointer(const T1& arg1, const T2& arg2): base(new Type(arg1, arg2)) {} template - PBWrappedPtr(const T1& arg1, const T2& arg2, const T3& arg3): + WrappedPointer(const T1& arg1, const T2& arg2, const T3& arg3): base(new Type(arg1, arg2, arg3)) {} operator Type&() { return base::operator*();}