Bug 403017

Summary: Qt-binding-generator "No such file or directory (os error 2)" on run
Product: [Unmaintained] rust-qt-binding-generator Reporter: Brendan Hansknecht <brendan.hansknecht>
Component: generalAssignee: Jos van den Oever <jos>
Status: RESOLVED FIXED    
Severity: normal CC: evanjsx
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Manjaro   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Brendan Hansknecht 2019-01-09 06:41:23 UTC
SUMMARY
I am not sure what is happening, but I seem unable to get rust_qt_binding_generator to work. After I install it with cargo, I run it and get "No such file or directory (os error 2)". I have tried it on the binding.json in the readme and the one for the example and demo projects. All of them give the same error for me.

STEPS TO REPRODUCE
1. cargo install rust_qt_binding_generator
2. create binding.json in README
3. rust_qt_binding_generator binding.json

OBSERVED RESULT
No such file or directory (os error 2)

EXPECTED RESULT
The binding files should get generated

SOFTWARE/OS VERSIONS
Linux: Manjaro 18
Qt Version: 5.12
Comment 1 Evan Stoll 2019-02-07 01:16:57 UTC
An strace reveals that Cargo.toml cannot be found.

openat(AT_FDCWD, "Cargo.toml", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
write(2, "No such file or directory", 25No such file or directory) = 25

The fix listed here: https://bugs.kde.org/show_bug.cgi?id=402528 --https://gitlab.com/rhn_mk1/rust-qt-bindings-generator/commit/d67e428ad34b5e9abb5f3d45782a1b5a62cc7dc2 -- seemed to fix the issue for me.

NixOS 19.03pre167327.11cf7d6e1ff (Koi) x86_64
Comment 2 Jos van den Oever 2019-02-08 21:04:02 UTC
Thanks for the report. The fixed version is available as 0.3.1.