Hi,<div><br></div><div>Can you please file a ticket in the ROS trac?  <a href="https://code.ros.org/trac/ros">https://code.ros.org/trac/ros</a>.</div><div><br></div><div><a href="https://code.ros.org/trac/ros"></a>As an immediate workaround (and actually the preferred way of doing this now) is to setup the environment for the compiler as you would for anything else, i.e. set:</div>

<div>CPATH</div><div>LIBRARY_PATH</div><div>LD_LIBRARY_PATH</div><div><br></div><div>to include the boost location.  In your case it looks like this would probably be:</div><div>export CPATH=/opt/boost/include:$CPATH</div>

<div>export LIBRARY_PATH=/opt/boost/lib:$LIBRARY_PATH</div><div>export LD_LIBRARY_PATH=/opt/boost/lib:$LD_LIBRARY_PATH</div><div><br></div><div>Josh<br><br><div class="gmail_quote">On Wed, Sep 8, 2010 at 10:02 PM, 김윤수 <span dir="ltr"><<a href="mailto:yesarang.kim@gmail.com">yesarang.kim@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Dear ros users,<div><br></div><div>I have a problem with rosboost-cfg. Here is the situation I encountered.</div><div>

<br></div><div>I'm using MontaVista Linux and had already installed boost at /usr/local which is 1.36.0 and was used intensively by existing softwares. I have installed cturtle_base using rosinstall. The ros requires boost which is greater than or equal to 1.37.0. So I've installed boost 1.40.0 at /opt/boost and set ROS_BOOST_ROOT to /opt/boost. I've managed to successfully build 38 packages out of ros. Everything was going smoothly upto this.</div>


<div><br></div><div>I was interested in pluginlib so I built it and tried pluginlib_tutorials at <a href="http://www.ros.org/wiki/pluginlib/Tutorials/Writing%20and%20Using%20a%20Simple%20Plugin" target="_blank">http://www.ros.org/wiki/pluginlib/Tutorials/Writing%20and%20Using%20a%20Simple%20Plugin</a></div>


<div><br></div><div>I tried to execute polygon_loader and got a seg fault.I tried to trace back to a root cause using gdb and the core file. When loading executable, gdb prints out these messages for loading shared libraries</div>


<div><br></div><div>---</div><div>...</div><div><div>Reading symbols from <font color="#000099"><b>/opt/boost/lib/libboost_filesystem.so.1.40.0</b></font>...done.</div><div>Loaded symbols for <font color="#000099"><b>/opt/boost/lib/libboost_filesystem.so.1.40.0</b></font></div>


<div>Reading symbols from /opt/boost/lib/libboost_system.so.1.40.0...done.</div><div>Loaded symbols for /opt/boost/lib/libboost_system.so.1.40.0</div><div>Reading symbols from /lib/librt.so.1...Reading symbols from /usr/lib/debug/lib/librt-2.5.90.so.debug...done.</div>


<div>done.</div><div>Loaded symbols for /lib/librt.so.1</div><div>Reading symbols from /lib/libdl.so.2...Reading symbols from /usr/lib/debug/lib/libdl-2.5.90.so.debug...done.</div><div>done.</div><div>Loaded symbols for /lib/libdl.so.2</div>


<div>Reading symbols from <font color="#000099"><b>/opt/boost/lib/libboost_regex.so.1.40.0</b></font>...done.</div><div>Loaded symbols for <font color="#000099"><b>/opt/boost/lib/libboost_regex.so.1.40.0</b></font></div>


<div>Reading symbols from /usr/local/apr/lib/libaprutil-1.so.0...done.</div><div>Loaded symbols for /usr/local/apr/lib/libaprutil-1.so.0</div></div><div>...</div><div><div>Core was generated by `./polygon_loader'.</div>


<div>Program terminated with signal 11, Segmentation fault.</div><div>#0  0xb7d63d0f in boost::re_detail::perl_matcher<__gnu_cxx::__normal_iterator<char const*, std::string>, std::allocator<boost::sub_match<__gnu_cxx::__normal_iterator<char const*, std::string> > >, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::find_imp (this=0xbff75724)</div>


<div>    at /usr/local/include/boost/regex/v4/perl_matcher_common.hpp:297</div><div>297        matcher_proc_type proc = s_find_vtable[type];</div></div><div>---</div><div><br></div><div>I got these stack trace when typed where</div>


<div><br></div><div>---</div><div><div>(gdb) where</div><div>#0  0xb7d63d0f in boost::re_detail::perl_matcher<__gnu_cxx::__normal_iterator<char const*, std::string>, std::allocator<boost::sub_match<__gnu_cxx::__normal_iterator<char const*, std::string> > >, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::find_imp (this=0xbff75724)</div>


<div>    at <b><font color="#000099">/usr/local/include/boost/regex/v4/perl_matcher_common.hpp:297</font></b></div><div>#1  0xb7d64118 in boost::regex_search<__gnu_cxx::__normal_iterator<char const*, std::string>, std::allocator<boost::sub_match<__gnu_cxx::__normal_iterator<char const*, std::string> > >, char, boost::regex_traits<char, boost::cpp_regex_traits<char> > > (first=</div>


<div>      {_M_current = 0x806dfec "[${severity}] [${time}]: ${message}"}, last={_M_current = 0x806e00f ""}, m=@0xbff75830, e=@0xbff7586c,</div><div>    flags=boost::regex_constants::match_default, base={_M_current = 0x806dfec "[${severity}] [${time}]: ${message}"})</div>


<div>    at <font color="#000099"><b>/usr/local/include/boost/regex/v4/perl_matcher_common.hpp:229</b></font></div><div>#2  0xb7d6421f in boost::regex_search<__gnu_cxx::__normal_iterator<char const*, std::string>, std::allocator<boost::sub_match<__gnu_cxx::__normal_iterator<char const*, std::string> > >, char, boost::regex_traits<char, boost::cpp_regex_traits<char> > > (first=</div>


<div>      {_M_current = 0x806dfec "[${severity}] [${time}]: ${message}"}, last={_M_current = 0x806e00f ""}, m=@0xbff75830, e=@0xbff7586c,</div><div>    flags=boost::regex_constants::match_default) at <font color="#000099"><b>/usr/local/include/boost/regex/v4/regex_search.hpp:42</b></font></div>


<div>#3  0xb7d67f90 in ros::console::Formatter::init (this=0xb7d70ec0, fmt=0xb7d6af38 "[${severity}] [${time}]: ${message}")</div><div>    at /home/yskim/ros/ros/core/rosconsole/src/rosconsole/rosconsole.cpp:281</div>


<div>#4  0xb7d5e055 in ros::console::do_initialize () at /home/yskim/ros/ros/core/rosconsole/src/rosconsole/rosconsole.cpp:418</div><div>#5  0xb7d5e794 in ros::console::initialize () at /home/yskim/ros/ros/core/rosconsole/src/rosconsole/rosconsole.cpp:430</div>


<div>#6  0xb7d5ebb6 in __static_initialization_and_destruction_0 (__initialize_p=<value optimized out>, __priority=<value optimized out>)</div><div>    at /home/yskim/ros/ros/core/rosconsole/src/rosconsole/rosconsole.cpp:657</div>


<div>#7  0xb7d6aa95 in __do_global_ctors_aux () from /home/yskim/ros/ros/core/rosconsole/lib/librosconsole.so</div><div>#8  0xb7d5c40d in _init () from /home/yskim/ros/ros/core/rosconsole/lib/librosconsole.so</div><div>#9  0xb7f9d5b0 in call_init (l=0xb7e01950, argc=1, argv=0xbff75a64, env=0xbff75a6c) at dl-init.c:81</div>


<div>#10 0xb7f9d6c4 in _dl_init (main_map=0xb7fab678, argc=1, argv=0xbff75a64, env=0xbff75a6c) at dl-init.c:145</div><div>#11 0xb7f8f8ff in _dl_start_user () from /lib/ld-linux.so.2</div></div><div>---</div><div><br></div>


<div>As you can see in bold & blue text, rosconsole was compiled using /usr/local/include/boost header but linked against /opt/boost/lib.</div><div><br></div><div>So I suspected that there was something wrong with rosboost-cfg.</div>


<div>When I executed 'rosboost-cfg --cflags', I got nothing but -L/opt/boost/lib -Wl,-rpath,/opt/boost/lib  -lboost_regex for 'rosboost-cfg --lflags regex.'</div><div>I analyzed rosboost_cfg.py source and found that Version.__init__() has strange code segment about is_system_install property as follows</div>


<div><br></div><div>self.is_system_install = os.path.split(self.include_dir)[0] == self.root</div><div><br></div><div>For my environment, self.include_dir == /opt/boost/include and self.root == os.path.split(self.include_dir)[0] == /opt/boost.</div>


<div>And the include_dirs() subroutine returns value for --cflags option as follows</div><div><br></div><div>def include_dirs(ver, prefix = ''):</div><div>    if (<font color="#000099"><b>ver.is_system_install</b></font> or no_L_or_I):</div>


<div>        return ""</div><div><br></div><div>    return " %s%s"%(prefix, ver.include_dir)</div><div><br></div><div><br></div><div>I don't know what is_system_install exactly means but for my environment, I definitely need value of -L/opt/boost/include for --cflags. So I modified the code as follows</div>


<div><br></div><div><div>def include_dirs(ver, prefix = ''):</div><div>    if (no_L_or_I):</div><div>        return ""</div><div><br></div><div>    return " %s%s"%(prefix, ver.include_dir)</div>


</div><div><br></div><div>After this modification, I managed to execute polygon_loader successfully. I think this modification works only for me.</div><div><br></div><div>Please, fix this problem.</div><div><br></div><div>


TIA</div><div><br></div><div>- Yoonsoo</div><div><br></div>
<br>_______________________________________________<br>
ros-users mailing list<br>
<a href="mailto:ros-users@code.ros.org">ros-users@code.ros.org</a><br>
<a href="https://code.ros.org/mailman/listinfo/ros-users" target="_blank">https://code.ros.org/mailman/listinfo/ros-users</a><br>
<br></blockquote></div><br></div>