[REGEX] seg fault
When running the credit_card snippet in gdb I get. Program received signal SIGSEGV, Segmentation fault. 0x00002ac3263b38f2 in boost::re_detail::cpp_regex_traits_implementation<char>::lookup_classname_imp () from /usr/lib64/libboost_regex.so.2 I'm using BOOST_VERSION 103900 Thanks -JR
When running the credit_card snippet in gdb I get.
Program received signal SIGSEGV, Segmentation fault. 0x00002ac3263b38f2 in boost::re_detail::cpp_regex_traits_implementation<char>::lookup_classname_imp () from /usr/lib64/libboost_regex.so.2
Works for me. The only thing I can think of is a binary compatibility issue between the .so and your built application (different boost versions? Different build options?), John.
You were right. It works fine if I use g++ -ggdb -O3 credit_card_example.cpp -o credit_card_example /usr/local/lib/libboost_regex-gcc41-d-1_39.so But not with g++ -ggdb -O3 credit_card_example.cpp -o credit_card_example -lboost_regex In my /usr/local/lib directory I find lrwxrwxrwx 1 root root 37 Oct 29 17:17 libboost_regex-gcc41-d-1_39.so -> libboost_regex-gcc41-d-1_39.so.1.39.0 lrwxrwxrwx 1 root root 37 Oct 29 17:17 libboost_regex-gcc41-d-1_39.so.1 -> libboost_regex-gcc41-d-1_39.so.1.39.0 lrwxrwxrwx 1 root root 37 Oct 29 17:17 libboost_regex-gcc41-d-1_39.so.1.39 -> libboost_regex-gcc41-d-1_39.so.1.39.0 -rwxr-xr-x 1 root root 6763287 Oct 29 17:17 libboost_regex-gcc41-d-1_39.so.1.39.0 But shouldn't there be a libboost_regex.a file ? So that I can use g++ -ggdb -O3 credit_card_example.cpp -o credit_card_example -L/usr/local/lib/ -lboost_regex I bjamed in /usr/include/boost_1_39_0/libs/regex/build (where I unzipped myboost_1_39_0 tarball). Then did bjam install. Shouldn't that put libboost_regex.a in the right location automatically ? If not what can I do? I am using BOOST_VERSION 103900 only. Thanks -JR
But shouldn't there be a libboost_regex.a file ?
Yes, well an .so anyway :-)
I bjamed in /usr/include/boost_1_39_0/libs/regex/build (where I unzipped myboost_1_39_0 tarball). Then did bjam install.
Shouldn't that put libboost_regex.a in the right location automatically ?
I would have thought so. And those libraries with a "-d" in the name appear to be debug versions as well.
If not what can I do?
Try a: bjam --with-regex install from the boost root directory. HTH, John.
participants (2)
-
John Maddock
-
John Robertson