-
Notifications
You must be signed in to change notification settings - Fork 742
Unable to build rust torch bindings https://github.com/posix4e/rust-torch #1154
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
Comments
I tried it with an older version of bindgen and I didn't get an error when compiling but i still get an error when building
|
Apparently with this old version of bindgen it works if i tell it not to generate unstable rust code. Should I leave this open? |
Hi @posix4e, thanks for filing a bug. Can you provide a standalone version of the input header file? https://github.com/rust-lang-nursery/rust-bindgen/blob/master/CONTRIBUTING.md#using-creduce-to-minimize-test-cases Without that, unfortunately, this this issue is not very actionable. Thanks! |
@fitzgen the one line h file generated http://termbin.com/lgfd |
The "one line h file" is an include of another header, which includes an unknown further number of headers, each of which include ... etc. In order for this issue to be actionable, we need at minimum the header after the preprocessor runs and preferrably after running Thanks! |
@fitzgen I have the same error and ran a creduce on it, sadly it returns exactly the same file after a whole night of trying to reduce it. The file is https://github.com/radare/radare2/blob/master/libr/include/r_core.h This is my creduce predicate script: CMD="bindgen --verbose /home/user/data/tmp/r_core.h -o /home/user/data/tmp/r2-api/r_core.rs -- -I/usr/local/include/libr"
OUT=$($CMD 3>&1 1>&2 2>&3)
EXPECT="Error { repr: Custom(Custom { kind: Other, error: StringError(\"Cannot find binary path\") }) }"
if [ "$OUT" == "$EXPECT" ]; then
exit 0
else
exit 1
fi Here is the preprocessed file |
@fitzgen should I open a separate bug for this radare2 case? Or it's fine here? Also creduce failed on this testcase, I sent them bugreport, they will check it. |
Input C/C++ Header
We actually generate it.
Actual Results
Expected Results
I expected it to compile
The text was updated successfully, but these errors were encountered: