Thursday, September 12, 2024

Re: rust-{clippy,rustfmt} missing dependency on rust

On Thu, Sep 12, 2024 at 12:35:28PM +0100, Stuart Henderson wrote:
> On 2024/09/12 08:28, Sebastien Marie wrote:
> > Matthew Martin <phy1729@gmail.com> writes:
> >
> > > I'm on a monthish old snapshot. While there's been a bump to libcrypto
> > > and libssl in the meantime, pkg_add -u usually doesn't break anything.
> > > On a recent pkg_add -u,
> > >
> > >
> > > Can't install rust-1.81.0 because of libraries
>
> That's not unexpected, you need to update the snapshot before you can
> update packages. Libraries have changed since then. There should be some
> earlier text from pkg_add saying which libraries are involved but I am
> guessing libssl/libcrypto.

Sorry if I was unclear, I have no expectation for everything to update
when I'm missing bumps in base libs.

> > > Direct dependencies for rust-1.80.1->1.81.0 resolve to libssh2-1.11.0 curl-8.9.1p0
> > > Full dependency tree is curl-8.9.1p0 libssh2-1.11.0 ngtcp2-1.7.0 nghttp2-1.63.0 nghttp3-1.5.0
> > > rust-clippy-1.80.1p0->1.81.0: ok
> > > rust-rustfmt-1.80.1p0->1.81.0: ok
> > >
> > >
> > > However when attempting to run clippy or rustfmt,
> > >
> > >
> > > ~% /usr/local/bin/clippy-driver
> > > ld.so: clippy-driver: can't load library 'libstd-02e247769dc17415.so'
> > > zsh: killed /usr/local/bin/clippy-driver
> > > ~% /usr/local/bin/rustfmt
> > > ld.so: rustfmt: can't load library 'librustc_driver-02e247769dc17411.so'
> > > zsh: killed /usr/local/bin/rustfmt
> > >
> > >
> > > I think this means rust-clippy and rust-rustfmt are missing a dependency
> > > on rust-main.
> >
> > Thanks for the report. There is already a dependency but it isn't enough
> > constrained (it is a dependency on lang/rust,-main and not on the exact
> > version).
> >
> > The following diff should fix that.
>
> I think that does make sense (and is OK) but it won't directly fix the
> issue Matthew is seeing (the result then would have been that neither of
> rust, rust-fmt, rust-clippy got updated).

That is all I was hoping for: that pkg_add -u wouldn't break any already
installed packages. (Of course now I need to update to get clippy and
rustfmt to work again, but that's what one signs up for when running
snapshots.)

Thanks Sebastien for the patch!

> >
> > diff /home/semarie/repos/openbsd/ports/mystuff/lang/rust
> > commit - ab1a6945b5c16b0b34c1f64b0b0b10b7226f33ed
> > path + /home/semarie/repos/openbsd/ports/mystuff/lang/rust
> > blob - 0bdeb56edbb274d02a471b63e1a88fb4171f5e1f
> > file + Makefile
> > --- Makefile
> > +++ Makefile
> > @@ -17,6 +17,10 @@ COMMENT-src = Rust source component
> >
> > V = 1.81.0
> > DISTNAME = rustc-${V}-src
> > +REVISION-gdb = 0
> > +REVISION-clippy = 0
> > +REVISION-rustfmt = 0
> > +REVISION-src = 0
> >
> > # rustc bootstrap version
> > BV-aarch64 = 1.80.1
> > @@ -155,15 +159,15 @@ LIB_DEPENDS-main += ${LIB_DEPENDS} \
> > net/curl \
> > security/libssh2
> >
> > -RUN_DEPENDS-gdb += lang/rust,-main \
> > +RUN_DEPENDS-gdb += ${FULLPKGNAME-main}:${FULLPKGPATH-main} \
> > devel/gdb
> > # BUILD_LLDB is defined by /usr/share/mk/bsd.own.mk
> > .if ${BUILD_LLDB:L} == yes
> > RUN_DEPENDS-gdb += devel/llvm/17,-lldb
> > .endif
> > -RUN_DEPENDS-clippy += lang/rust,-main
> > -RUN_DEPENDS-rustfmt += lang/rust,-main
> > -RUN_DEPENDS-src += lang/rust,-main
> > +RUN_DEPENDS-clippy += ${FULLPKGNAME-main}:${FULLPKGPATH-main}
> > +RUN_DEPENDS-rustfmt += ${FULLPKGNAME-main}:${FULLPKGPATH-main}
> > +RUN_DEPENDS-src += ${FULLPKGNAME-main}:${FULLPKGPATH-main}
> >
> > PKG_ARCH-src = *
> >
> >
> > Comments or OK ?
> > --
> > Sebastien Marie
> >

No comments:

Post a Comment