<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">
<br class="">
<div><br class="">
<blockquote type="cite" class="">
<div class="">On 31 Jan 2020, at 11:59, M. Dodson <<a href="mailto:md403@cam.ac.uk" class="">md403@cam.ac.uk</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">
<br class="">
<div class=""><br class="">
<blockquote type="cite" class="">
<div class="">On 30 Jan 2020, at 22:46, Chris Johns <<a href="mailto:chrisj@rtems.org" class="">chrisj@rtems.org</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class=""><span style="caret-color: rgb(0, 0, 0); font-family: Menlo-Regular; font-size: 11px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">On
 31/1/20 3:12 am, M. Dodson wrote:</span><br style="caret-color: rgb(0, 0, 0); font-family: Menlo-Regular; font-size: 11px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class="">
<blockquote type="cite" style="font-family: Menlo-Regular; font-size: 11px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none;" class="">
*** I am hitting the mailing list with two questions because I’m not sure<br class="">
they’re sufficiently related to be in the same email.  Much of this information<br class="">
will be the identical between them, but the traces will be different.  ***<br class="">
<br class="">
I am trying to build the simplest of demo applications from the Robot Operating<br class="">
System (ROS) on top of RTEMS.<br class="">
<br class="">
I have a .c file (talker_init.c) that contains my Init function and a .cpp file<br class="">
(talker.cpp) that contains a function creating a ROS talker (just looping “hello<br class="">
world [counter value]”).  The Init function in the .c file calls the talker<br class="">
function in the .cpp file.<br class="">
<br class="">
The ROS libraries rely on Boost libraries.  I think I’ve figured out how to get<br class="">
waf to find them (at least, that’s not where I appear to have problems).<br class="">
<br class="">
My 'waf configure' command seems to complete without error.<br class="">
<br class="">
When I 'waf build -v’, I get a slew of errors associated with things being out<br class="">
of scope for boost.  I’ve copied two such traces below.  I can build this just<br class="">
fine when I’m not cross-compiling for RTEMS.<br class="">
<br class="">
I am using MacO Catalina 10.15.2 on a MacBook Pro.<br class="">
</blockquote>
<br style="caret-color: rgb(0, 0, 0); font-family: Menlo-Regular; font-size: 11px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class="">
<span style="caret-color: rgb(0, 0, 0); font-family: Menlo-Regular; font-size: 11px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">Nice.</span><br style="caret-color: rgb(0, 0, 0); font-family: Menlo-Regular; font-size: 11px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class="">
<br style="caret-color: rgb(0, 0, 0); font-family: Menlo-Regular; font-size: 11px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class="">
<blockquote type="cite" style="font-family: Menlo-Regular; font-size: 11px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none;" class="">
I have added my own project directory within the rtems-examples repository and<br class="">
effectively copied a wscript file from another example project, so I’m still<br class="">
relying on the top-level wscript file and the additional elements in the<br class="">
rtems_waf directory.<br class="">
</blockquote>
<br style="caret-color: rgb(0, 0, 0); font-family: Menlo-Regular; font-size: 11px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class="">
<span style="caret-color: rgb(0, 0, 0); font-family: Menlo-Regular; font-size: 11px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">Sure.</span><br style="caret-color: rgb(0, 0, 0); font-family: Menlo-Regular; font-size: 11px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class="">
<br style="caret-color: rgb(0, 0, 0); font-family: Menlo-Regular; font-size: 11px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class="">
<blockquote type="cite" style="font-family: Menlo-Regular; font-size: 11px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none;" class="">
<br class="">
Mike<br class="">
<br class="">
<br class="">
—<br class="">
examples $ ./waf build<br class="">
Waf: Entering directory<br class="">
`/Users/michaeldodson/projects/rtems_root/examples/build/riscv-rtems5-rv64imac_medany'<br class="">
[1/4] Compiling ros/talker/talker.cpp<br class="">
[2/4] Compiling ros/talker/talker_init.c<br class="">
...<br class="">
In file included from<br class="">
../../../../ros/melodic_catkin_ws/install_isolated/include/ros/assert.h:35,<br class="">
                 from /usr/local/include/boost/assert.hpp:58,<br class="">
</blockquote>
<br style="caret-color: rgb(0, 0, 0); font-family: Menlo-Regular; font-size: 11px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class="">
<span style="caret-color: rgb(0, 0, 0); font-family: Menlo-Regular; font-size: 11px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">This
 looks like a host file and not and RTEMS. Do you have an RTEMS build of</span><br style="caret-color: rgb(0, 0, 0); font-family: Menlo-Regular; font-size: 11px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class="">
<span style="caret-color: rgb(0, 0, 0); font-family: Menlo-Regular; font-size: 11px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">boost
 installed somewhere?</span><br style="caret-color: rgb(0, 0, 0); font-family: Menlo-Regular; font-size: 11px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class="">
</div>
</blockquote>
<div class=""><br class="">
</div>
<div class="">Nope!  Seems like a pretty fundamental problem.</div>
<div class=""><br class="">
</div>
<div class="">I’ll try it and report back.</div>
<div class=""><br class="">
</div>
<div class="">Has it been done?  Any tips/tricks/pointers/pitfalls?</div>
</div>
</div>
</div>
</blockquote>
<div><br class="">
</div>
<div>Most of Boost is header-only, so it shouldn’t require an RTEMS-specific build.  I *have* been able to go back and build some of the Boost libraries that do require compilation (e.g., MPI).</div>
<div><br class="">
</div>
<div>In any case, the problem in this email thread associated with ‘assert’ and the problem reported in a separate email thread with ‘locale_facets_nonio.h’ declaration issues involve two of the header-only libraries.  I’ve copied snippets of my current errors
 in both cases below.</div>
<div><br class="">
</div>
<div>The ‘locale_facets_nonio.h’ is triggered directly from an RTEMS header file, whereas the assert error doesn’t seem to touch RTEMS files at all, though it builds just fine when I’m not cross-compiling.</div>
<div><br class="">
</div>
<div>Mike</div>
<div><br class="">
</div>
<div>****************</div>
<div><br class="">
</div>
<div>‘::[something]’ not declared error:</div>
<div><br class="">
</div>
<div><span style="font-family: Monaco;" class="">In file included from /Users/michaeldodson/projects/rtems_root/rtems/5/lib/gcc/riscv-</span><span style="font-family: Monaco;" class="">rtems5/9.2.0/include/c++/bits/locale_facets_nonio.h:39,</span></div>
<div>
<div><font face="Monaco" class=""><span style="font-style: normal;" class="">                 from /Users/michaeldodson/projects/rtems_root/rtems/5/lib/gcc/riscv-rtems5/9.2.0/include/c++/locale:41,</span></font></div>
<div><font face="Monaco" class=""><span style="font-style: normal;" class="">                 from /Users/michaeldodson/projects/rtems_root/rtems/5/lib/gcc/riscv-rtems5/9.2.0/include/c++/iomanip:43,</span></font></div>
<div><font face="Monaco" class=""><span style="font-style: normal;" class="">                 from ../../../boost_1_72_0/boost/math/policies/error_handling.hpp:12,</span></font></div>
<div><font face="Monaco" class=""><span style="font-style: normal;" class="">                 from ../../../boost_1_72_0/boost/math/special_functions/round.hpp:14,</span></font></div>
<div><font face="Monaco" class=""><span style="font-style: normal;" class="">                 from ../../../../ros/melodic_catkin_ws/install_isolated/include/ros/time.h:58,</span></font></div>
<div><font face="Monaco" class=""><span style="font-style: normal;" class="">                 from ../../../../ros/melodic_catkin_ws/install_isolated/include/ros/ros.h:38,</span></font></div>
<div><font face="Monaco" class=""><span style="font-style: normal;" class="">                 from ../../ros/listener/listener.cpp:3:</span></font></div>
<div><font face="Monaco" class=""><span style="font-style: normal;" class="">/Users/michaeldodson/projects/rtems_root/rtems/5/lib/gcc/riscv-rtems5/9.2.0/include/c++/ctime:64:11: error: '::clock' has not been declared</span></font></div>
<div><font face="Monaco" class=""><span style="font-style: normal;" class="">   64 |   using ::clock;</span></font></div>
<div><font face="Monaco" class=""><span style="font-style: normal;" class="">      |           ^~~~~</span></font></div>
</div>
<div><br class="">
</div>
<div>****************</div>
<div><br class="">
</div>
<div>Sample of ‘assert’ error:</div>
<div><br class="">
</div>
<div>
<div><font face="Monaco" class=""><span style="font-style: normal;" class="">In file included from ../../../boost_1_72_0/boost/smart_ptr/shared_ptr.hpp:25,</span></font></div>
<div><font face="Monaco" class=""><span style="font-style: normal;" class="">                 from ../../../boost_1_72_0/boost/shared_ptr.hpp:17,</span></font></div>
<div><font face="Monaco" class=""><span style="font-style: normal;" class="">                 from ../../../../ros/melodic_catkin_ws/install_isolated/include/ros/forwards.h:37,</span></font></div>
<div><font face="Monaco" class=""><span style="font-style: normal;" class="">                 from ../../../../ros/melodic_catkin_ws/install_isolated/include/ros/common.h:37,</span></font></div>
<div><font face="Monaco" class=""><span style="font-style: normal;" class="">                 from ../../../../ros/melodic_catkin_ws/install_isolated/include/ros/ros.h:43,</span></font></div>
<div><font face="Monaco" class=""><span style="font-style: normal;" class="">                 from ../../ros/listener/listener.cpp:3:</span></font></div>
<div><font face="Monaco" class=""><span style="font-style: normal;" class="">../../../boost_1_72_0/boost/smart_ptr/shared_ptr.hpp: In member function 'void boost::detail::esft2_deleter_wrapper::operator()(T*)':</span></font></div>
<div><font face="Monaco" class=""><span style="font-style: normal;" class="">../../../boost_1_72_0/boost/assert.hpp:60:29: error: there are no arguments to 'assert' that depend on a template parameter, so a declaration of 'assert' must be available [-fpermissive]</span></font></div>
<div><font face="Monaco" class=""><span style="font-style: normal;" class="">   60 | # define BOOST_ASSERT(expr) assert(expr)</span></font></div>
<div><font face="Monaco" class=""><span style="font-style: normal;" class="">      |                             ^~~~~~</span></font></div>
</div>
<br class="">
<blockquote type="cite" class="">
<div class="">
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">
<div class="">
<div class=""><br class="">
</div>
<div class="">Mike</div>
<br class="">
<blockquote type="cite" class="">
<div class=""><br style="caret-color: rgb(0, 0, 0); font-family: Menlo-Regular; font-size: 11px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class="">
<span style="caret-color: rgb(0, 0, 0); font-family: Menlo-Regular; font-size: 11px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">Chris</span><br style="caret-color: rgb(0, 0, 0); font-family: Menlo-Regular; font-size: 11px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class="">
<br style="caret-color: rgb(0, 0, 0); font-family: Menlo-Regular; font-size: 11px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class="">
<blockquote type="cite" style="font-family: Menlo-Regular; font-size: 11px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none;" class="">
                 from /usr/local/include/boost/math/policies/policy.hpp:21,<br class="">
                 from /usr/local/include/boost/math/policies/error_handling.hpp:21,<br class="">
                 from /usr/local/include/boost/math/special_functions/round.hpp:14,<br class="">
                 from<br class="">
../../../../ros/melodic_catkin_ws/install_isolated/include/ros/time.h:58,<br class="">
                 from<br class="">
../../../../ros/melodic_catkin_ws/install_isolated/include/ros/ros.h:38,<br class="">
                 from ../../ros/talker/talker.cpp:1:<br class="">
../../../../ros/melodic_catkin_ws/install_isolated/include/ros/console.h:126:16:<br class="">
error: 'shared_ptr' in namespace 'boost' does not name a template type; did you<br class="">
mean 'shared_array'?<br class="">
 <span class="Apple-converted-space"> </span>126 | typedef boost::shared_ptr<Token> TokenPtr;<br class="">
     <span class="Apple-converted-space"> </span>|                ^~~~~~~~~~<br class="">
     <span class="Apple-converted-space"> </span>|                shared_array<br class="">
../../../../ros/melodic_catkin_ws/install_isolated/include/ros/console.h:127:21:<br class="">
error: 'TokenPtr' was not declared in this scope; did you mean 'Token'?<br class="">
 <span class="Apple-converted-space"> </span>127 | typedef std::vector<TokenPtr> V_Token;<br class="">
     <span class="Apple-converted-space"> </span>|                     ^~~~~~~~<br class="">
     <span class="Apple-converted-space"> </span>|                     Token<br class="">
../../../../ros/melodic_catkin_ws/install_isolated/include/ros/console.h:127:29:<br class="">
error: template argument 1 is invalid<br class="">
 <span class="Apple-converted-space"> </span>127 | typedef std::vector<TokenPtr> V_Token;<br class="">
     <span class="Apple-converted-space"> </span>|                             ^<br class="">
---<br class="">
In file included from /usr/local/include/boost/smart_ptr/shared_ptr.hpp:25,<br class="">
                 from /usr/local/include/boost/shared_ptr.hpp:17,<br class="">
                 from<br class="">
../../../../ros/melodic_catkin_ws/install_isolated/include/ros/forwards.h:37,<br class="">
                 from<br class="">
../../../../ros/melodic_catkin_ws/install_isolated/include/ros/common.h:37,<br class="">
                 from<br class="">
../../../../ros/melodic_catkin_ws/install_isolated/include/ros/ros.h:43,<br class="">
                 from ../../ros/talker/talker.cpp:1:<br class="">
/usr/local/include/boost/smart_ptr/shared_ptr.hpp: In instantiation of 'typename<br class="">
boost::detail::sp_member_access<T>::type boost::shared_ptr<T>::operator->()<br class="">
const [with T = ros::Publisher::Impl; typename<br class="">
boost::detail::sp_member_access<T>::type = ros::Publisher::Impl*]':<br class="">
../../../../ros/melodic_catkin_ws/install_isolated/include/ros/publisher.h:148:52:<br class="">
 <span class="Apple-converted-space"> </span>required from here<br class="">
/usr/local/include/boost/assert.hpp:60:35: error: 'assert' was not declared in<br class="">
this scope; did you mean 'mpl_::assert'?<br class="">
   60 | # define BOOST_ASSERT(expr) assert(expr)<br class="">
     <span class="Apple-converted-space"> </span>|                             ~~~~~~^~~~~~<br class="">
/usr/local/include/boost/smart_ptr/shared_ptr.hpp:734:9: note: in expansion of<br class="">
macro 'BOOST_ASSERT'<br class="">
 <span class="Apple-converted-space"> </span>734 |         BOOST_ASSERT( px != 0 );<br class="">
     <span class="Apple-converted-space"> </span>|         ^~~~~~~~~~~~<br class="">
<br class="">
_______________________________________________<br class="">
users mailing list<br class="">
<a href="mailto:users@rtems.org" class="">users@rtems.org</a><br class="">
<a href="http://lists.rtems.org/mailman/listinfo/users" class="">http://lists.rtems.org/mailman/listinfo/users</a></blockquote>
</div>
</blockquote>
</div>
<br class="">
</div>
</div>
</blockquote>
</div>
<br class="">
</body>
</html>