jacob-carlborg / dstep

A tool for converting C and Objective-C headers to D modules
204 stars 37 forks source link

dstep: an unknown error occurred: core.exception.AssertError@dstep/translator/Type.d(32): Assertion failure #249

Open qproger opened 4 years ago

qproger commented 4 years ago

Hello, I try to translate C header file called "tcl.h" from Tcl/Tk C library. Used command: dstep -o tcl.di tcl.h After that get this error: dstep: an unknown error occurred: core.exception.AssertError@dstep/translator/Type.d(32): Assertion failure and a lot of lines ---------------- ??:? [0x3291b90] ??:? [0x329be4a] ??:? [0x328332d] ??:? [0x327a7ec] ??:? [0x52ad59] ??:? [0x532e96] ....

DStep is 1.0.0. OS: Redhat 6.5

qproger commented 4 years ago

Found out that these three lines cause assertion failure: #define TCL_VOLATILE ((Tcl_FreeProc *) 1) #define TCL_STATIC ((Tcl_FreeProc *) 0) #define TCL_DYNAMIC ((Tcl_FreeProc *) 3)

jacob-carlborg commented 4 years ago

Which version of libclang are you using? You can run dstep --clang-version.

jacob-carlborg commented 4 years ago

I can not reproduce this with DStep linked with libclang 8.