[MacPorts] #37877: scantailor: build fails with clang
#37877: scantailor: build fails with clang --------------------------+-------------------------------- Reporter: ryandesign@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.1.2 Keywords: | Port: scantailor --------------------------+-------------------------------- Jeremy asked in r102283 how scantailor failed to build with clang. This ticket is to document that failure. The attached log is from Xcode 4.6 on OS X 10.8.2 Mountain Lion. {{{ In file included from /opt/local/var/macports/build/_Users_rschmidt_macports_dports_graphics_scantailor/scantailor/work/scantailor-0.9.11.1/dewarping/DistortionModelBuilder.cpp:21: In file included from /opt/local/var/macports/build/_Users_rschmidt_macports_dports_graphics_scantailor/scantailor/work/scantailor-0.9.11.1/dewarping/CylindricalSurfaceDewarper.h:22: In file included from /opt/local/var/macports/build/_Users_rschmidt_macports_dports_graphics_scantailor/scantailor/work/scantailor-0.9.11.1/math/HomographicTransform.h:23: /opt/local/var/macports/build/_Users_rschmidt_macports_dports_graphics_scantailor/scantailor/work/scantailor-0.9.11.1/math/MatrixCalc.h:127:10: error: calling a private constructor of class 'mcalc::Mat<double>' return mcalc::Mat<T>(&m_alloc, data, rows, cols); ^ /opt/local/var/macports/build/_Users_rschmidt_macports_dports_graphics_scantailor/scantailor/work/scantailor-0.9.11.1/dewarping/DistortionModelBuilder.cpp:516:5: note: in instantiation of member function 'MatrixCalc<double, mcalc::DynamicPoolAllocator<double> >::operator()' requested here mc(&At[0], 2, polyline_size).transWrite(&A[0]); ^ /opt/local/var/macports/build/_Users_rschmidt_macports_dports_graphics_scantailor/scantailor/work/scantailor-0.9.11.1/math/MatrixCalc.h:107:2: note: declared private here Mat(AbstractAllocator<T>* alloc, T const* data, int rows, int cols) ^ 1 error generated. }}} -- Ticket URL: <https://trac.macports.org/ticket/37877> MacPorts <http://www.macports.org/> Ports system for Mac OS
#37877: scantailor: build fails with clang ---------------------------+-------------------------------- Reporter: ryandesign@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.1.2 Resolution: | Keywords: Port: scantailor | ---------------------------+-------------------------------- Comment (by jeremyhu@…): Ok, then this looks like a project bug. Those should probably not be private. -- Ticket URL: <https://trac.macports.org/ticket/37877#comment:1> MacPorts <http://www.macports.org/> Ports system for Mac OS
#37877: scantailor: build fails with clang ---------------------------+----------------------- Reporter: ryandesign@… | Owner: raphael@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.1.2 Resolution: | Keywords: Port: scantailor | ---------------------------+----------------------- Changes (by jmr@…): * owner: macports-tickets@… => raphael@… -- Ticket URL: <https://trac.macports.org/ticket/37877#comment:2> MacPorts <http://www.macports.org/> Ports system for Mac OS
#37877: scantailor: build fails with clang ---------------------------+----------------------- Reporter: ryandesign@… | Owner: raphael@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.1.2 Resolution: | Keywords: Port: scantailor | ---------------------------+----------------------- Comment (by raphael@…): Replying to [comment:1 jeremyhu@…]:
Ok, then this looks like a project bug. Those should probably not be private.
But, there is a friend declaration in class {{{Mat}}} in {{{math/MatrixCalc.h}}}: {{{ template<typename T> class Mat { template<typename OT, typename Alloc> friend class MatrixCalc; [...] private: Mat(AbstractAllocator<T>* alloc, T const* data, int rows, int cols) : alloc(alloc), data(data), rows(rows), cols(cols) {} [...] }; [...] template<typename T, typename Alloc = mcalc::StaticPoolAllocator<T, 128, 9> > class MatrixCalc { [...] public: MatrixCalc() {} mcalc::Mat<T> operator()(T const* data, int rows, int cols) { return mcalc::Mat<T>(&m_alloc, data, rows, cols); } [...] }; }}} This looks OK to me and also to gcc. Is this one of the [http://llvm.org/bugs/buglist.cgi?quicksearch=friend bugs concerning friend declarations in clang]? -- Ticket URL: <https://trac.macports.org/ticket/37877#comment:3> MacPorts <http://www.macports.org/> Ports system for Mac OS
participants (1)
-
MacPorts