Skip to content
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

Can't find system headers #242

Closed
dimbleby opened this issue Nov 13, 2016 · 7 comments
Closed

Can't find system headers #242

dimbleby opened this issue Nov 13, 2016 · 7 comments

Comments

@dimbleby
Copy link
Contributor

/usr/include/sys/types.h:146:10: fatal error: 'stddef.h' file not found
/usr/include/sys/types.h:146:10: fatal error: 'stddef.h' file not found, err: true

Looks like you go to the trouble of figuring out where to look - https://github.com/servo/rust-bindgen/blob/bdfab643e70df469dd0d163cc91bf48955250735/src/bin/bindgen.rs#L64-L67 - and then forget all about it! - https://github.com/servo/rust-bindgen/blob/bdfab643e70df469dd0d163cc91bf48955250735/src/bin/bindgen.rs#L73.

I think the fix is simply:

-    match builder_from_flags(env::args()) {
+    match builder_from_flags(bind_args.into_iter()) {
@emilio
Copy link
Contributor

emilio commented Nov 13, 2016

Pfft, right, cc @jdub, sorry for missing this while reviewing #228. Thanks for filing this!

@jdub
Copy link
Contributor

jdub commented Nov 13, 2016

D'oh! Nice catch.

bors-servo pushed a commit that referenced this issue Nov 14, 2016
bors-servo pushed a commit that referenced this issue Nov 14, 2016
Fix path detection after #228

r? @fitzgen

Too bad we can't test it on CI because CI has the path correctly setup :(

Fixes #242
@bbigras
Copy link

bbigras commented Jan 25, 2017

I have a similar problem:

/usr/include/gssapi/gssapi.h:63:10: fatal error: 'stddef.h' file not found, err: true

bindgen: 0.20.2
rustc 1.16.0-nightly (83c2d9523 2017-01-24)
clang/llvm: 3.9.1
Ubuntu 16.04.1 LTS (64-bit)

@emilio
Copy link
Contributor

emilio commented Jan 25, 2017

This is on 64 bit? Huh, in any case, this is a different issue (a check that exists was broken), may you fill a new issue with the output of clang -E - -v?

@bbigras
Copy link

bbigras commented Jan 25, 2017

It wasn't a bug after all. I was missing the clang-3.9 package. I thought llvm-3.9-dev and libclang-3.9-dev were enough (I had llvm-config-3.9). It was on 64 bit. Thanks.

luser pushed a commit to luser/rust-bindgen that referenced this issue Mar 27, 2017
Make sure that we really have found clang
luser pushed a commit to luser/rust-bindgen that referenced this issue Mar 27, 2017
Similar to rust-lang#242. In my system, clang is a symlink to a versioned clang (e.g.
clang-3.7), and this equality check to "clang" was failing.

This patch makes the check more robust so it can match "clang" or "clang-3.7",
but still reject a symlink to ccache.
@virtualritz
Copy link

virtualritz commented Oct 1, 2018

I moved my previous reply here.

@chibby0ne
Copy link

It wasn't a bug after all. I was missing the clang-3.9 package. I thought llvm-3.9-dev and libclang-3.9-dev were enough (I had llvm-config-3.9). It was on 64 bit. Thanks.

More generally, the standard headers used by rust-bindgen are provided by the clang-VER package in newer Ubuntu distros, where VER is the major version of clang/llvm.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants