[C++-sig] Boost.Python std::cerr segfault when built with -lGL

Gazihan Alankus gazihan at cse.wustl.edu
Wed May 30 20:43:16 CEST 2007


Stefan Seefeld wrote:

> Can you send a complete (but minimal !) test case exhibiting the problem ?
> I may have a look into it.
> 
> Thanks,
> Stefan
> 

Ok, I'm attaching a very simple source file. Here is how I compiled it along
the recommendations of bjam -o: (-g or not didn't matter)

"g++"  -ftemplate-depth-128 -O0 -fno-inline -Wall -fPIC    -I"../../../.." -I"/usr/include/python2.4" -c -o "src.o" "src.cpp"

"g++"    -o "mod.so" -Wl,-h -Wl,mod.so -shared -Wl,--start-group "src.o" /usr/lib/libboost_python.so -L/usr/local/lib -lGL  -lutil -lpthread -ldl -Wl,--end-group

Here is how I used it:


$ python
Python 2.4.4 (#1, May 25 2007, 22:22:35)
[GCC 4.1.1 (Gentoo 4.1.1-r3)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import mod
>>> mod.func()
cerr!Segmentation fault


Thank you for your interest. If you don't get the same error, I can run any
test programs, give you traces or if you prefer I can open up a user
account for you in my laptop so that you can ssh in. 

-Gazi 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: src.cpp
Type: text/x-c++src
Size: 174 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/cplusplus-sig/attachments/20070530/b0396dd2/attachment.cpp>


More information about the Cplusplus-sig mailing list