pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: using binary Rust on Solaris



"Clausen, Jörn" <joern.clausen%uni-bielefeld.de@localhost> writes:

> Hello!
>
> I'd like to build a current ansible-core on Solaris 11, which requires
> py-cryptography, wich requires Rust.
>
> In order to avoid the hustle of building lang/rust, I decided to
> install rustc via Oracle IPS. I then defined
>
> PREFER_NATIVE =              rust-bin
> RUST_TYPE =                  bin

RUST_TYPE=bin says to use rust-bin

The first line doesn't do anything.

> But building security/py-cryptography still tries to build
> lang/rust-bin, which then fails. How do I convince pkgsrc to use the
> native Rust compiler?

Write and debug a builtin.mk that looks for and qualifies as native rust
and arranges to use that instead.  This is analogous to how every other
native thing is used instead of the pkgsrc version when good enough.

As I understand it, people generally think this would be ok, but also
that it is a lot of work and so far nobody has taken the time to do it.

The wrinkle is that rust is an unstable family of languages and it seems
that code  has to be written to a specific version.  Or rather that
while most code can handle a range, using an older version could be
trouble, and a newer one could too.

But, it's probably ok to look at the version-required variable and
accept the native one if it's >=, hope for the best, and fix whatever
needs fixing.  That is the usual approach for checking native.


Home | Main Index | Thread Index | Old Index