Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 667286 - clippy broken in dev-lang/rust{,-bin}-1.29.1
Summary: clippy broken in dev-lang/rust{,-bin}-1.29.1
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo Rust Project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-09-29 13:15 UTC by Dirkjan Ochtman (RETIRED)
Modified: 2020-02-22 10:41 UTC (History)
1 user (show)

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


Attachments
Fix for clippy (rust-1.29.1-fix-clippy-sysroot.patch,2.51 KB, patch)
2018-10-11 15:51 UTC, Oleg
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dirkjan Ochtman (RETIRED) gentoo-dev 2018-09-29 13:15:15 UTC
Needs proper library paths somehow.
Comment 1 Larry the Git Cow gentoo-dev 2018-09-29 13:22:30 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=df4c8351cc7f06f994653ed9035d77d0dcb48cc3

commit df4c8351cc7f06f994653ed9035d77d0dcb48cc3
Author:     Dirkjan Ochtman <djc@gentoo.org>
AuthorDate: 2018-09-29 13:17:08 +0000
Commit:     Dirkjan Ochtman <djc@gentoo.org>
CommitDate: 2018-09-29 13:22:12 +0000

    profiles: mask rust{,-bin} clippy flag
    
    Bug: https://bugs.gentoo.org/667286
    
    Signed-off-by: Dirkjan Ochtman <djc@gentoo.org>

 profiles/base/package.use.mask | 5 +++++
 1 file changed, 5 insertions(+)
Comment 2 Oleg 2018-10-11 15:51:57 UTC
Created attachment 550582 [details, diff]
Fix for clippy

Could you check this patch? With it applied clippy will use same sysroot as rustc itself: https://github.com/rust-lang-nursery/rust-clippy/pull/3257
Comment 3 Dirkjan Ochtman (RETIRED) gentoo-dev 2018-10-18 08:52:37 UTC
This patch does seem to solve the problem for dev-lang/rust, thanks! I'll include it in my ebuild for rust-1.29.2.
Comment 4 Larry the Git Cow gentoo-dev 2018-10-18 09:05:25 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=aca73a89121af25876703d0ddcc5f08ddf277933

commit aca73a89121af25876703d0ddcc5f08ddf277933
Author:     Dirkjan Ochtman <djc@gentoo.org>
AuthorDate: 2018-10-18 09:02:33 +0000
Commit:     Dirkjan Ochtman <djc@gentoo.org>
CommitDate: 2018-10-18 09:05:13 +0000

    dev-lang/rust: version bump to 1.29.2 with fixes
    
    Fixes: https://bugs.gentoo.org/667286
    Fixes: https://bugs.gentoo.org/667966
    Bug: https://bugs.gentoo.org/609654
    Signed-off-by: Dirkjan Ochtman <djc@gentoo.org>
    Package-Manager: Portage-2.3.49, Repoman-2.3.11

 dev-lang/rust/Manifest                          |  14 ++
 dev-lang/rust/files/1.29.2-clippy-sysroot.patch |  62 +++++
 dev-lang/rust/rust-1.29.2.ebuild                | 289 ++++++++++++++++++++++++
 3 files changed, 365 insertions(+)
Comment 5 tt_1 2019-04-25 09:46:57 UTC
has this been fixed for rust-bin at upstream too?
Comment 6 Georgy Yakovlev archtester gentoo-dev 2019-04-25 16:50:09 UTC
sort of, but we still need to adjust binpkg a bit

here's what hapens

cargo-clippy 
error: failed to run `rustc` to learn about target-specific information

Caused by:
  could not execute process `/opt/rust-bin-1.34.0/bin/clippy-driver rustc - --crate-name ___ --print=file-names --crate-type bin --crate-type rlib --crate-type dylib --crate-type cdylib --crate-type staticlib --crate-type proc-macro` (never executed)

Caused by:
  No such file or directory (os error 2)

ls /opt/rust-bin-1.34.0/bin/ -1
cargo-bin-1.34.0
cargo-clippy-bin-1.34.0
clippy-driver-bin-1.34.0
rustc-bin-1.34.0
rustdoc-bin-1.34.0
rust-gdb-bin-1.34.0
rust-gdbgui-bin-1.34.0
rust-lldb-bin-1.34.0

it wants /opt/rust-bin-1.34.0/bin/clippy-driver
which we rename to clippy-driver-bin-1.34.0


after symlinking clippy-driver -> clippy-driver-bin-1.34.0 in /opt/rust-bin-1.34.0/bin/

clippy works.

I'll see what I can do here.
I'm not sure why @djc renamed those binaries in /opt/rust-bin-${PV}, maybe it's unnecessary.
or maybe we can keep symlink there.

reopening, as binpkg for 1.34.0 should have clippy unmasked, because the libpath is ok.
Comment 7 Dirkjan Ochtman (RETIRED) gentoo-dev 2019-04-25 19:33:47 UTC
I think they have to have unique names for eselect-rust to do the right thing? You should review the logic there before making changes to these binary names.
Comment 8 Georgy Yakovlev archtester gentoo-dev 2019-04-25 20:15:26 UTC
I will review of course.

eselect-rust seems to be using simlinks from /usr/bin in the provider file

if use clippy; then
                echo /usr/bin/clippy-driver >> "${T}/provider-${P}"
                echo /usr/bin/cargo-clippy >> "${T}/provider-${P}"
fi


so I guess if we leave filesnames in /opt/rust-bin-${PV} untouched, but symlinks in /usr/bin/ mutated to /usr/bin/cargo-clippy-bin-1.34.0 for example, this should be ok.

the path to /opt/rust-bin-${PV} is versioned, so the path will remain distinguishable and unique.

I'll test it anyway, later.
Comment 9 Georgy Yakovlev archtester gentoo-dev 2019-04-26 03:40:02 UTC
eselect rust is almost ok if we don't rename files in /opt, the only thing that breaks is displaying selected version.

I'm pushing and 1.34.1 update which will create set of symlinks in /opt/${P}/bin/

cargo-bin -> cargo-bin-1.34.1
cargo-bin-1.34.1
cargo-clippy -> cargo-clippy-bin-1.34.1
cargo-clippy-bin-1.34.1
cargo-fmt -> cargo-fmt-bin-1.34.1
cargo-fmt-bin-1.34.1
clippy-driver -> clippy-driver-bin-1.34.1
clippy-driver-bin-1.34.1
rustc -> rustc-bin-1.34.1
rustc-bin-1.34.1
rustdoc -> rustdoc-bin-1.34.1
rustdoc-bin-1.34.1
rustfmt -> rustfmt-bin-1.34.1
rustfmt-bin-1.34.1
rust-gdb -> rust-gdb-bin-1.34.1
rust-gdb-bin-1.34.1
rust-gdbgui -> rust-gdbgui-bin-1.34.1
rust-gdbgui-bin-1.34.1
rust-lldb -> rust-lldb-bin-1.34.1
rust-lldb-bin-1.34.1
Comment 10 Larry the Git Cow gentoo-dev 2019-04-26 04:47:58 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fcd30dda5972cb349218ba7359cd40a5302a6332

commit fcd30dda5972cb349218ba7359cd40a5302a6332
Author:     Georgy Yakovlev <gyakovlev@gentoo.org>
AuthorDate: 2019-04-26 03:53:03 +0000
Commit:     Georgy Yakovlev <gyakovlev@gentoo.org>
CommitDate: 2019-04-26 04:47:47 +0000

    base/package.use.mask: unmask clippy for >=rust-bin-1.34.1
    
    Bug: https://bugs.gentoo.org/667286
    Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>

 profiles/base/package.use.mask | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ef0778dcaf38c36cea914bdc501890171726297d

commit ef0778dcaf38c36cea914bdc501890171726297d
Author:     Georgy Yakovlev <gyakovlev@gentoo.org>
AuthorDate: 2019-04-26 03:48:19 +0000
Commit:     Georgy Yakovlev <gyakovlev@gentoo.org>
CommitDate: 2019-04-26 04:47:41 +0000

    dev-lang/rust-bin: bump to 1.34.1
    
    Bug: https://bugs.gentoo.org/667286
    Package-Manager: Portage-2.3.64, Repoman-2.3.12
    Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>

 dev-lang/rust-bin/Manifest               |  13 +++
 dev-lang/rust-bin/rust-bin-1.34.1.ebuild | 171 +++++++++++++++++++++++++++++++
 2 files changed, 184 insertions(+)
Comment 11 Georgy Yakovlev archtester gentoo-dev 2020-02-22 10:41:29 UTC
fixed long ago.