- The ABI patch is no longer needed on head due to fixes being upstreamed
to use the pre-ino64 symbols. The ABI patch is still needed for the
bootstrap but should be removable for 1.26.0 if it uses beta 2018-03-18.
PR: 227130 [based on]
Tested by: dumbbell, Charlie Li
Submitted by: riggs [based on]
Differential Revision: https://reviews.freebsd.org/D14921 [based on]
The announcement is available on Rust blog:
https://blog.rust-lang.org/2018/03/01/Rust-1.24.1.html
There is a compilation error when it builds `clippy-driver` and `miri`
but it apparently doesn't affect the result. There are probably optional
tools/dependencies.
- Add some context in the patches for where they came from. They need to be
in 1 patch due to needing to use the .orig file for fixing up checksums.
Obtained from: rust upstream
- Stop using git to build as it is unmaintainable due to submodules,
but more importantly because src/vendor is no longer bundled. Just
fetch the source already generated that has all dependencies bundled.
It may be a bit slower to get updates but is far more maintainable.
- Copy all patches to lang/rust-nightly/files since they may not always
apply exactly between both versions.
- Add in patch for llvm-config getting -lexecinfo wrong, this is in
review with LLVM at https://reviews.llvm.org/D42702.
- Bring in other random updates from lang/rust.
gmake: Leaving directory '.../aarch64-unknown-freebsd/release/build/rustc_binaryen-cfb76adb9420e94c/out/build'
--- stderr
c++: error: the clang compiler does not support '-march=native'
c++: error: the clang compiler does not support '-march=native'
PR: 225600
Reported by: Gergely Czuczy, pkg-fallout
Obtained from: upstream (binaryen 1.37.35)
Approved by: portmgr blanket
The suffix of that file changed in recent versions of Rust and it's
changing again between Rust 1.23.0 and 1.24.0. So let's grep the
filename from the list of files contained in the ar archive.
This wasn't reported by a simple `poudriere bulk`, but a `poudriere
testport` revealed the problem:
====> Running Q/A tests (stage-qa)
Error: 'lib/rustlib/manifest-rustfmt-preview' is referring to /wrkdirs/usr/ports/lang/rust/work/stage
Warning: 'bin/rustfmt' is not stripped consider trying INSTALL_TARGET=install-strip or using ${STRIP_CMD}
...
===> Checking for items in STAGEDIR missing from pkg-plist
Error: Orphaned: bin/rustfmt
Error: Orphaned: lib/rustlib/manifest-rustfmt-preview
PR: 225445
Reported by: jbeich@
Firefox 57.0 failed to build with Rust 1.23.0 with the following error:
error: unused import: `std::ascii::AsciiExt`
--> /wrkdirs/usr/ports/www/firefox/work/firefox-57.0.4/servo/components/style/gecko_string_cache/mod.rs:16:5
|
16 | use std::ascii::AsciiExt;
| ^^^^^^^^^^^^^^^^^^^^
|
note: lint level defined here
--> /wrkdirs/usr/ports/www/firefox/work/firefox-57.0.4/servo/components/style/lib.rs:26:9
|
26 | #![deny(warnings)]
| ^^^^^^^^
= note: #[deny(unused_imports)] implied by #[deny(warnings)]
Now that Firefox is updated to 58.0, the build succeeds.
Currently we need to update `.cargo-checksum.json` in several patched
crates. But those crates are missing from the sources if they come from
GitHub instead of a proper released source archive. This change makes
`post-patch` and `do-configure` recipes fine in both cases.
This simplifies the `Makefile`. The condition was fragile anyway because
it was based solely on the Makefile and not the actual content of
`stage0.txt`.
Before the patch, the default behavior of the compiler was to omit frame
pointers. However, even though it looks fine for the code produced
by the compiler, the compiler itself was broken. When there was a
compilation error, rustc panics to report that error. While handling
that panic, it tries to unwind the stack but fails to do so, which
results in an abort(3).
Here is an example:
$ rustc hello.rs
error: invalid reference to argument `0` (no arguments given)
--> hello.rs:2:5
|
2 | println!("Hello {}")
| ^^^^^^^^^^^^^^^^^^^^
|
= note: this error originates in a macro outside of the current crate
error: aborting due to previous error
fatal runtime error: failed to initiate panic, error 5
Abort trap (core dumped)
The problem also exists on other systems such as OpenBSD and
i686-unknown-linux-musl. "omit frame pointers" was already disabled for
i686-unknown-linux-musl:
88a28ff602/src/librustc_back/target/i686_unknown_linux_musl.rs (L22)
The patch does the same for *-unknown-freebsd.
See the upstream bug for more informations:
https://github.com/rust-lang/rust/issues/43575
This may help ports like textproc/ripgrep to run on old hardware.
Rust itself still requires SSE2 until bootstrap is regenerated.
PR: 223415
Approved by: rust (dumbbell)
FTR, this option allowed to used LLVM from ports instead of building the
bundled copy.
The problem is that this combination isn't really tested upstream. This
led to regressions which are difficult to diagnose. For instance, in
Rust 1.21.0, the bundled LLVM provided a new API to query the features
supported by the target arch. The equivalent code inside Rust was
removed to use that new API. Unfortunately, building Rust 1.21.0+ with a
copy of LLVM not providing this API didn't failed but instead made that
list of CPU features empty. This resulted in the following obscure build
failure in Firefox:
error[E0432]: unresolved import `x86::sse2`
To avoid future pain for both end users and maintainers, we decided to
remove that option. Yes, it will increase the (already long) time to
build Rust, but it should save time wasted on debugging what is not
really supported anyway.
PR: 223342, 223300
Reported by: Many users
Support for LibreSSL up-to 2.6.3 is now included, thus we can remove the
patches to the `openssl` and `openssl-sys` crates.
The renewed bootstrap for aarch64 was created on 11.0-RELEASE, instead
of 11.1-STABLE. It should allow it to run on all 11.x and thus fix the
build on 11.0-RELEASE. [1]
PR: 223009 [1]
Like other manifests, without this, it still references the stage
directory. This error is reported when DEVELOPER=YES is set.
While here, strip `bin/rls`.
Reported by: bar@, cpm@
The official bootstraps wouldn't work: rustc was stalled on a mutex
while compiling a crate early in the build. This was solved by creating
a new bootstraps for "rustc" and "rust-std" from the existing FreeBSD
package. We keep using the official "cargo" bootstrap.
PR: 223123
As this fixes Stylo on i386, remove the workaround in www/firefox.
PR: 223047
Suggested by: Sebastien Marie <semarie@openbsd.org>
Approved by: rust (dumbbell)
MFH: 2017Q4 (required by Firefox 57 scheduled on 2017-11-14)
This patch only upgrades the port to Rust 1.20.0. The PR also covers a
build failure with the latest LibreSSL, which is not addressed here.
PR: 222359
Reported by: Charlie Li <ml+freebsd-bugs@vishwin.info>
This port now provides Cargo. This is the recommended now because Cargo
won't be provided separately in the future.
To build Cargo, we set `extended = true` in `config.toml`. As a side
effect, this flag also installs Rust source code. The port has a new
`SOURCES` option (disabled by default) to keep those sources.
As a consequence of this, `devel/cargo` is removed. Several ports
and Makefiles in Mk were updated to depend on `lang/rust` instead of
`devel/cargo`.
The other big change in this patch is the use of the bundled crates,
instead of relying on Cargo's registry (which was part of the distfiles,
in order to allow offline builds). So now, we don't need to prepare the
registry when updating this port.
This has several other benefits:
* It fixes the build with sudo(8).
* It fixes the use of the ino-64 patch (it was not applied to the
registry, thus not used).
Compilation errors were fixed in the ino-64 patch.
Various `.cargo-checksum.json` files are updated after the sources are
patched (FBSD10_FIX, ino-64, and so on). This fixes builds which were
failing with errors such as:
error: the listed checksum of `.../rustc-1.19.0-src/src/vendor/lzma-sys/xz-5.2.3/build-aux/config.rpath` has changed:
expected: c8b4c017079da9dfb3086a0583e60ffe736184d89005dc5973f0bb0fd17c04bb
actual: 561b00eb30ecaef2c9da17bc195e7d2a7ea63facea38ea9849fbb0ed340bebba
PR: 221088
Reported by: joneum@, nwhitehorn@, romain@,
Ekaterina Vaartis <vaartis@cock.li>,
david@catwhisker.org,
fullermd@over-yonder.net,
rum1cro@yandex.ru,
w.schwarzenfeld@utanet.at
Differential Revision: https://reviews.freebsd.org/D11783
The path to `llvm-config40` was set to the empty string in the generated
`config.toml`, because I was still using the ${LLVM_PREFIX} variable
instead of the appropriate ${LLVM_CONFIG}. Bad completion and lack of
testing, sorry for that...
Reported by: Rainer Hurling <rhurlin@gwdg.de>,
Walter Schwarzenfeld <w.schwarzenfeld@utanet.at>,
dim@
The BUILD_DEPENDS argument for the PORT_LLVM option was not updated: it
was using the ${LLVM_PREFIX} variable which was removed. Now, it uses
${LOCALBASE} and ${LLVM_VER} as a suffix to the executable verified.
Submitted by: Rainer Hurling <rhurlin@gwdg.de>
Reported by: Rainer Hurling <rhurlin@gwdg.de>
The main change in the port is the switch from configure+make to the
`x.py` build script. This is the recommended way of building Rust. It
takes a configuration file, `config.toml`, which, in the port case,
indicates:
* where to install things;
* which release channel to use;
* where to find Python and llvm-config;
* if documentation should be also built.
The build process should now honor ${MAKE_JOBS_NUMBER} instead of always
using all available CPU cores.
The Cargo registry archive is significantly larger. It includes the
whole registry index (not only the crates needed by Rust). If the index
is missing, Cargo wants to download it from crates.io and I couldn't
find a way to convince it skip it.
New bootstraps for FreeBSD/aarch64 were prepared for this update. Those
are based on Rust 1.18.0 and Cargo 0.19.0.
CONFLICTS_BUILD with installed lang/rust and lang/rust-nightly is
commented out for now. I couldn't see any build failure with an installed
lang/rust so it looks promising. But I couldn't test with an installed
lang/rust-nightly because the latter is marked BROKEN for now. Once it's
restored, I'll do more testing and hopefully completely remove this
CONFLICTS_BUILD variables.
This port now uses an unofficial bootstrap of Rust 1.17.0 and Cargo
0.18.0 for FreeBSD/aarch64. Here are my notes to create this boostrap:
https://gist.github.com/dumbbell/b587da50ef014078da9e732a4331ebad
The port's Makefile was changed to:
- allow to override the versions and directories of the bootstrap
archives;
- patch the bootstrap script and manifest with those
versions/directories.
Beside changes to support FreeBSD/aarch64, the port received the
following fixes:
- Pass python path to the configure script.
- Fix and simplify the extraction of rust-std bootstrap by re-using
existing variables.
- Make sure tar(1) doesn't produce sparse file entries when it
recreates the rust-std bootstrap because Python 2's tarfile module
doesn't support them (PR 219842).
PR: 216143, 219842
Differential Revision: https://reviews.freebsd.org/D10857
Several libraries have their filename computed and based on the absolute
path to source files. Therefore, we need to generate the PLIST. Rust
installer already produces manifests listing files it installs. The port
now uses those files to complete `${TMPPLIST}`.
While the port built fine in Poudriere, it failed when built directly on
the host (regular make or with portmaster(1)) or using a different tool
such as Synth. This commit fixes the build for those methods.
Handling of DOCS-specific files is also unified with normal files. This
gets rid of code duplication.
How to do reproducible builds will be studied later.
PR: 217309
Reported by: Several people on freebsd-ports@ or Bugzilla
Tested by: Almost everyone who reported the issue
Approved by: antoine (mentor), riggs (maintainer of lang/rust)
Differential Revision: https://reviews.freebsd.org/D9816
Add a pkg-message to these ports advising users to mount procfs to see
backtraces.
Reviewed by: dumbbell, riggs
Approved by: dumbbell (ports)
Sponsored by: Spectra Logic Corp
Differential Revision: https://reviews.freebsd.org/D9838
Both versions of Rust seen changes to their build system. Now they
require a bootstrap of Cargo and thus, a snapshot of Cargo's registry.
Each library has its own suffix instead of a common suffix for a given
version of Rust. Thus all future updates of the ports will include
changes to their plist.
$DISTFILES are now all under the `rust` directory in `$DISTDIR`. A
similar change will be committed to devel/cargo later.
lang/rust-nightly is enabled on i386 (bugzilla 216143). The source
snapshot also contains everything to build it on aarch64, but enabling
it will be committed later.
PR: 216143
Approved by: riggs, bapt (mentor), antoine (mentor)
Differential Revision: https://reviews.freebsd.org/D9286