tech-pkg archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
rust and NetBSD/i386 8.x
Hi,
I don't know if anyone has noticed, but it looks like our "rust"
package has ceased to be buildable on NetBSD/i386 8.x.
Rummaging through my old build logs, I see that this surfaced
with rust version 1.70.0.
Our/my system for cross-building bootstrap kits for our rust port
had been built against a DESTDIR of a netbsd-8 i386 system
"forever", until that hit the following problem:
[ 1%] Building IntrinsicsAArch64.h...
In file included from /usr/pkgsrc/wip/rust/work/rustc-1.70.0-src/src/llvm-project/llvm/include/llvm/ADT/ArrayRef.h:12:0,
from /usr/pkgsrc/wip/rust/work/rustc-1.70.0-src/src/llvm-project/llvm/include/llvm/TableGen/Record.h:17,
from /usr/pkgsrc/wip/rust/work/rustc-1.70.0-src/src/llvm-project/llvm/utils/TableGen/Attributes.cpp:9:
/usr/pkgsrc/wip/rust/work/rustc-1.70.0-src/src/llvm-project/llvm/include/llvm/ADT/Hashing.h:54:10: fatal error: optional: No such file or directory
#include <optional>
^~~~~~~~~~
compilation terminated.
and similarly for <variant>.
Again, this surfaces because the setup I use for cross-building
our bootstrap kits is done as a "single stage", and is also
always built using the embedded LLVM in the rust distribution so
as to not have a run-time dependency on a particular version of
LLVM for either of rust-bin or the following bootstrap kits.
This means that when the embedded LLVM is upgraded and requires a
newer C++ environment than what we supplied with NetBSD 8.0 way
back when, it basically became impossible to use this method to
build newer bootstrap kits for i386.
I worked around this issue by upgrading the i386 DESTDIR that I
use to build against (using either cross.mk or do-cross.mk from
the rust package) to NetBSD/i386 9.3, and with that, the cross-
build succeeded.
However, this causes the bootstrap kits that we distribute to no
longer work on NetBSD/i386 8.0: early in the build process you'll
see this error message:
error: process didn't exit successfully: `/usr/pkgsrc/wip/rust174/work/rust-bootstrap/bin/rustc -vV` (exit status: 1)
--- stderr
Shared object "libstdc++.so.9" not found
libstdc++.so.9 comes from 9.3's /usr/lib.
It is conceivable that it is still possible to build newer rust
versions on NetBSD/i386 8.0, but it will
a) require a native build of each version, starting with a
bootstrap kit from 1.69.0 up to the version you desire, using
the previous version's "dist" result as bootstrap kit for the
next version (as rust only supports one version backward
compatibility...)
b) require the use of an external LLVM instead of the embedded
LLVM inside the rust distribution. I have in the past
succeeded in building even 1.74.0 with an external LLVM
version 15.0.7.
But... That's not how I build the bootstrap kits for our various
NetBSD targets, and going through this process to continue to
support NetBSD/i386 8.x with rust I consider to be too much of a
pain.
Given that we at least "in name" still support NetBSD/8.0 with
pkgsrc, I found it pertinent to send this "heads up", even though
I have not picked up any signal indicating that someone else has
stumbled upon this particular problem, and found reason to raise
the issue. I may not have listened in on all the channels,
though...
Comments / opinions?
Best regards,
- Håvard
Home |
Main Index |
Thread Index |
Old Index