Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 898920 - dev-lang/rust-1.67.1: manifest path `/var/tmp/portage/dev-lang/rust-1.67.1/work/rustc-1.67.1-src/src/bootstrap/Cargo.toml` does not exist
Summary: dev-lang/rust-1.67.1: manifest path `/var/tmp/portage/dev-lang/rust-1.67.1/wo...
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Georgy Yakovlev
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-03-02 14:07 UTC by Sergey 'L29Ah' Alirzaev
Modified: 2023-03-10 01:29 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info (emerge.info,19.81 KB, text/plain)
2023-03-02 14:07 UTC, Sergey 'L29Ah' Alirzaev
Details
build log (build.log.xz,285.18 KB, application/x-xz)
2023-03-02 14:08 UTC, Sergey 'L29Ah' Alirzaev
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sergey 'L29Ah' Alirzaev 2023-03-02 14:07:39 UTC
Created attachment 855796 [details]
emerge --info

>>> Install dev-lang/rust-1.67.1 into /var/tmp/portage/dev-lang/rust-1.67.1/image
Building rustbuild
running: /usr/lib/rust/1.67.1/bin/cargo build --manifest-path /var/tmp/portage/dev-lang/rust-1.67.1/work/rustc-1.67.1-src/src/bootstrap/Cargo.toml --verbose --verbose --locked --frozen
error: manifest path `/var/tmp/portage/dev-lang/rust-1.67.1/work/rustc-1.67.1-src/src/bootstrap/Cargo.toml` does not exist
Traceback (most recent call last):
  File "/var/tmp/portage/dev-lang/rust-1.67.1/work/rustc-1.67.1-src/./x.py", line 28, in <module>
    bootstrap.main()
  File "/var/tmp/portage/dev-lang/rust-1.67.1/work/rustc-1.67.1-src/src/bootstrap/bootstrap.py", line 937, in main
    bootstrap(help_triggered)
  File "/var/tmp/portage/dev-lang/rust-1.67.1/work/rustc-1.67.1-src/src/bootstrap/bootstrap.py", line 914, in bootstrap
    build.build_bootstrap(args.color)
  File "/var/tmp/portage/dev-lang/rust-1.67.1/work/rustc-1.67.1-src/src/bootstrap/bootstrap.py", line 783, in build_bootstrap
    run(args, env=env, verbose=self.verbose, cwd=self.rust_root)
  File "/var/tmp/portage/dev-lang/rust-1.67.1/work/rustc-1.67.1-src/src/bootstrap/bootstrap.py", line 166, in run
    raise RuntimeError(err)
RuntimeError: failed to run: /usr/lib/rust/1.67.1/bin/cargo build --manifest-path /var/tmp/portage/dev-lang/rust-1.67.1/work/rustc-1.67.1-src/src/bootstrap/Cargo.toml --verbose --verbose --locked --frozen
Comment 1 Sergey 'L29Ah' Alirzaev 2023-03-02 14:08:11 UTC
Created attachment 855798 [details]
build log
Comment 2 Georgy Yakovlev archtester gentoo-dev 2023-03-08 20:02:10 UTC
Can you please be more specific on how you triggered this?
It’s certainly something specific to your system.
Maybe /var/tmp/portage out of space?
Did you stop/restart the build?
Did you hibernate/suspend during the build?

To me it looks like source dir changed between phase funcs, this should not happen normally.
Comment 3 Sergey 'L29Ah' Alirzaev 2023-03-08 20:04:55 UTC
(In reply to Georgy Yakovlev from comment #2)
> Can you please be more specific on how you triggered this?
> It’s certainly something specific to your system.
> Maybe /var/tmp/portage out of space?
No; if it were, the log would contain messages about it, no?
> Did you stop/restart the build?
No.
> Did you hibernate/suspend during the build?
No.

> To me it looks like source dir changed between phase funcs, this should not
> happen normally.

Happens every time.
Comment 4 Georgy Yakovlev archtester gentoo-dev 2023-03-09 07:42:50 UTC
Does not happen to anyone else though, otherwise I’d have seen it already by now. It’s very high profile package and obvious failures get reported almost instantly.

Can you provide listing of contents of directory it contains about where Cargo.toml should be? And parent one just in case. Basically can you try finding this file while it’s still compiling? Where does it go on installation phase?
Comment 5 Georgy Yakovlev archtester gentoo-dev 2023-03-09 07:46:00 UTC
/var/tmp/portage/dev-lang/rust-1.67.1/work/rustc-1.67.1-src/src/bootstrap/Cargo.toml

This file and directory I mean.
Comment 6 Sergey 'L29Ah' Alirzaev 2023-03-09 14:28:52 UTC
(In reply to Georgy Yakovlev from comment #4)
> Does not happen to anyone else though, otherwise I’d have seen it already by
> now. It’s very high profile package and obvious failures get reported almost
> instantly.
> 
> Can you provide listing of contents of directory it contains about where
> Cargo.toml should be? And parent one just in case. Basically can you try
> finding this file while it’s still compiling? Where does it go on
> installation phase?

The file in fact exists. No idea why cargo told it couldn't find the file.
I figured the problem stems from my apparmor profile for cargo that forbids DAC-overriding capability utilization. Sorry for the noise, but i am surprised cargo needs to override DAC, especially in the src_install() phase that isn't supposed to touch any private bits, just portage temporary directory (that is go-rwx, so not accessible to root w/o the capability).
Comment 7 Georgy Yakovlev archtester gentoo-dev 2023-03-10 01:29:58 UTC
Install phase runs cargo install subcommand, it’s also designed to install to / and may be not smart enough to differentiate between normal case and rw destdir/ ro root case. It actually did not support destdir at some point long ago.
Glad you found it.