-
Notifications
You must be signed in to change notification settings - Fork 10
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
Update to the latest bindgen #3
Conversation
It looks like it's failing on Travis CI, but I can't get the log to load to see why… |
(Oh, and thanks!) |
I wonder if it has anything to do with the S3 outage today? |
Oh, I dunno. I'll try again later I guess. |
I think the outage is resolved at this point. Maybe just kick it off again? |
Looks like it you go to the requests section of Travis it shows that it's
building correctly.
…On Feb 28, 2017 3:55 PM, "Jesse A. Tov" ***@***.***> wrote:
Oh, I dunno. I'll try again later I guess.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#3 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AC6qEyaZikSMkWe8QiW8VI9Ktwe_4GKFks5rhLQLgaJpZM4MOyAp>
.
|
I still can’t see it on Travis, but it works for me on two different machines. I'll take it. Thanks! |
Sweet! |
So looks like on my localhost the only thing failing is max_align_t: ---- generated::bindgen_test_layout_max_align_t stdout ---- |
It’s a generated test, and the generated code is failing it. The generated code defines a struct #[repr(C)]
pub struct max_align_t {
pub __clang_max_align_nonce1: ::std::os::raw::c_longlong,
pub __clang_max_align_nonce2: f64,
} The test is then that the size of this struct is 32 bytes. But it's failing and getting 16? Seems like 16 is right, though. |
Yeah I would peg that as 16. 8 for c_longlong and 8 for f64
…On Wed, Mar 1, 2017 at 7:25 AM, Jesse A. Tov ***@***.***> wrote:
It’s a generated test, and the generated code is failing it. The generated
code defines a struct
#[repr(C)]pub struct max_align_t {
pub __clang_max_align_nonce1: ::std::os::raw::c_longlong,
pub __clang_max_align_nonce2: f64,
}
The test is then that the size of this struct is 32 bytes. But it's
failing and getting 16? Seems like 16 is right, though.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#3 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AC6qE16rXemmXkqL_2y_PTU5U9AEP3CJks5rhY3kgaJpZM4MOyAp>
.
|
The problem seems to be that the C source has typedef struct {
long double ld;
} max_align; I’ll put together a bug report. |
Nice find!
…On Wed, Mar 1, 2017 at 9:46 AM, Jesse A. Tov ***@***.***> wrote:
The problem seems to be that the C source has long double as the type of
the second field, and Rust thinks that has to be aligned at 16. But it's
getting translated to f64. I’ve found a minimal example for bindgen input:
typedef struct {
long double ld;
} max_align;
I’ll put together a bug report.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#3 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AC6qE5ywY0R9-oUPX3jLla1LyRRcmNsSks5rha79gaJpZM4MOyAp>
.
|
Looks like they may know about it, and this may be the fix?: rust-lang/rust-bindgen#468 |
Not the fix; possibly the cause? |
This updates libffi to the latest bindgen release. This fixed my build problem with size_t not found. 👍 I have rustfmt automatically run when I save a file which changed a few things in build.rs. If you don't like that I can revert those.