[Boost-bugs] [Boost C++ Libraries] #10286: Fail regex matching when dynamic linking boost_regex on FreeBSD 8 (9).

Subject: [Boost-bugs] [Boost C++ Libraries] #10286: Fail regex matching when dynamic linking boost_regex on FreeBSD 8 (9).
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2014-08-01 08:59:47


#10286: Fail regex matching when dynamic linking boost_regex on FreeBSD 8 (9).
--------------------------------------+-------------------------
 Reporter: Pavel Karelin <hkarel@…> | Owner: johnmaddock
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: regex
  Version: Boost 1.55.0 | Severity: Problem
 Keywords: |
--------------------------------------+-------------------------
 Simple example:
 {{{
 #include <boost/regex.hpp>
 #include <string>

 main(int, char *[])
 {
 std::string filter_rules = "cause 16";
 std::string::const_iterator start = filter_rules.begin();
 std::string::const_iterator end = filter_rules.end();
 std::string rule_pattern = "([a-z_]+).*";
 boost::regex rule_re(rule_pattern, boost::regex::extended);
 boost::smatch what;
 regex_search(filter_rules, what, rule_re);

 std::string call_param = what[1];
 std::string rule_operator = what[2];
 std::string value = what[3];
 printf("\n0: %s", call_param.c_str());
 printf("\n1: %s", rule_operator.c_str());
 printf("\n2: %s\n", value.c_str());
 }
 }}}

 Static linking:[[BR]]
 g++ test.cpp -o test -I/opt/boost/1.55.0/include
 /opt/boost/1.55.0/lib/libboost_regex.a

 Results:[[BR]]
 0: cause /* It's correct */[[BR]]
 1: [[BR]]
 2:


 Dynamic linking:[[BR]]
 g++ test.cpp -o test -I/opt/boost/1.55.0/include -L/opt/boost/1.55.0/lib
 -lboost_regex -Wl,-rpath,/opt/boost/1.55.0/lib

 Results: [[BR]]
 0: /* FAIL! */[[BR]]
 1: [[BR]]
 2:

 It is manifested on FreeBSD 8 (9), architecture amd64.

 Boost was builds with next parameters:[[BR]]
 ./bootstrap.sh \ [[BR]]
 --without-icu \ [[BR]]
 --without-
 libraries=coroutine,graph,graph_parallel,locale,log,math,mpi,random,test,wave
 \ [[BR]]
 --with-python=${py_dir}/bin/python

 ./b2 --disable-icu

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/10286>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:16 UTC