tech-pkg archive

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

rust and NetBSD 9/i386, proposed fix



As most of you know I have been agitating about rust not working on
NetBSD 9/i386 for a while.  (Also current, but I'm much less concerned
about current in the context of the impending pkgsrc 2020Q3 branch.)

To summarize where we are:

  The NetBSD bootstrap kit, at least for i386, is built on NetBSD 8, so
  that it can run on 8/9/current.

  The kit is linked against pkgsrc openssl, because that's the openssl
  used on 8.

  Therefore, when the bootstrap compiler is run on 9, it fails, because
  pkgsrc openssl is not present.

  Installing pkgsrc openssl makes the build of the packge succeed.

  However, the package-built cargo is then linked against openssl.

  I am assuming that sparc64 and macppc have the same isues as i386, but
  I have no powered-up and configured hardware.

  I have tried to fix this, and jperkin pointed out that I did it wrong.
  Hence this note to get more eyes on the situation.

and

  Obviously this is all not a good situation and we need a better rust
  bootstrapping plan, which could include version-specific bootstrap
  kits and/or statically-linked bootstrap kits.  However it is also
  obvious that this will not be done and mergeable in the freeze
  timeframe, which is the next several days to possibly a week.

  Therefore we are looking for good enough to allow rust to build on
  NetBSD 9/i386, while not breaking other platforms, to avoid having a
  large number of broken packages for this branch.


Right now, there's a gratuitous second include of
security/openssl/buildlink3.mk, which is my fault.  With BUILD_DEPENDS
on openssl, rust built, but then the included cargo had a stray
reference:

$ ldd /usr/pkg/bin/cargo
/usr/pkg/bin/cargo:
        -lssl.1.1 => /usr/pkg/lib/libssl.so.1.1
        -lcrypto.1.1 => /usr/pkg/lib/libcrypto.so.1.1



So I tried to force pkgsrc openssl with the following:

  Index: Makefile
  ===================================================================
  RCS file: /cvsroot/pkgsrc/lang/rust/Makefile,v
  retrieving revision 1.194
  diff -u -p -r1.194 Makefile
  --- Makefile	24 Sep 2020 11:01:51 -0000	1.194
  +++ Makefile	24 Sep 2020 12:44:24 -0000
  @@ -529,8 +529,9 @@ DEPENDS+=	compat80>=0:../../emulators/co
   # Therefore the pkgsrc openssl libs need to be present as well.
   # Observed on i386, and presumed true on the other
   # bootstrap-built-for-8 systems.  It also is linked against by cargo,
  -# so it must be a run-time dependency as well.
  -.include "../../security/openssl/buildlink3.mk"
  +# so it must be a run-time dependency as well.   Therefore,
  +# we force-disable use of builtin, to require pkgsrc.
  +USE_BUILTIN.openssl=		no
   .endif

   .include "../../devel/zlib/buildlink3.mk"

but then I get a complaint that heimdal is not buildlinked.


I would like to hear from people about what we ought to do.  Thoughts
include:

  Have someone copy the carry-libs-along scheme that exists for illumos,
  which jperkin@ has pointed out multiple times.

  Figure out the heimdal problem, perhaps by USE_BUILTIN.heimdal=no.

  Have someone build a bootstrap kit for NetBSD 9/i386, and either use
  it on 9/current, or just replace it and break 8.

  Have someone figure out how to build a bootstrap kit static.

  Put in the branch announcement that NetBSD/i386 is unsuable for
  software written in rust and that people should stop using it.  (It's
  actually a good question how many people are using it for other than
  semi-embedded/server use these days anyway.)

Attachment: signature.asc
Description: PGP signature



Home | Main Index | Thread Index | Old Index