You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Mongoose is a pretty popular single threaded web server for embedded systems written in C. So I went to try and make a binding to it and when I compile it I get a few errors such as seen below. (My repository is pretty minimal to reproduce.)
1007 | pub const IPPORT_RESERVED: u32 = 1024;
| -------------------------------------- previous definition of the value `IPPORT_RESERVED` here
...
3092 | pub const IPPORT_RESERVED: _bindgen_ty_6 = 1024;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `IPPORT_RESERVED` redefined here
975 | pub const FP_NAN: u32 = 0;
| -------------------------- previous definition of the value `FP_NAN` here
...
5166 | pub const FP_NAN: _bindgen_ty_8 = 0;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `FP_NAN` redefined here
It looks like __bindgen_ty_8 is a u32 so they are defined as equal - but still produces error.
(also If I copy out the binding.rs and delete the duplicate's then it does compile ok...)
The text was updated successfully, but these errors were encountered:
...I thought because those constants were not part of the header, that bindgen added them for some reason. Since the header does not contain FP_* symbols, it is hard to figure out what the header is defining twice. I think the header is indirectly tricking bindgen into defining FP_* twice.
Uh oh!
There was an error while loading. Please reload this page.
I have a really rough looking header (it's amalgamation).
https://github.com/TomzBench/mongoose-rs/blob/master/mongoose-sys/wrapper.h
Mongoose is a pretty popular single threaded web server for embedded systems written in C. So I went to try and make a binding to it and when I compile it I get a few errors such as seen below. (My repository is pretty minimal to reproduce.)
The culprit is defined first as:
Then it is redefined again some 5000 lines later as
It looks like __bindgen_ty_8 is a u32 so they are defined as equal - but still produces error.
(also If I copy out the binding.rs and delete the duplicate's then it does compile ok...)
The text was updated successfully, but these errors were encountered: