Boost logo

Boost :

Subject: [boost] Problem with boost::function on BlackBerry10
From: Jens Weller (JensWeller_at_[hidden])
Date: 2013-08-20 16:38:40


Hi boost Community,

I've got a little problem with getting boost::function to run on BlackBerry10.
So far, I was able to compile, link and run successfully when I do comment out some stuff in boost.
Surely not the right way to do it, but proves to me that those lines are the problem, I'm looking for a fix, maybe a define I need to add to let this compile without changing boost headers.

In total its only 3 errors, where 2 boil down to the same macro:
/home/jweller/cpp/libraries/boost_1_54_0/boost/type_traits/detail/cv_traits_impl.hpp:25: Parenthesis/brace mismatch between #if and #else branches; using #if branch
/home/jweller/cpp/libraries/boost_1_54_0/boost/type_traits/detail/cv_traits_impl.hpp:93: Excess closing brace in C++ code (or abuse of the C++ preprocessor)
/home/jweller/cpp/libraries/boost_1_54_0/boost/type_traits/msvc/typeof.hpp:43: Ignoring definition of undeclared qualified class

These two are in cv_traits_impl.hpp in boost/type_traits/detail/, caused by this line:

#if !(BOOST_WORKAROUND(__GNUC__,== 3) && BOOST_WORKAROUND(__GNUC_MINOR__, <= 2))

This line is twice in this fiel, hence the 2 errors. qcc version is gcc 4.6.3.
It looks to me like BOOST_WORKAROUND isn't doing the right thing here to me.

The 2nd error is more strange.
/home/jweller/cpp/libraries/boost_1_54_0/boost/type_traits/msvc/typeof.hpp:43: Ignoring definition of undeclared qualified class

Somehow typeof.hpp of msvc is getting pulled in.

I've tried also the from BlackBerry provided boost version from https://github.com/blackberry/Boost, which shows exact the same errors. And is the one I (cruely) patched currently. Commenting out the #if !(is < 3.2) resolves the problem, but msvc is still pulled in.
Also commenting in this header the cause out lets it compile, but thats nothing then a bad workaround.
Currently I have only build for the simulator, but the problem is most likely also existing for the device build chain.

At least the first two errors might be caused by BOOST_WORKAROUND, maybe there is a value that isn't configured correctly on this platform. Also how do I get closer to the source of the msvc code being dragged in?

So, question is, is there maybe a define to help boost getting digested by the qcc toolchain?

kind regards,

Jens Weller


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk