-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
"failed to determine package fingerprint for build script" caused by a symlink pointing to an unreadable directory #9881
Comments
Thanks for the report! Cargo needs to follow symlinks, as what they point to may impact the build. However, for the purpose here, I think it would be fine to ignore errors reading the contents of a symlink destination. One suggestion I have for your |
I see there's a a test, build_script_scan_eaccess, that specifically checks that the |
This comment has been minimized.
This comment has been minimized.
Oh whoops, a mistake on my side, going to unassign myself. @rustbot release-assignment |
Hm, so I can't offhand think of a really clean way to deal with that. My only idea is to pass a flag into However, considering this more, maybe it is good to provide an error message early on, rather than later when publishing? That is, maybe this should just be closed? Another thought is that this is essentially the same as #9528. I'm wondering if the suggestions there might be more in line? Sorry, this may not have been as E-easy as I thought! But if you want to dig in and consider what might be a good behavior, it would be appreciated. |
I'm not too familiar in the fingerprinting aspect of cargo, but I can't think of a scenario where we want to calculate the fingerprint of inaccessible files and later on not use the file for publishing? If there's no such scenario, I think it's better to improve the error message. If there is indeed some edge cases, we might want to consider providing a clear way to ignore it.
I'd argue this is a different case. We want to limit the walker in #9528 rather than letting it running indefinitely, but here we can't even walk in the first place. |
Yea, improving the error message sounds good, though I'm uncertain of exactly how or what a better message would be. |
@tavianator - facing the same issue on version 1.80.0, is there a fix found for the same issue? |
For some reason armhf is not buidling despite the tricks in helper script: [5/1594] Running: cargo build target unify_build error: failed to determine package fingerprint for build script for unify_attribute_poll v0.1.0 (/.../unifysdk-src/components/unify_attribute_poll) Could be related to symlinks: rust-lang/cargo#9881 Amazingly no problems observed on arm64 (with same rustup versions) Origin: #14 Signed-off-by: Philippe Coval <philippe.coval@silabs.com>
For some reason armhf is not buidling despite the tricks in helper script: [5/1594] Running: cargo build target unify_build error: failed to determine package fingerprint for build script for unify_attribute_poll v0.1.0 (/.../unifysdk-src/components/unify_attribute_poll) Could be related to symlinks: rust-lang/cargo#9881 Amazingly no problems observed on arm64 (with same rustup versions) Origin: #14 Signed-off-by: Philippe Coval <philippe.coval@silabs.com>
For some reason armhf is not buidling despite the tricks in helper script: [5/1594] Running: cargo build target unify_build error: failed to determine package fingerprint for build script for unify_attribute_poll v0.1.0 (/.../unifysdk-src/components/unify_attribute_poll) (...) "Value too large for defined data type; class=Os (2)" Amazingly no problems observed on arm64 (with same rustup versions) Not only on github because ot is reproducable locally. Not sure problem is related to symlinks, issues to track at qemu, glibc, linux ext4... Relate-to: https://gitlab.com/qemu-project/qemu/-/issues/263 Relate-to: https://bugzilla.kernel.org/show_bug.cgi?id=205957 Relate-to: https://sourceware.org/bugzilla/show_bug.cgi?id=23960 Relate-to: https://sourceware.org/bugzilla/show_bug.cgi?id=23960 Relate-to: https://bugs.launchpad.net/qemu/+bug/1805913 Relate-to: rust-lang/cargo#8719 Relate-to: rust-lang/cargo#9881 Relate-to: rust-lang/cargo#9545 (comment) Origin: #14 Signed-off-by: Philippe Coval <philippe.coval@silabs.com>
For some reason armhf is not buidling despite the tricks in helper script: [5/1594] Running: cargo build target unify_build error: failed to determine package fingerprint for build script for unify_attribute_poll v0.1.0 (/.../unifysdk-src/components/unify_attribute_poll) (...) "Value too large for defined data type; class=Os (2)" Amazingly no problems observed on arm64 (with same rustup versions) Not only on github because ot is reproducable locally. Not sure problem is related to symlinks, issues to track at qemu, glibc, linux ext4... Relate-to: https://gitlab.com/qemu-project/qemu/-/issues/263 Relate-to: https://bugzilla.kernel.org/show_bug.cgi?id=205957 Relate-to: https://sourceware.org/bugzilla/show_bug.cgi?id=23960 Relate-to: https://sourceware.org/bugzilla/show_bug.cgi?id=23960 Relate-to: https://bugs.launchpad.net/qemu/+bug/1805913 Relate-to: rust-lang/cargo#8719 Relate-to: rust-lang/cargo#9881 Relate-to: rust-lang/cargo#9545 (comment) Origin: #14 Signed-off-by: Philippe Coval <philippe.coval@silabs.com>
For some reason armhf is not buidling despite the tricks in helper script: [5/1594] Running: cargo build target unify_build error: failed to determine package fingerprint for build script for unify_attribute_poll v0.1.0 (/.../unifysdk-src/components/unify_attribute_poll) (...) "Value too large for defined data type; class=Os (2)" Amazingly no problems observed on arm64 (with same rustup versions) Not only on github because ot is reproducable locally. Not sure problem is related to symlinks, issues to track at qemu, glibc, linux ext4... Relate-to: https://gitlab.com/qemu-project/qemu/-/issues/263 Relate-to: https://bugzilla.kernel.org/show_bug.cgi?id=205957 Relate-to: https://sourceware.org/bugzilla/show_bug.cgi?id=23960 Relate-to: https://sourceware.org/bugzilla/show_bug.cgi?id=23960 Relate-to: https://bugs.launchpad.net/qemu/+bug/1805913 Relate-to: rust-lang/cargo#8719 Relate-to: rust-lang/cargo#9881 Relate-to: rust-lang/cargo#9545 (comment) Origin: #21 Signed-off-by: Philippe Coval <philippe.coval@silabs.com>
For some reason armhf is not buidling despite the tricks in helper script: [5/1594] Running: cargo build target unify_build error: failed to determine package fingerprint for build script for unify_attribute_poll v0.1.0 (/.../unifysdk-src/components/unify_attribute_poll) (...) "Value too large for defined data type; class=Os (2)" Amazingly no problems observed on arm64 (with same rustup versions) Not only on github because ot is reproducable locally. Not sure problem is related to symlinks, issues to track at qemu, glibc, linux ext4... Relate-to: https://gitlab.com/qemu-project/qemu/-/issues/263 Relate-to: https://bugzilla.kernel.org/show_bug.cgi?id=205957 Relate-to: https://sourceware.org/bugzilla/show_bug.cgi?id=23960 Relate-to: https://sourceware.org/bugzilla/show_bug.cgi?id=23960 Relate-to: https://bugs.launchpad.net/qemu/+bug/1805913 Relate-to: rust-lang/cargo#8719 Relate-to: rust-lang/cargo#9881 Relate-to: rust-lang/cargo#9545 (comment) Origin: #21 Signed-off-by: Philippe Coval <philippe.coval@silabs.com>
Problem
If a project with a build script has a symbolic link pointing to somewhere unreadable, cargo build fails.
Steps
Possible Solution(s)
I suggest not following symbolic links when calculating the fingerprint.
I actually ran into this with a symlink to /, which caused
meaning it was trying to recursively scan my whole file system.
Notes
Output of
cargo version
:The text was updated successfully, but these errors were encountered: