[oi-dev] problems publishing rust

Joshua M. Clulow josh at sysmgr.org
Sun Jun 19 06:04:25 UTC 2022


On Sun, 19 Jun 2022 at 03:31, Gary Mills <gary_mills at fastmail.fm> wrote:
> On Sat, Jun 18, 2022 at 03:49:33PM +0200, Friedrich Kink via oi-dev wrote:
> > I try to prepare new rustc package with current version 1.61.0. So far
> > building and installing is already working. But publishing respectively make
> > REQUIRED_PACKAGES immediately bails out with the following error message:
> [...]
> > truss shows that make REQUIRED_PACKAGE really tries to open the file
> > /usr/share/src/myoi-userland/components/developer/rust/RESOLVE_DEPS= Any
> > idea what goes wrong here? To simplify things I just used sample manifest
> > p5m file to exclude home made errors.
>
> First of all, I'm pleased that somebody else is working on rust: I
> thought I was the only one.
>
> I anticipated that the upgrade would be difficult, but it's essential
> to upgrade any packages that still use clang-90 .  Rust is one of
> these.  Consequently, I did the upgrade by stages.  The first stage
> was to build and publish the original rust package with no change.
> I found I had to make one change: COMPONENT_PRE_CONFIGURE_ACTION
> had to copy files, instead of creating symlinks or hard links.  Then,
> build and publish were successful
>
> Subsequent stages were to upgrade clang, to upgrade python, and to
> convert the Makefile to the new style.  I'm still stuck in the second
> stage.  You clearly have gotten further.  I found many things that did
> not work, but nothing successful.  The original rust version (1.44.1)
> is too old to build with clang-13.  I chose 1.60.0, since it had a
> bootstrap archive available from Joyent.  I also found that this
> version will not build with the clang compilers.  I had to revert to
> gcc for these.  Still, my builds terminated with this error:
>
>     libLLVM-14-rust-1.60.0-stable.so is missing
>
> I don't know how to get past that error.

I would be inclined to try this strategy:

    - use rustup to get a bootstrap compiler, as the
      Rust project builds official illumos binaries

      see: https://rustup.rs for instructions

    - use GCC, not Clang

    - use the Rust-provided static LLVM, not
      the shared LLVM provided by OI

      this should be fine as of the resolution to:

      14250 ld should resolve discarded COMDAT symbols against their mates
          https://www.illumos.org/issues/14250

Let me know if this doesn't work, because there is likely some bug
that we can fix upstream, etc.


Cheers.

-- 
Joshua M. Clulow
http://blog.sysmgr.org



More information about the oi-dev mailing list