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

Hangs when trying to process rust-bindgen v0.63.0 #29

Open
srcshelton opened this issue Dec 15, 2022 · 2 comments
Open

Hangs when trying to process rust-bindgen v0.63.0 #29

srcshelton opened this issue Dec 15, 2022 · 2 comments

Comments

@srcshelton
Copy link

srcshelton commented Dec 15, 2022

Running cargo-ebuild ebuild --noaudit in the cloned https://github.com/rust-lang/rust-bindgen.git repo with tag v0.63.0 checked-out causes cargo-ebuild to hang indefinitely without producing any output.

If I run it through ltrace, I see:

[pid 18249] SYS_write(2, "waiting for file lock on package"..., 38 <unfinished ...>
[pid 18248] SYS_read(6 <unfinished ...>
[pid 18249] <... SYS_write resumed> )                                                                 = 38 <0.000063>
[pid 18248] <... SYS_read resumed> , "waiting for file lo", 19)                                       = 19 <0.000024>
[pid 18249] SYS_write(2, "\n", 1 <unfinished ...>
[pid 18248] SYS_read(6 <unfinished ...>
[pid 18249] <... SYS_write resumed> )                                                                 = 1 <0.000029>
[pid 18248] <... SYS_read resumed> , "ck on package cache\n", 32)                                     = 20 <0.000026>
[pid 18249] SYS_flock(3, 2, 1, 0x7e8b5237b929f181 <unfinished ...>
[pid 18248] SYS_read(6 <no return ...>
error: maximum array length seems negative
, "", 12)                                                                                             = -11 <0.000016>
[pid 18248] SYS_poll(0x7ffdaff412d8, 2, -1

… whereupon it hangs until interrupted. This happens with releases 0.5.1 & 0.5.2.

It would be handy if a --verbose option could be added to give more visibility into what is happening internally (what files are being read, what crates have been discovered on the fly, etc.)!

@gyakovlev
Copy link
Member

just posting workarounds:

you can also use python version

https://packages.gentoo.org/packages/app-portage/pycargoebuild

or simple trick:

{ export ch="$(mktemp -d)" && CARGO_HOME="${ch}" cargo fetch && ls -1 "${ch}/registry/src/"*/ && echo "crates: ${ch}/registry/cache/" && unset ch ; }

it will print you CRATES variable contents ^ and pre-download crates as a bonus to /tmp/, so you can copy those to portage's DISTDIR.

@srcshelton
Copy link
Author

It looks as if the error may be that rust-bindgen's top-level Cargo.toml contains:

[workspace]
members = [
    "bindgen",
    "bindgen-cli",
    "bindgen-integration",
    "bindgen-tests",
    "bindgen-tests/tests/quickchecking",
    "bindgen-tests/tests/expectations",
]

default-members = [
    "bindgen",
    "bindgen-cli",
    "bindgen-tests",
]

… whereas tools seem to expect a package section?

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

2 participants