ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A
Ask Your Question

build ROS package with ICC or link ICC compiled file to package

asked 2013-06-30 17:41:44 -0500

canatan gravatar image

updated 2014-04-20 14:09:49 -0500

ngrennan gravatar image

Hi I made a custom ros package that i'm trying to build using the intel compiler. I followed the instructions in the wiki rosbuild (6.1) but that doesn't seem to work. I'm new to cmake and makelists and ros too.

If I include the compiler code at the beginning of the file then I get a boost error otherwise it just seems to loop over and over.

I also tried running make in the package folder. I've pasted part of the errors here.

/usr/include/boost/math/policies/policy.hpp(388): error: nontype "boost::math::policies::detail::is_valid_policy<t>::value [with T=A2]" is not a type name BOOST_STATIC_ASSERT(::boost::math::policies::detail::is_valid_policy<a2>::value); ^<="" p="">

/usr/include/boost/math/policies/policy.hpp(388): error: expected a type specifier BOOST_STATIC_ASSERT(::boost::math::policies::detail::is_valid_policy<a2>::value); ^<="" p="">

/usr/include/boost/math/policies/policy.hpp(388): error: invalid redeclaration of member function "boost::math::policies::policy<a1, a2,="" a3,="" a4,="" a5,="" a6,="" a7,="" a8,="" a9,="" a10,="" a11,="" a12,="" a13>::static_assert(<error-type="">, <error-type>)" (declared at line 387) BOOST_STATIC_ASSERT(::boost::math::policies::detail::is_valid_policy<a2>::value); ^<="" p="">

What I really need to do is use a function (foo()) that has been compiled with a an intel compiler in my ros package. If I like the .c file for that function is rosbuild_add_executable I'm rebuilding the file with gcc. If I use the enable_language function and link the .s file in rosbuild_add_executable I still get errors.

When linking the .s file I added [code] extern "C" {int foo();} [/code] to my .cpp

I got the following errors then

Building CXX object CMakeFiles/pleaseWork.dir/src/environmentSpecifics.cpp.o Building CXX object CMakeFiles/pleaseWork.dir/src/myDwa.cpp.o Building CXX object CMakeFiles/pleaseWork.dir/src/getRosParameters.cpp.o Building ASM-ATT object CMakeFiles/pleaseWork.dir/src/dwmonitorc.s.o /usr/bin/as: unrecognized option '-OS_PACKAGE_NAME="landshark_dwaICCIntegration"' make[3]: * [CMakeFiles/pleaseWork.dir/src/dwmonitorc.s.o] Error 1

(I'm sorry its called pleaseWork .. I just needed it to work)

What is the best way to go about this. Help please.


edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2013-07-11 05:28:01 -0500

canatan gravatar image

So I ended up generating the .o file using icc and linking it using cmake to link it. I followed which totally worked. replacing add_library with rosbuild_add_library and so on.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2013-06-30 17:41:44 -0500

Seen: 1,462 times

Last updated: Jul 11 '13