[C++-sig] gcc-3.0.4, SunOS import module error

FLETCHER, Shayne, FM Shayne.FLETCHER at rbos.com
Tue Nov 19 17:56:48 CET 2002


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

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?

- Shayne.


********************************************************************
      Visit our Internet site at http://www.rbsmarkets.com

This e-mail is intended only for the addressee named above.
As this e-mail may contain confidential or privileged information,
if you are not the named addressee, you are not authorised to
retain, read, copy or disseminate this message or any part of it.
The Royal Bank of Scotland plc is registered in Scotland No 90312
Registered Office: 36 St Andrew Square, Edinburgh EH2 2YB
Regulated by the Financial Services Authority
********************************************************************




More information about the Cplusplus-sig mailing list