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
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
Release 1.12.1 is a maintenance release which fixes some
regressions in the 1.12.0 version, including memory corruption
under certain conditions. Details can be found in the release
announcement: https://blog.rust-lang.org/2016/10/20/Rust-1.12.1.html
MFH: 2016Q4
A custom bootstrap compiler package had to be created for DragonFly using
FreeBSD's as a model since upstream did not provide one for DF this time.
Approved by: riggs (maintainer)
* rust: drop no longer used RUST_SOURCE variable
* rust: apply rust-nightly FIXME comment about stage-qa (strip)
* rust-nightly: properly conflict for install with rust package
* rust-nightly: inherit |make test| support from r401025
* rust-nightly: as DOCSDIR is the same drop unnecessary DOCS option
Approved by: riggs, dumbbell (maintainers)
Differential Revision: https://reviews.freebsd.org/D5789