gcc 5 C++ string issue

Orion Poplawski orion at cora.nwra.com
Wed Feb 25 16:29:58 UTC 2015


On 02/25/2015 09:04 AM, Petr Machata wrote:
> Orion Poplawski <orion at cora.nwra.com> writes:
> 
>> On 02/24/2015 05:22 PM, Kevin Kofler wrote:
>>> Orion Poplawski wrote:
>>>> Getting:
>>>>
>>>> /builddir/build/BUILD/mrpt-1.0.2/libs/base/include/mrpt/utils/mrpt_macros.h:296:150:
>>>> error: no match for 'operator<<' (operand types are
>>>> 'std::basic_ostream<char>' and 'std::ostringstream {aka
>>>> std::__cxx11::basic_ostringstream<char>}')
>>>>    #define ASSERT_NOT_EQUAL_( __A, __B)  { if (__A==__B) {
>>>>    #std::ostringstream
>>>> s;s<<"ASSERT_NOT_EQUAL_("<<#__A<<","<<#__B<<") failed with\n"<<#__A<<"="
>>>> <<__A <<"\n"<<#__B<<"="<<__B; THROW_EXCEPTION(s.str()) } }
>>>>
>>>>
>>>> Any idea what wrong here?
> 
> The following patch fixes the compilation issue:
> 
> diff -up mrpt-1.0.2/libs/hwdrivers/src/CImpinjRFID.cpp\~ mrpt-1.0.2/libs/hwdrivers/src/CImpinjRFID.cpp
> --- mrpt-1.0.2/libs/hwdrivers/src/CImpinjRFID.cpp~	2013-01-05 00:23:15.000000000 +0100
> +++ mrpt-1.0.2/libs/hwdrivers/src/CImpinjRFID.cpp	2015-02-25 16:55:48.628178380 +0100
> @@ -97,7 +97,7 @@ void CImpinjRFID::startDriver()
>  
>  	const int ret = ::system(cmdline.str().c_str());
>  	if (0!=ret)
> -		std::cerr << "[CImpinjRFID::startDriver] Error ("<< ret << ") invoking command:\n" << cmdline << std::endl;
> +		std::cerr << "[CImpinjRFID::startDriver] Error ("<< ret << ") invoking command:\n" << cmdline.str() << std::endl;
>  
>  	system::exitThread();  // JL->Emil: Really needed? If not, just remove...
>  }
> 
> I don't know why this stopped working, but it never did the intended
> thing as written anyway.

I see now that this was fixed upstream a while back -
https://github.com/jlblancoc/mrpt/commit/0b92b07314e990f61c8b24c475a9a66a45559019

It appears that the Fedora version of mrpt is quite out of date as 1.3.0 is
available - https://bugzilla.redhat.com/show_bug.cgi?id=1196299
> 
> With this out of the way, I'm getting a bunch of the following:
> 
> ../../lib/libmrpt-maps.so.1.0.2: undefined reference to `pcl::PCDWriter::setLockingPermissions(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, boost::interprocess::file_lock&)'
> 
> So pcl should be rebuilt for new ABI it seems.

Yup.
> 
> Thanks,
> Petr
> 

Thank you!

-- 
Orion Poplawski
Technical Manager                     303-415-9701 x222
NWRA, Boulder/CoRA Office             FAX: 303-415-9702
3380 Mitchell Lane                       orion at nwra.com
Boulder, CO 80301                   http://www.nwra.com


More information about the devel mailing list