Skip to content

Python bindings use RTTI, but libHalide is built with -fno-rtti #2400

@steven-johnson

Description

@steven-johnson

The python bindings use Boost features which require RTTI be enabled, but the default build environment links with libHalide which is (and has always been) built with RTTI disabled.

Amazingly, this has happened to work fairly reliably up till now, but is intrinsically fragile (since the compiler is free to assume that typeinfo is defined in libHalide, which it isn't).

(It's still working in trunk at this time, but I have a private branch that seems to have tickled this into breaking, due to addition of virtual methods to a class which previously didn't have them.)

Not sure if there is a good solution here:

  • Boost absolutely requires RTTI
  • Not clear if there are acceptable alternatives to Boost for C++/Python bindings (e.g., SWIG is terrible)
  • Halide needs to support non-RTTI builds, and would prefer not to add RTTI builds to the mix

Metadata

Metadata

Assignees

Labels

buildIssues related to building Halide and with CI

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions