-
Notifications
You must be signed in to change notification settings - Fork 68
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
ERROR: LoadError: type JuliaUnknown has no field sym #354
Comments
Would be great if you could share those headers. Are there any errors when parsing the code? |
These are the headers https://github.com/dankamongmen/notcurses/tree/master/include/notcurses. The error is the same as in #355 though. |
I noticed there are many inline functions in those headers, so you may also hit #267. |
I apologize if I should not have re-open this issue but I had the very same error which was not solved by #361, it was due to some atomic member in a structure. Removing the I managed to get what I wanted by hacking the C header files with a macro that rename atomic variables with an Is there a better solution? I forgot to mention that I am using Clang v0.16.6. |
Could you share the generator script and the output info?
I suspect that your header is not successfully parsed. For any type that Clang fails to recognize, it will return a
If |
Wait. If
|
According to
Well. After looking into the implementation of
|
Thank you for your responsiveness. In case you want to have a look, the build sript is here, the C headers are from this project and there is a dependency here. When building Julia code with |
This workaround looks good to me. I noticed there are only 3 structs that are using |
Manually wrapping the structures was something I had done in the past (before I knew about Clang). Having the structures automatically (and correctly) defined is really handy when the C code evolves (which occurred quite often for this project). So hacking a bit the C headers to be able to automatically generate correct Julia bindings seems a light price to pay. I admit that this hack is hardly conceivable for all projects, but TAO has been designed from the beginning to be used with other languages than C, especially with Julia. |
I am hitting a
leaf_ty
withJuliaUnknown{Clang.CLInvalid}(CLType (Clang.CLInvalid) )
hereClang.jl/src/generator/system_deps.jl
Line 17 in 2c9230d
Clang.jl/src/generator/system_deps.jl
Line 23 in 2c9230d
JuliaUnknown
does not have asym
field:I guess getting that object there is not ideal but the code should probably explicitly handle it somehow.
The text was updated successfully, but these errors were encountered: