[C++-sig] Boost.Python in SUSE 9.0 or SUSE 9.1?

Ralf W. Grosse-Kunstleve rwgk at yahoo.com
Fri Jun 25 15:55:25 CEST 2004


--- Chris Hoeppler <hoeppler at diener.iap.physik.uni-tuebingen.de> wrote:
> However, I've just tried to compile a test file with just one line
> #include <boost/python.hpp>
> as mentioned in your post quoted above, which also results in an internal
> compiler error:
> 
> g++ -Wall -ftemplate-depth-100 -DBOOST_PYTHON_DYNAMIC_LIB -g -O0 \
> -fno-inline -fPIC -DDEBUG -I/usr/local/include/python2.3 \
> -I/usr/local/include/boost-1_31 -c -o test.os test.cpp
> 
> <snipped warning about _POSIX_C_SOURCE being redefined>
> /usr/local/include/boost-1_31/boost/python/object_core.hpp:283: internal
> compiler error: Segmentation
>    fault
> 
> Any clues on how to proceed from here?

You have to strip down the code until you've isolated the construct that causes
the ICE. Then try to rearrange that construct until the ICE goes away. In the
early days of Boost.Python I've done this a million times, and I am sure David
did it a billion times. It always takes too long, is very frustrating, and
therefore requires a lot of determination. If this is not enough to scare you,
copy the content of boost/python.hpp into your source file, then comment out
half the includes, see if it still ICE's, if yes comment out half of the
remaining, if not put back half of the ones you commented out, and so on until
you've found that one include that makes a difference. Then copy that into your
source code and repeat the exercise until you found the piece of code that
makes the difference. Then go into a different trial-and-error loop rearranging
the code. While the first step requires mainly determination, you will need
some creativity here. Often my last resort was to ask David. Finally you have
to communicate the fix to the developers of the effected library (e.g. it could
be in boost::graph or boost::bind or, heaven forbid, in boost::mpl or ...) and
convince them to adopt your fix.

Easy!

Ralf



		
__________________________________
Do you Yahoo!?
Yahoo! Mail is new and improved - Check it out!
http://promotions.yahoo.com/new_mail




More information about the Cplusplus-sig mailing list