Page MenuHomeFreeBSD

lang/rust: Update to 1.38.0
ClosedPublic

Authored by tobik on Sep 24 2019, 1:51 PM.
Tags
None
Referenced Files
F102786240: D21778.id62567.diff
Sun, Nov 17, 4:31 AM
Unknown Object (File)
Sat, Nov 9, 11:41 AM
Unknown Object (File)
Fri, Nov 8, 2:29 AM
Unknown Object (File)
Tue, Nov 5, 12:16 PM
Unknown Object (File)
Sat, Nov 2, 11:12 AM
Unknown Object (File)
Sat, Nov 2, 7:23 AM
Unknown Object (File)
Sat, Nov 2, 6:17 AM
Unknown Object (File)
Sat, Oct 26, 1:30 PM
Subscribers

Details

Summary
Test Plan

12.0 amd64 ok, consumers ok
11.2 i386 ok, consumers ok
11.2 amd64 ok, consumers ok (by @jbeich)
11.3/12.0/13.0 i386/amd64 ok, consumers untested (by @jbeich)
ppc64 elfv1 ok (by @mikael.urankar_gmail.com)
armv7 unclear

Diff Detail

Repository
rP FreeBSD ports repository
Lint
No Lint Coverage
Unit
No Test Coverage
Build Status
Buildable 26687
Build 25051: arc lint + arc unit

Event Timeline

I forgot to upload them, it's ok now.

I screw up my testing on armv7 for the missing clear_cache symbol, compiler-rt is also required on armv7:

--- Makefile    (revision 512718)
+++ Makefile    (working copy)
@@ -18,6 +18,7 @@
                ${_CARGO_BOOTSTRAP}${BOOTSTRAPS_SUFFIX}.tar.gz:cargo_bootstrap \
                ${DISTFILES_${ARCH}}
 DISTFILES_armv6=       compiler-rt-8.0.1.src.tar.xz:compiler_rt
+DISTFILES_armv7=       ${DISTFILES_armv6}
 DIST_SUBDIR?=  rust
 EXTRACT_ONLY?= ${DISTFILES:N*\:*bootstrap:C/:.*//}
 
@@ -106,7 +107,7 @@
                ${WRKSRC}/build/cache/${_RUST_STD_BOOTSTRAP}.tar.gz
        ${LN} -sf ${DISTDIR}/${DIST_SUBDIR}/${_CARGO_BOOTSTRAP}${BOOTSTRAPS_SUFFIX}.tar.gz \
                ${WRKSRC}/build/cache/${_CARGO_BOOTSTRAP}.tar.gz
-.if ${ARCH} == armv6
+.if ${ARCH} == armv6 || ${ARCH} == armv7
        ${LN} -sf ${WRKDIR}/compiler-rt-8.0.1.src ${WRKSRC}/src/llvm-project/compiler-rt
 .endif

gcc8 is probably not required anymore on ppc64. if I'm not mistaken, we switched to gcc9 some time ago, so the bootstrap are built with gcc9. I'll check tomorrow.

  • Add aarch64 bootstrap
  • Add compiler-rt for armv7 too
  • Use gcc9 on powerpc64
  • Unbreak devel/racer and update to 2.1.27

mail/thunderbird, www/firefox-esr, www/cliqz all fail to build with:

50:13.00 error[E0506]: cannot assign to `self.input.cached_token` because it is borrowed
50:13.00    --> /wrkdirs/usr/ports/www/cliqz/work/browser-f-1.28.2/mozilla-release/third_party/rust/cssparser/src/parser.rs:584:17
50:13.00     |
50:13.00 559 |     pub fn next_including_whitespace_and_comments(&mut self) -> Result<&Token<'i>, BasicParseError<'i>> {
50:13.00     |                                                   - let's call the lifetime of this reference `'1`
50:13.00 ...
50:13.00 572 |             Some(ref cached_token)
50:13.00     |                  ---------------- borrow of `self.input.cached_token` occurs here
50:13.00 ...
50:13.00 584 |                 self.input.cached_token = Some(CachedToken {
50:13.00     |                 ^^^^^^^^^^^^^^^^^^^^^^^ assignment to borrowed `self.input.cached_token` occurs here
50:13.00 ...
50:13.00 596 |         Ok(token)
50:13.00     |         --------- returning this value requires that `self.input.cached_token.0` is borrowed for `'1`
50:13.41 error: aborting due to previous error

https://people.freebsd.org/~tobik/logs/cliqz-1.28.2_1.log
https://people.freebsd.org/~tobik/logs/firefox-esr-68.1.0_3,1.log
https://people.freebsd.org/~tobik/logs/thunderbird-68.1.1.log

  • Add aarch64 bootstrap
  • Add compiler-rt for armv7 too
  • Use gcc9 on powerpc64

my bootstrap still uses gcc8. We don't have binaries packages on 11.2 and gcc9 takes a lot of time to build on my powermac g5, so I'm still using gcc8. I'm migrating my jail to 12.0, we have binaries packages on this branch so it'll be easier for me to maintain rust on ppc64. If ppc64 users are complaining, they'll have to create the bootstrap themselves.

Tip: if you bump PORTREVISION before testing consumers it'd save you time on rebuilds after landing.

  • Backport [1] and unbreak cliqz, firefox-esr, thunderbird

[1] https://github.com/servo/rust-cssparser/commit/3c98d22c5de3b696bf1fde2b6c90069812312aa6

Thanks. Looks OK to me.

lang/rust/Makefile
21

Both lines may need update to 9.0.0 to match bundled LLVM.

$ rustc -vV
rustc 1.38.0
binary: rustc
commit-hash: unknown
commit-date: unknown
host: x86_64-unknown-freebsd
release: 1.38.0
LLVM version: 9.0
This revision is now accepted and ready to land.Sep 25 2019, 12:06 PM
tobik edited the test plan for this revision. (Show Details)
  • Back to gcc8 on powerpc64
  • Update compiler-rt to 9.0.0
  • Bump consumers' PORTREVISION and Rust version in cargo.mk
This revision now requires review to proceed.Sep 25 2019, 3:45 PM

compiler-rt 9 breaks armv7:

running: "cc" "-O2" "-ffunction-sections" "-fdata-sections" "-fPIC" "-ffunction-sections" "-fdata-sections" "-fPIC" "-fno-builtin" "-fvisibility=hidden" "-ffreestanding" "-fomit-frame-pointer" "-DVISIBILITY_HIDDEN" "-o" "/usr/ports/lang/rust/work/rustc-1.38.0-src/build/armv7-unknown-freebsd/stage0-std/armv7-unknown-freebsd/release/build/compiler_builtins-7e603ab6ad926472/out/clear_cache.o" "-c" "/usr/ports/lang/rust/work/rustc-1.38.0-src/src/llvm-project/compiler-rt/lib/builtins/clear_cache.c"
cargo:warning=In file included from /usr/ports/lang/rust/work/rustc-1.38.0-src/src/llvm-project/compiler-rt/lib/builtins/clear_cache.c:26:
cargo:warning=/usr/include/machine/sysarch.h:97:22: error: unknown type name 'u_int'
cargo:warning=int     arm_sync_icache (u_int addr, int len);
cargo:warning=                         ^
cargo:warning=1 error generated.
exit code: 1

@mikael.urankar_gmail.com, should be easy to fix, see llvm#D68045

  • Update with gcc9 powerpc64 bootstrap
  • Add COMPILER_RT_VERSION variable
  • Ignore on FreeBSD 11.x powerpc64
  • Add compiler-rt patch (change by @jbeich)

@mikael.urankar_gmail.com Can you retest on armv7 with @jbeich's patch applied?

There is something weird when fetching compiler-rt:

=> compiler-rt-9.0.0.src.tar.xz doesn't seem to exist in /mnt/usr/ports/distfiles/rust.
=> Attempting to fetch https://releases.llvm.org/9.0.0/compiler-rt-9.0.0.src.tar.xz
fetch: 1993084: No such file or directory
compiler-rt-9.0.0.src.tar.xz                          1946 kB   22 MBps    00s
=> Attempting to fetch http://distcache.FreeBSD.org/ports-distfiles/rust/compiler-rt-9.0.0.src.tar.xz
fetch: 1993084: No such file or directory
fetch: http://distcache.FreeBSD.org/ports-distfiles/rust/compiler-rt-9.0.0.src.tar.xz: Not Found
=> Couldn't fetch it - please try to retrieve this
=> port manually into /mnt/usr/ports/distfiles/rust and try again.

compiler-rt is listed twice in the distinfo, I suppose the 'makesum' target is ran twice (for armv6 and armv7)

it builds fine on ppc64 elfv1, armv7 almost finished with compiler-rt 8 (I had to interrupt the build). I'm not sure I'll be able to test compiler-rt9 today.

  • Remove duplicate entries from distinfo
This revision was not accepted when it landed; it landed in state Needs Review.Sep 27 2019, 9:35 AM
Closed by commit rP513013: lang/rust: Update to 1.38.0 (authored by tobik). · Explain Why
This revision was automatically updated to reflect the committed changes.