Page MenuHomeFreeBSD

lang/rust: update to 1.33.0
ClosedPublic

Authored by jbeich on Feb 25 2019, 7:03 PM.

Details

Summary
Test Plan

lang/rust:

consumers (on 11.2 amd64):

Some logs couldn't be uploaded as is e.g.,

$ curl -F c=@suricata-4.1.2_3.log https://ptpb.pw
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<title>500 Internal Server Error</title>
<h1>Internal Server Error</h1>
<p>The server encountered an internal error and was unable to complete your request.  Either the server is overloaded or there is an error in the application.</p>

so require some post-processing e.g.,

$ fetch -qo- https://ptpb.pw/sC0S | b64decode -o /dev/stdout | xzcat | less

Diff Detail

Repository
rP FreeBSD ports repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

jbeich created this revision.Feb 25 2019, 7:03 PM
jbeich set the repository for this revision to rP FreeBSD ports repository.Feb 25 2019, 7:04 PM

As Phabricator is only marginally better than Bugzilla (see below) I've pushed a temporary cumulative patch on GitHub.

$ fetch -o D19354.diff 'https://reviews.freebsd.org/D19354?download=true'
$ patch -CEfsp0 -i D19354.diff
No file to patch.  Skipping...
1 out of 1 hunks ignored while patching lang/rust/files/patch-vendor_backtrace-sys_src_libbacktrace_fileline.c
No file to patch.  Skipping...
1 out of 1 hunks ignored while patching lang/rust/files/patch-vendor_compiler__builtins_build.rs

Thank you, Jan.

lang/rust/Makefile
45 ↗(On Diff #54367)

This needs

BOOTSTRAPS_DATE_aarch64=	2018-12-20
BOOTSTRAPS_DATE_armv6=		2018-12-20
BOOTSTRAPS_DATE_armv7=		2018-12-20
BOOTSTRAPS_DATE_powerpc64=	2018-12-20

@mikael.urankar_gmail.com @pkubaj_riseup.net Can you test on tier 2 archs? Given that Rust does not compile with qemu-user-static, this will otherwise land without any testing there.

Some patches seem wrong:

root@talos:$/usr/ports/lang/rust$ make
===>  License APACHE20  MIT accepted by the user
===>   rust-1.33.0 depends on file: /usr/local/sbin/pkg - found
===> Fetching all distfiles required by rust-1.33.0 for building
===>  Extracting for rust-1.33.0
=> SHA256 Checksum OK for rust/rustc-1.33.0-src.tar.xz.
=> SHA256 Checksum OK for rust/2018-12-20/rustc-1.32.0-powerpc64-unknown-freebsd.tar.gz.
=> SHA256 Checksum OK for rust/2018-12-20/rust-std-1.32.0-powerpc64-unknown-freebsd.tar.gz.
=> SHA256 Checksum OK for rust/2018-12-20/cargo-0.33.0-powerpc64-unknown-freebsd.tar.gz.
/bin/ln -sf /usr/local/poudriere/ports/default/distfiles/rust/2018-12-20/rustc-1.32.0-powerpc64-unknown-freebsd.tar.gz  /usr/local/poudriere/ports/default/lang/rust/work/rustc-1.33.0-src/build/cache/2018-12-20
/bin/ln -sf /usr/local/poudriere/ports/default/distfiles/rust/2018-12-20/rust-std-1.32.0-powerpc64-unknown-freebsd.tar.gz  /usr/local/poudriere/ports/default/lang/rust/work/rustc-1.33.0-src/build/cache/2018-12-20
/bin/ln -sf /usr/local/poudriere/ports/default/distfiles/rust/2018-12-20/cargo-0.33.0-powerpc64-unknown-freebsd.tar.gz  /usr/local/poudriere/ports/default/lang/rust/work/rustc-1.33.0-src/build/cache/2018-12-20
===>  Patching for rust-1.33.0
===>  Applying FreeBSD patches for rust-1.33.0
File to patch:
No file found--skip this patch? [y] y
1 out of 1 hunks ignored--saving rejects to Oops.rej
=> FreeBSD patch patch-src_libbacktrace_fileline.c failed to apply cleanly.
=> Patch(es)  patch-src_bootstrap_bootstrap.py patch-src_bootstrap_native.rs applied cleanly.
*** Error code 1

Stop.
make[1]: stopped in /usr/local/poudriere/ports/default/lang/rust
*** Error code 1

Stop.
make: stopped in /usr/local/poudriere/ports/default/lang/rust

Also, there are conflicts when applying the patch:

root@talos:$/usr/ports$ svnlite patch D19354\?download\=true
U         lang/rust/Makefile
U         lang/rust/distinfo
D         lang/rust/files/patch-src_liblibc_src_unix_bsd_freebsdlike_dragonfly_mod.rs
D         lang/rust/files/patch-src_liblibc_src_unix_bsd_freebsdlike_freebsd_aarch64.rs
D         lang/rust/files/patch-src_liblibc_src_unix_bsd_freebsdlike_freebsd_arm.rs
D         lang/rust/files/patch-src_liblibc_src_unix_bsd_freebsdlike_freebsd_mod.rs
D         lang/rust/files/patch-src_liblibc_src_unix_bsd_freebsdlike_freebsd_powerpc64.rs
D         lang/rust/files/patch-src_liblibc_src_unix_bsd_freebsdlike_freebsd_x86.rs
D         lang/rust/files/patch-src_liblibc_src_unix_bsd_freebsdlike_freebsd_x86__64.rs
D         lang/rust/files/patch-src_liblibc_src_unix_bsd_freebsdlike_mod.rs
D         lang/rust/files/patch-src_libstd_build.rs
D         lang/rust/files/patch-src_libstd_os_raw_mod.rs
C         lang/rust/files/patch-vendor_backtrace-sys_src_libbacktrace_fileline.c
>         rejected hunk @@ -1,7 +1,7 @@
C         lang/rust/files/patch-vendor_compiler__builtins_build.rs
>         rejected hunk @@ -1,5 +1,5 @@
U         lang/rust/files/patch-vendor_libc_src_unix_bsd_freebsdlike_freebsd_mod.rs
D         lang/rust/files/patch-vendor_openssl-sys_build_main.rs
Summary of conflicts:
  Text conflicts: 2
In D19354#414417, @pkubaj_riseup.net wrote:

Also, there are conflicts when applying the patch:

You need to fetch jbeich's patch: fetch -o rust.patch 'https://github.com/freebsd/freebsd-ports/compare/master...jbeich:rust.diff'

works for me on ppc64, build on aarch64 is ongoing, will test armv6/7 this evening/tomorrow.

jbeich updated this revision to Diff 54415.Feb 26 2019, 2:24 PM
jbeich edited the test plan for this revision. (Show Details)

My QA is done:

  • Bump PORTREVISION in consumers
  • Unbreak textproc/ripgrep, www/firefox

Note, review commit message as well.

jbeich marked an inline comment as done.Feb 26 2019, 2:25 PM
jbeich added inline comments.Feb 26 2019, 2:30 PM
Mk/bsd.gecko.mk
358 ↗(On Diff #54415)

See upstream bug. Fixing properly requires either backporting huge patch under files/ or increased maintenance due to non-patch changes.

tobik accepted this revision.Feb 26 2019, 9:32 PM

Hmm, is this diff based on D19309? I see that libc bumps are there, but not marked as a change here on Phabricator. I'm assuming that you plan to land the changes in two commits?

Anyway this seems fine, but needs a Rust version bump in cargo.mk again. And let's wait to hear from @mikael.urankar_gmail.com and @pkubaj_riseup.net about arm* and powerpc64.

This revision is now accepted and ready to land.Feb 26 2019, 9:32 PM

Ok on armv7, ppc64. It fails on aarch64:

 Documenting std v0.0.0 (/usr/ports/lang/rust/work/rustc-1.33.0-src/src/libstd)
error: `[7:4]` cannot be resolved, ignoring it...
 --> src/libstd/../stdsimd/stdsimd/arch/detect/os/aarch64.rs:9:27
  |
9 | //! when ID_AA64ISAR0_EL1[7:4] is >= 1, AES is supported; when it's >= 2, PMULL is supported.
  |                           ^^^ cannot be resolved, ignoring
  |   
note: lint level defined here         
 --> src/libstd/lib.rs:215:9
  |   
21| #![deny(intra_doc_link_resolution_failure)]
  |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  = help: to escape `[` and `]` characters, just add '\' before them like `\[` or `\]`

error: Could not document `std`.

Greg, can you help fix stdsimd on aarch64?

Greg, can you help fix stdsimd on aarch64?

A quick fix is to replace the brackets with parens or whatever (it only affects the documentation anyway)

I can confirm it builds for me on powerpc64.

jbeich updated this revision to Diff 54477.Feb 27 2019, 1:55 PM
jbeich edited the test plan for this revision. (Show Details)

Hmm, is this diff based on D19309? I see that libc bumps are there, but not marked as a change here on Phabricator. I'm assuming that you plan to land the changes in two commits?

Cumulative diff contains both D19309 and D19354 as there's patch churn due to PORTREVISION bumps quickly becoming out of date. Landing D19309 separately would cause unnecessary rebuild churn for users, see poudriere#319.

Ok on armv7, ppc64. It fails on aarch64:

Did you test on armv6?

Greg, can you help fix stdsimd on aarch64?

A quick fix is to replace the brackets with parens or whatever (it only affects the documentation anyway)

I've quoted instead as suggested by rustc. Hopefully, it works as well.

This revision now requires review to proceed.Feb 27 2019, 1:55 PM
tobik accepted this revision.Feb 27 2019, 8:56 PM

Thank you all!

This revision is now accepted and ready to land.Feb 27 2019, 8:56 PM
This revision was automatically updated to reflect the committed changes.