Re: Building roadrunner from your salsa branch
Andreas Tille <andreas@an3as.eu> writes:
> /build/libroadrunner-1.5.4/source/rrLogger.cpp: In function ‘Poco::SplitterChannel* rr::getSplitterChannel()’:
> /build/libroadrunner-1.5.4/source/rrLogger.cpp:353:29: error: cannot ‘dynamic_cast’ ‘Poco::Logger::getChannel() const()’ (of type ‘using Ptr = class Poco::AutoPtr<Poco::Channel>’ {aka ‘class Poco::AutoPtr<Poco::Channel>’}) to type ‘class Poco::FormattingChannel*’ (source is not a pointer)
> 353 | FormattingChannel *fc = dynamic_cast<FormattingChannel*>(pocoLogger->getChannel());
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> /build/libroadrunner-1.5.4/source/rrLogger.cpp:355:27: error: cannot ‘dynamic_cast’ ‘Poco::FormattingChannel::getChannel() const()’ (of type ‘using Ptr = class Poco::AutoPtr<Poco:: Channel>’ {aka ‘class Poco::AutoPtr<Poco::Channel>’}) to type ‘class Poco::SplitterChannel*’ (source is not a pointer)
> 355 | SplitterChannel *sc = dynamic_cast<SplitterChannel*>(fc->getChannel());
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> /build/libroadrunner-1.5.4/source/rrLogger.cpp: In function ‘Poco::PatternFormatter* rr::getPatternFormatter()’:
> /build/libroadrunner-1.5.4/source/rrLogger.cpp:363:29: error: cannot ‘dynamic_cast’ ‘Poco::Logger::getChannel() const()’ (of type ‘using Ptr = class Poco::AutoPtr<Poco::Channel>’ {aka ‘class Poco::AutoPtr<Poco::Channel>’}) to type ‘class Poco::FormattingChannel*’ (source is not a pointer)
> 363 | FormattingChannel *fc = dynamic_cast<FormattingChannel*>(pocoLogger->getChannel());
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> /build/libroadrunner-1.5.4/source/rrLogger.cpp:365:28: error: cannot ‘dynamic_cast’ ‘Poco::FormattingChannel::getFormatter() const()’ (of type ‘using Ptr = class Poco::AutoPtr<Poco:: Formatter>’ {aka ‘class Poco::AutoPtr<Poco::Formatter>’}) to type ‘class Poco::PatternFormatter*’ (source is not a pointer)
> 365 | PatternFormatter *pf = dynamic_cast<PatternFormatter*>(fc->getFormatter());
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
It looks like appending .get() to these getChannel() and getFormatter()
calls, as in
SplitterChannel *sc = dynamic_cast<SplitterChannel*>(fc->getChannel().get());
should take care of the immediate problem. (I'm not specifically
familiar with either poco or roadrunner, but this is a common C++
pattern.)
--
Aaron M. Ucko, KB1CJC (amu at alum.mit.edu, ucko at debian.org)
http://www.mit.edu/~amu/ | http://stuff.mit.edu/cgi/finger/?amu@monk.mit.edu
Reply to: