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

Error after updating Unix system #1426

Closed
trsh opened this issue Oct 19, 2018 · 6 comments
Closed

Error after updating Unix system #1426

trsh opened this issue Oct 19, 2018 · 6 comments

Comments

@trsh
Copy link

trsh commented Oct 19, 2018

RUST_BACKTRACE=1 bindgen soapStub.h -o binding.rs --whitelist-type xxx
/usr/include/stdlib.h:31:10: fatal error: 'stddef.h' file not found, err: true

Any advice?

Update

I created some symlinks, bet the it's next fatal error: 'stdarg.h' file not found, err:. Seems like a never ending story.

@trsh
Copy link
Author

trsh commented Oct 19, 2018

This saved my day

export C_INCLUDE_PATH=/usr/lib/llvm-6.0/lib/clang/6.0.0/include"${C_INCLUDE_PATH+:}${C_INCLUDE_PATH-}"

@trsh trsh closed this as completed Oct 19, 2018
@emilio
Copy link
Contributor

emilio commented Oct 19, 2018

Looks like that should be detected automatically by clang-sys though... What system are you on?

@trsh
Copy link
Author

trsh commented Oct 22, 2018

@emilio Ubuntu 10.x

@alex88
Copy link

alex88 commented Oct 1, 2019

@trsh thank you you comment saved me after hours trying to debug this!
@emilio btw this still happens to my during a docker build using debian buster trying to build bindings for rocksdb in the librocksdb-sys crate

Update: nvm it didn't really fix the problem :/
Update 2: omg I was missing the clang package, I wonder why it wasn't complaining about the missing binary...

@emilio
Copy link
Contributor

emilio commented Oct 2, 2019

(FWIW, comment edits don't arrive to my email notifications, so you were just lucky that I saw your mention :))

I think it's resolved now per your latest edits, but if it still happens when there's a usable clang / libclang in the system it should be filed upstream in https://github.com/kylemayes/clang-sys, which is what bindgen uses to find the library.

@alex88
Copy link

alex88 commented Oct 2, 2019

@emilio woops sorry :) Anyway, it is solved because I've installed the clang binary package, you think is still worth opening an issue on clang-sys? I'm a rust beginner so I'm not exactly sure what to do here but if it's something that's supposed to work maybe I should open one

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

3 participants