Public bug reported:
Binary package hint: swig1.3
Package: 1.3.33-2ubuntu1 (Ubuntu hardy)
Target language: Python
Swig provides the option -nortti to be used in conjunction with C++
code, which is compiled with -fno-rtti. This takes effect only if
"directors" are used. It defines SWIG_DIRECTOR_NORTTI.
>From the swig source code (Source/Modules/python.cxx):
#ifdef SWIG_DIRECTOR_NORTTI
/*
When we don't use the native C++ RTTI, we implement a minimal one
only for Directors.
*/
[...]
# define SWIG_DIRECTOR_CAST(Arg) Swig::get_rtdir(static_cast<void*>(Arg))
# define SWIG_DIRECTOR_RGTR(Arg1, Arg2)
Swig::set_rtdir(static_cast<void*>(Arg1), Arg2)
#else
# define SWIG_DIRECTOR_CAST(Arg) dynamic_cast<Swig::Director*>(Arg)
# define SWIG_DIRECTOR_RGTR(Arg1, Arg2)
#endif /* SWIG_DIRECTOR_NORTTI */
The reason is that dynamic_cast<> must not be used with -fno-rtti.
However, swig doesn't use the preprocessor macro defined above in one
case, namely in Language::classDirectorDisown() (file:
Source/Modules/lang.cxx).
You can work around this problem by applying the attached patch to swig,
probably breaking other target languages.
** Affects: swig1.3 (Ubuntu)
Importance: Undecided
Status: New
--
swig generated code can not be compiled when option -nortti is used and
%feature("director") is enabled for a c++ class
https://bugs.launchpad.net/bugs/210898
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs