Closed Bug 1617782 Opened 4 years ago Closed 4 years ago

Tracking bug for compile SeaMonkey with latest Rust versions

Categories

(SeaMonkey :: Release Engineering, enhancement)

SeaMonkey 2.53 Branch
enhancement
Not set
normal

Tracking

(seamonkey2.49esr unaffected, seamonkey2.53+ fixed, seamonkey2.57esr? affected)

RESOLVED FIXED
seamonkey2.53
Tracking Status
seamonkey2.49esr --- unaffected
seamonkey2.53 + fixed
seamonkey2.57esr ? affected

People

(Reporter: buc, Unassigned)

References

Details

(Whiteboard: SM2.53.6)

User Story

See also
Bug 1640982 rust 1.45 error: options `-C embed-bitcode=no` and `-C lto` are incompatible
Bug 1654465 7.57 - 9.16% build times (linux64-shippable, osx-shippable) regression on pushrange 034864174a - bb79da633a (Mon July 20 2020)

Attachments

(10 files)

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0

Steps to reproduce:

This is a tracking bug for build SeaMonkey with the latest Rust versions (>= 1.40)

Let's collect all rust-compatibility patches in one place.

At the time of writing SM is compiled fine by rust-1.37. Applying some patches allows it to compile with more recent rust versions.

Initially derived from https://github.com/MrAlex94/Waterfox/commit/617493ea44cd5599bb1bd2163611d3244afce947

xpcom/rust/nsstring uses "#![deny(warnings)]", and since rust-1.39 it triggers denied warnings about "try!" statements in the required third_party/rust/bitflags-0.8.2 code.

Recent FF versions drop this denying, since still need to use "try!" somewhere.

The correspond FF commit is
https://hg.mozilla.org/releases/mozilla-beta/rev/9c48b0136c8a
(it was applied when xpcom/rust/nsstring was temporary at servo/support/gecko/nsstring).

Second rust-1.40 issue is third_party/rust/url .
Rust complains about a statement which we cannot modify easily due to missing man power in the rust skills. The problem statement is gone after update to rust-url-1.7.2, but backporting looks impossible due to a lot of prerequisites. The only solution is to update the whole rust-url crate.

The next group of patches derived from the correspond FF commits, with minimal changes.

Part1: some preparation...

Part2: update to url-1.6.0 .

From:
https://hg.mozilla.org/mozilla-central/rev/788e64fb4fd49f61a871a9cdad29a79ad347d3e9
with removed parts related to third_party/rust/url-1.5.1

Part3: Update to url-1.7.0

From:
https://hg.mozilla.org/mozilla-central/rev/c217f857942fe082fd3738d645b082ad1af5d7ba
plus removed (still not used by us) root Cargo.lock

Note for downstreams: the patch removes github.png "binary", hence should be applied by "git apply" rather than "patch -p1" (for rpm packages, use "git apply %{PATCHNNN}" instead of "%patchNNN -p1")

Part4: some preparation before update to 1.7.2

Part5: Update to 1.7.2

From:
https://hg.mozilla.org/mozilla-central/rev/93bdaf4be8e4042cadf8fddcc20d43155622474c
plus removed (not used) root Cargo.lock and netwerk/base/mozurl/Cargo.toml hunk.

Part6: some final things.

netwerk/base/rust-url-capi/Cargo.toml and toolkit/library/rust/Cargo.lock

Rust-1.41 complains about a statement in third_party/rust/encoding_rs, which is gone in FF after update to encoding_rs-0.7.0:
https://hg.mozilla.org/releases/mozilla-release/rev/72887ce9eaba5f8c0831fbc2b6026690dc8f060d
Fortunately, the fix can be easily backported, thus a trivial patch is required only.

Flags: needinfo?(frgrahl)

Thanks. This still needs some toolchain build fixes to be usable under Windows. Currently breaks there in configure. I started backporting these but got sidetracked. IanN is currently backporting other changes for this so that we can have a full patch chain later.

Flags: needinfo?(frgrahl)

I have added to patches and some build fixes to the unofficial 2.53.2 build queue. This will not work for Windows yet. The proper build fixes need too many prerequisite fixes right now. Linux will likely work.

For rust-1.42, no additional patches required (comparing with rust-1.41).

I think everybody is forgetting, or rust developers, those using platforms/CPU's without SSE2 CPU instruction set, and/or 32bit archs. (eg. <= march=i586)

So far, with rust almost explicitly requiring SSE2, it prevents newer builds from being installed on two computers here.

SeaMonkey 2.53.x requires an SSE2 capable CPU but this has nothing to do with Rust. 2.49.5 was the last version without Linux SSE2 support. It is 2020 and the last CPU without was from around 2004. It does not make sense to account for these old CPUs any longer.

Status: UNCONFIRMED → NEW
Ever confirmed: true

2.53.3 compiled fine with rist-1.44

Depends on: 1640982, 1654465
No longer depends on: 1654465, 1640982

Let not link mozilla bugs to our 2.53 and 2.57 bugs. Usually only causes bugspam because changes here might be propagated.

User Story: (updated)

Patch to compile 2.53.3 with rust-1.45 .

Derived from bug #1654465, commit e5d2a6d5187b

Note, the commit also decided to reduce the number of rust versions supported by Firefox, otherwise the needed makefile statement does not fit completely on the developer screen :)
Since SeaMonkey seems still compiled fine with rust < 1.38, such changes should not be applied (ie. >= 1.31.0 as before).

If your build system supports RUSTFLAGS, you can just add "-Cembed-bitcode=yes" instead of the patch.

Flags: needinfo?(frgrahl)

Patch to compile 2.53.3 with rust-1.45 .

Will be in 2.53.4

Flags: needinfo?(frgrahl)

2.53.4 compiled fine with rust-1.46

2.53.5 compiled fine with rust-1.47

This patch required to cimpile SeaMonkey 2.53.5 (2.53.5.1) with rust-1.48 .

As an alternative, just build with --disable-rust-simd

Support for later rust versions than 1.37 has been aded to 2.53.6b1. The minimum supported rust version is now 1.38.
Support for 2.57 is there but needs some backports outside of the scope of this bug.

Blocks: 1682424
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Whiteboard: SM2.53.6
Target Milestone: --- → seamonkey2.53
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: