View previous topic :: View next topic |
Author |
Message |
eccerr0r Watchman
Joined: 01 Jul 2004 Posts: 9832 Location: almost Mile High in the USA
|
Posted: Wed Nov 27, 2024 4:41 pm Post subject: rust postinst failed Expected exactly two files but found 1. |
|
|
I tried re-running and appears to have succeeded the second time but this was highly odd:
Code: | >>> Completed installing dev-lang/rust-1.80.1-r100 into /tmp/portage/dev-lang/rust-1.80.1-r100/image
* Final size of build directory: 11271812 KiB ( 10.7 GiB)
* Final size of installed tree: 431924 KiB (421.8 MiB)
* QA Notice: The ebuild is installing to one or more unexpected directories:
*
* /usr/share/doc/rust-1.80.1
*
* Please fix the ebuild to use correct FHS/Gentoo policy paths.
strip: x86_64-pc-linux-gnu-strip --strip-unneeded -N __gentoo_check_ldflags__ -R .comment -R .GCC.command.line -R .note.gnu.gold-version
/usr/lib/rust/1.80.1/bin/rustc
/usr/lib/rust/1.80.1/bin/rustc-1.80.1
/usr/lib/rust/1.80.1/lib/rustlib/i686-unknown-linux-gnu/lib/libstd-0c48060941855a6c.so
/usr/lib/rust/1.80.1/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-aa35babf0b4bbde6.so
/usr/lib/rust/1.80.1/bin/rustdoc
/usr/lib/rust/1.80.1/bin/rustdoc-1.80.1
/usr/lib/rust/1.80.1/lib/librustc_driver-06db74bcd3736db8.so
/usr/lib/rust/1.80.1/lib/libstd-aa35babf0b4bbde6.so
/usr/lib/rust/1.80.1/bin/cargo-1.80.1
/usr/lib/rust/1.80.1/bin/cargo
* Found old .rlib and .so files in the old rust lib directory
* ERROR: dev-lang/rust-1.80.1-r100::gentoo failed (postinst phase):
* Expected exactly two files matching /usr/lib/rust/1.80.1/lib/rustlib/i686-unknown-linux-gnu/lib/libcore-\*.rlib, but found 1
*
* Call stack:
* ebuild.sh, line 136: Called pkg_postinst
|
Not sure what to make of the error since I can't reproduce and no longer have the full build log. Perhaps just look the other way? _________________ Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching? |
|
Back to top |
|
|
Kangie Developer
Joined: 21 May 2023 Posts: 3 Location: Brisbane, Australia
|
Posted: Wed Nov 27, 2024 9:51 pm Post subject: |
|
|
How interesting.
You seem to have hit an edge case in my attempt to work around breakage where `--keep-going` combined with a build failure could result in installing two copies of rust with the same version over the top of each other, but would leave the old copy installed (the uninstall action doesn't run until the next depclean).
The error here is that we attempt work around that in postinst, however if we don't find a match for a file (in this case we should find two files that match `/usr/lib/rust/1.80.1/lib/rustlib/i686-unknown-linux-gnu/lib/libcore-*`) we bail out rather than continue removing files.
I can't see a reason for you to have encountered this; libcore is not optional. We generate the list of files in preinst so we know it used to exist. Maybe you had a hash collision? Seems very unlikely but it's the best guess I have right now.
Code: | $ equery f dev-lang/rust:1.80.1 | grep -i libcore
/usr/lib/rust/1.80.1/lib/rustlib/i686-unknown-linux-gnu/lib/libcore-df5993c644c6a958.rlib
/usr/lib/rust/1.80.1/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcore-ccfb3e0972f09e06.rlib |
I've just noticed that we say rlib when we also check for a few so files; I should update that.
Long term this needs to be fixed in Portage when someone has time to investigate. Related bugs:
|
|
Back to top |
|
|
eccerr0r Watchman
Joined: 01 Jul 2004 Posts: 9832 Location: almost Mile High in the USA
|
Posted: Thu Nov 28, 2024 6:27 am Post subject: |
|
|
As a personal note that might be helpful for others is that I was running --jobs=4 and indeed with --keep-going on my 10 core machine machine with distcc enabled. The first time around it gave up trying to --resume but it was able to finish when restarting emerge from the top.
The actions regarding the -r100 was weird and I think it eventually depcleaned. _________________ Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching? |
|
Back to top |
|
|
undrwater Guru
Joined: 28 Jan 2003 Posts: 313 Location: Caucasia
|
Posted: Sat Nov 30, 2024 6:53 am Post subject: |
|
|
If there is interest, I have a full log of a very similar error, but not the exact one. Mine ends with:
Code: | * Removing old .rlib file /usr/lib/rust/1.81.0/lib/rustlib/x86_64-unknown-linux-gnu/lib/libsysroot-db2bd41680f067c1.rlib
* ERROR: dev-lang/rust-1.81.0-r100::gentoo failed (postinst phase):
* Expected exactly two files matching /usr/lib/rust/1.81.0/lib/rustlib/x86_64-unknown-linux-gnu/lib/libminiz_oxide-\*.rlib, but found 1 |
Paste is here: http://0x0.st/XREQ.log _________________ Open-mindedness is painful... |
|
Back to top |
|
|
eccerr0r Watchman
Joined: 01 Jul 2004 Posts: 9832 Location: almost Mile High in the USA
|
Posted: Sat Nov 30, 2024 4:59 pm Post subject: |
|
|
Were you also using --jobs and --keep-going? Happen to know what was running at the time of failure perhaps?
At least we can probably assume that this is not a hash collision, I don't think hash collisions could happen this frequently? _________________ Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching? |
|
Back to top |
|
|
|