Error when compiling DUNE with Boost libraries for BeagleBone Black

52 views
Skip to first unread message

Vegard Grindheim

unread,
Oct 29, 2014, 10:21:52 AM10/29/14
to lsts-to...@googlegroups.com
Hi,

I'm getting an error when cross compiling DUNE for BeagleBone Black. The error arises when i include "boost/numeric/odeint.hpp". On the contrary, I may include "boost/bind.hpp" and it will still cross compile. I have not tried cross compiling with other parts of boost. DUNE with boost can compile on local machine (not cross compiling).

This is the error report:
******************************************************************
In file included from /home/vegag/dune/glued/lctr-b2xx/toolchain/armv7-lsts-linux-gnueabi/sysroot/usr/include/boost/math/special_functions/gamma.hpp:32:0,
                 from /home/vegag/dune/glued/lctr-b2xx/toolchain/armv7-lsts-linux-gnueabi/sysroot/usr/include/boost/math/special_functions/factorials.hpp:13,
                 from /home/vegag/dune/glued/lctr-b2xx/toolchain/armv7-lsts-linux-gnueabi/sysroot/usr/include/boost/math/special_functions/binomial.hpp:13,
                 from /home/vegag/dune/glued/lctr-b2xx/toolchain/armv7-lsts-linux-gnueabi/sysroot/usr/include/boost/numeric/odeint/stepper/bulirsch_stoer_dense_out.hpp:30,
                 from /home/vegag/dune/glued/lctr-b2xx/toolchain/armv7-lsts-linux-gnueabi/sysroot/usr/include/boost/numeric/odeint.hpp:45,
                 from /home/vegag/dune/dune/user/src/PrecisionAirdrop/vegardTest/Task.cpp:31:
/home/vegag/dune/glued/lctr-b2xx/toolchain/armv7-lsts-linux-gnueabi/sysroot/usr/include/boost/math/policies/error_handling.hpp: In function 'void boost::math::policies::detail::raise_error(const char*, const char*)':
/home/vegag/dune/glued/lctr-b2xx/toolchain/armv7-lsts-linux-gnueabi/sysroot/usr/include/boost/math/policies/error_handling.hpp:90:45: error: cannot use typeid with -fno-rtti
   msg += (boost::format(function) % typeid(T).name()).str();
                                             ^
/home/vegag/dune/glued/lctr-b2xx/toolchain/armv7-lsts-linux-gnueabi/sysroot/usr/include/boost/math/policies/error_handling.hpp: In function 'void boost::math::policies::detail::raise_error(const char*, const char*, const T&)':
/home/vegag/dune/glued/lctr-b2xx/toolchain/armv7-lsts-linux-gnueabi/sysroot/usr/include/boost/math/policies/error_handling.hpp:107:45: error: cannot use typeid with -fno-rtti
   msg += (boost::format(function) % typeid(T).name()).str();
                                             ^
make[2]: *** [CMakeFiles/PrecisionAirdrop.vegardTest.dir/user/src/PrecisionAirdrop/vegardTest/Task.cpp.o] Error 1
make[1]: *** [CMakeFiles/PrecisionAirdrop.vegardTest.dir/all] Error 2
make: *** [all] Error 2
******************************************************************

Sincerely,

-Vegard Grindheim

Ricardo Martins

unread,
Oct 29, 2014, 10:27:21 AM10/29/14
to Vegard Grindheim, lsts-to...@googlegroups.com
Hi,

By default we compile DUNE with RTTI disabled. But see commit 7b0abd8b03c3a2d175f44e1fedfb9d55ee2a2edf, you can now enable RTTI by running cmake like this:

cmake -DRTTI=1

and recompile.

--
You received this message because you are subscribed to the Google Groups "LSTS Toolchain" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lsts-toolchai...@googlegroups.com.
Visit this group at http://groups.google.com/group/lsts-toolchain.
To view this discussion on the web visit https://groups.google.com/d/msgid/lsts-toolchain/9167c02d-31ed-4f96-8579-b688815889fc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Message has been deleted

Vegard Grindheim

unread,
Oct 29, 2014, 12:15:37 PM10/29/14
to lsts-to...@googlegroups.com, vegard.g...@gmail.com
I tried it, but can't figure what the correct combination is. I made a new folder and ran:

cmake -DRTTI=1

Then:

cmake -DCROSS=/home/vegag/dune/glued/lctr-b2xx/toolchain/bin/armv7-lsts-linux-gnueabi ../dune

But it was just compiled for the local machine.

I also tried

cmake -DCROSS=/home/vegag/dune/glued/lctr-b2xx/toolchain/bin/armv7-lsts-linux-gnueabi ../dune -DRTTI=1

cmake -DRTTI=1 -DCROSS=/home/vegag/dune/glued/lctr-b2xx/toolchain/bin/armv7-lsts-linux-gnueabi ../dune

cmake -DRTTI=1-DCROSS=/home/vegag/dune/glued/lctr-b2xx/toolchain/bin/armv7-lsts-linux-gnueabi ../dune

and all other combinations i could think of. None worked.

Can you please specify how to use the -DRTTI?

Ricardo Martins

unread,
Oct 29, 2014, 12:26:58 PM10/29/14
to Vegard Grindheim, lsts-to...@googlegroups.com
I don't have much time to look at this in detail, but cmake -DRTTI=1 -DCROSS=/home/vegag/dune/glued/lctr-b2xx/toolchain/bin/armv7-lsts-linux-gnueabi ../dune should work. Anyway, I reverted the logic in commit b192b69c77f6d35635c354e1e21e8531652ccf9e. Now we compile with RTTI and the option NO_RTTI disables that.

Regards,
Ricardo

Reply all
Reply to author
Forward
0 new messages