[C++-sig] gcc-3.0.4, SunOS import module error
David Abrahams
dave at boost-consulting.com
Tue Nov 19 18:04:09 CET 2002
"FLETCHER, Shayne, FM" <Shayne.FLETCHER at rbos.com> writes:
> Hi all:
>
> I'm having trouble reflecting inheritance hierarchies with gcc 3.0.4 on
> SunOS 5.8.
> Basically, a module like:
>
> struct bar{};
> struct baz{};
> struct foo : bar, baz {};
>
> BOOST_PYTHON_MODULE(test_derivation)
> {
> class_<bar>("bar")
> ;
> class_<baz>("baz")
> ;
> class_<foo, bases<bar, baz> >("foo")
> ;
> }
>
> gives a bus error when the module is loaded from the interpreter e.g.
>
> Python 2.2.1 (#1, Sep 17 2002, 17:26:18) [C] on sunos5
> Type "help", "copyright", "credits" or "license" for more information.
>>>> import test_derivation
Probably you don't have your PYTHONPATH or LD_LIBRARY_PATH set up
properly.
> Interestingly, the same thing happens with "cltree.so" from the boost.python
> tests when loaded from the interpreter as above i.e.
> Python 2.2.1 (#1, Sep 17 2002, 17:26:18) [C] on sunos5
> Type "help", "copyright", "credits" or "license" for more information.
>>>> import cltree
>
> causes a bus error,
>
> but not when executed as part of the bjam build and test procedure - i.e.
> $bjam -sTOOLS=gcc -sPYTHON_TEST_ARGS=-v test
>
> produces output
> // ...
>
> running...
> python-test-target
> ../../../libs/python/test/bin/pearu1.test/gcc/debug/runtime-link-dynamic/pea
> ru1.test
> b= cltree.basic()
> s= <cltree.symbol object at 0x13b550>
> c= cltree.constant()
> v= cltree.wrapped_variable()
> ok
>
> // ...
>
> Any ideas?
try
bjam -sTOOLS=gcc -sPYTHON_TEST_ARGS=-v -n -a test
to see what commands it's executing. You may be missing something
important when you try to build/run "by hand".
--
David Abrahams
dave at boost-consulting.com * http://www.boost-consulting.com
Boost support, enhancements, training, and commercial distribution
More information about the Cplusplus-sig
mailing list