-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fatal python error: do_realize_lazy_struct: lost a struct/union! #149
Comments
I've found a workaround, but I would still like to know if this is correct. I was able to add the following to ensure that struct _IO_FILE is never defined in stdio.h: typedef void* FILE;
#define __struct_FILE_defined 1 |
Can you include a reproducible example? The missing information is how you declare your |
Closing. Feel free to re-open if you have more information! |
@arigo Sorry for the delay. I don't have permission to re-open the issue. I put everything required to reproduce things here: https://github.com/lacraig2/repro_cffi You should only need to run It is building a header file I have committed through a fairly complex process here, but that's not important. The important thing is reproducing and fixing the FILE issue. |
The problem likely comes from |
(Ah, I just realized that it's what you said in #149 (comment). Sorry! That comment was correct, it's a viable workaround. I just didn't understand at that time that you'd put these two lines somewhere in the process that produces the |
I am attempting to use cffi in out-of-line ABI level.
I am preprocessing my source and simplifying it to the point where cdef can understand its structs and functions.
The compiling to a module seems to work fine, but when I try to instantiate new type I get the following error:
This is the stack trace:
Some additional context:
cffi/src/c/realize_c_type.c
Lines 725 to 727 in b57a92c
The lookup name here seems to be $FILE.
I've minimized this to error to:
The text was updated successfully, but these errors were encountered: