Bug 267622 - lang/rust: Update to 1.65.0
Summary: lang/rust: Update to 1.65.0
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Mikael Urankar
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-11-07 18:03 UTC by Mikael Urankar
Modified: 2022-11-17 11:06 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (rust)


Attachments
v0 (16.00 KB, patch)
2022-11-07 18:03 UTC, Mikael Urankar
no flags Details | Diff
v0 (18.95 KB, patch)
2022-11-08 07:14 UTC, Mikael Urankar
no flags Details | Diff
v1 (21.81 KB, patch)
2022-11-15 07:33 UTC, Mikael Urankar
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mikael Urankar freebsd_committer freebsd_triage 2022-11-07 18:03:43 UTC
Created attachment 237921 [details]
v0
Comment 1 Piotr Kubaj freebsd_committer freebsd_triage 2022-11-07 18:16:27 UTC
It looks like the patch is broken.
Comment 2 Mikael Urankar freebsd_committer freebsd_triage 2022-11-08 07:14:49 UTC
Created attachment 237933 [details]
v0
Comment 3 Tobias Kortkamp freebsd_committer freebsd_triage 2022-11-08 09:20:35 UTC
Comment on attachment 237933 [details]
v0

>  # See WRKSRC/src/stage0.json for the date and version values
> -BOOTSTRAPS_DATE?=		2022-08-11
> -RUST_BOOTSTRAP_VERSION?=	1.63.0
> +BOOTSTRAPS_DATE?=		2022-09-22
> +BOOTSTRAPS_DATE=		2022-09-22
> +RUST_BOOTSTRAP_VERSION?=	1.64.0
>  
>  BOOTSTRAPS_SUFFIX?=		${BOOTSTRAPS_SUFFIX_${ARCH}}
>  BOOTSTRAPS_SUFFIX_powerpc64?=	-${PPC_ABI:tl}
> +RUST_BOOTSTRAP_VERSION=		1.64.0

This is from update.sh (and portedit merge), yes? portfmt 1.1.4 fixes
this issue.

>  .  if ${CARGO_BUILDDEP:tl} == "yes"
> -BUILD_DEPENDS+=	${RUST_DEFAULT}>=1.64.0:lang/${RUST_DEFAULT}
> +BUILD_DEPENDS+=	${RUST_DEFAULT}>=1.65.0:lang/${RUST_DEFAULT}
>  .  elif ${CARGO_BUILDDEP:tl} == "any-version"
> -BUILD_DEPENDS+=	${RUST_DEFAULT}>=1.64.0:lang/${RUST_DEFAULT}
> +BUILD_DEPENDS+=	${RUST_DEFAULT}>=1.65.0:lang/${RUST_DEFAULT}
>  .  endif

The version under any-version should always be 0. I fixed update.sh to
not do this.
Comment 4 Mikael Urankar freebsd_committer freebsd_triage 2022-11-08 09:56:27 UTC
(In reply to Tobias Kortkamp from comment #3)
Yes, I use the update.sh script

all consumers are ok with rust 1.65.0
Comment 5 Piotr Kubaj freebsd_committer freebsd_triage 2022-11-09 11:09:08 UTC
Fails to build on powerpc:
  = note: /usr/local/bin/ld.bfd: /wrkdirs/usr/ports/lang/rust/work/_build/powerpc-unknown-freebsd/stage0-rustc/powerpc-unknown-freebsd/release/deps/librustc_driver-95f1e4ba1a525000.so: undefined reference to `__atomic_load_8'
          /usr/local/bin/ld.bfd: /wrkdirs/usr/ports/lang/rust/work/_build/powerpc-unknown-freebsd/stage0-rustc/powerpc-unknown-freebsd/release/deps/librustc_driver-95f1e4ba1a525000.so: undefined reference to `__atomic_store_8'
          cc: error: linker command failed with exit code 1 (use -v to see invocation)
Comment 6 Piotr Kubaj freebsd_committer freebsd_triage 2022-11-09 11:15:42 UTC
It looks like it's being worked on in https://github.com/rust-lang/rust/issues/99668
Comment 7 Piotr Kubaj freebsd_committer freebsd_triage 2022-11-15 02:38:45 UTC
Please drop the following patch to files/powerpc/patch-compiler_rustc__llvm_build.rs (it's possible it's also needed for armv?, I needed to add linking to libz as well):
--- compiler/rustc_llvm/build.rs.orig   2022-11-15 00:20:09.013627000 +0100
+++ compiler/rustc_llvm/build.rs        2022-11-15 00:20:44.449189000 +0100
@@ -235,20 +235,18 @@
     let mut cmd = Command::new(&llvm_config);
     cmd.arg(llvm_link_arg).arg("--libs");

-    if !is_crossed {
+    if target.starts_with("arm")
+        || target.starts_with("powerpc-")
+    {
+        println!("cargo:rustc-link-lib=atomic");
+        println!("cargo:rustc-link-lib=z");
+    } else if !is_crossed {
         cmd.arg("--system-libs");
     } else if target.contains("windows-gnu") {
         println!("cargo:rustc-link-lib=shell32");
         println!("cargo:rustc-link-lib=uuid");
     } else if target.contains("netbsd") || target.contains("haiku") || target.contains("darwin") {
         println!("cargo:rustc-link-lib=z");
-    } else if target.starts_with("arm")
-        || target.starts_with("mips-")
-        || target.starts_with("mipsel-")
-        || target.starts_with("powerpc-")
-    {
-        // 32-bit targets need to link libatomic.
-        println!("cargo:rustc-link-lib=atomic");
     }
     cmd.args(&components);

And in the Makefile add:
LIB_DEPENDS+=  libatomic.so:lang/gcc12
MAKE_ENV+=     RUSTFLAGS="-L/usr/local/lib/gcc12"
to the powerpc block (which already has binutils dependency). It might be better to use gcc11 (the current default), but I tested with 12.
Comment 8 Mikael Urankar freebsd_committer freebsd_triage 2022-11-15 07:33:49 UTC
Created attachment 238086 [details]
v1
Comment 9 commit-hook freebsd_committer freebsd_triage 2022-11-17 07:07:20 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=9bf6a9996323c016eb295bd6190b0e47ad76fdf4

commit 9bf6a9996323c016eb295bd6190b0e47ad76fdf4
Author:     Mikael Urankar <mikael@FreeBSD.org>
AuthorDate: 2022-11-17 07:03:49 +0000
Commit:     Mikael Urankar <mikael@FreeBSD.org>
CommitDate: 2022-11-17 07:06:14 +0000

    lang/rust: Bump revisions after 1.65.0

    PR:             267622

 accessibility/sctd/Makefile                 | 2 +-
 accessibility/wl-gammarelay-rs/Makefile     | 2 +-
 audio/amberol/Makefile                      | 2 +-
 audio/gnome-metronome/Makefile              | 2 +-
 audio/gnome-podcasts/Makefile               | 2 +-
 audio/lewton/Makefile                       | 2 +-
 audio/mousai-devel/Makefile                 | 1 +
 audio/myxer/Makefile                        | 2 +-
 audio/ncspot/Makefile                       | 2 +-
 audio/shortwave/Makefile                    | 2 +-
 audio/spotify-player/Makefile               | 2 +-
 audio/spotify-tui/Makefile                  | 2 +-
 audio/spotifyd/Makefile                     | 2 +-
 benchmarks/hyperfine/Makefile               | 2 +-
 benchmarks/inferno/Makefile                 | 2 +-
 converters/yj-bruceadams/Makefile           | 2 +-
 databases/ods2sql/Makefile                  | 2 +-
 databases/postgresql-promscale/Makefile     | 2 +-
 databases/redisjson/Makefile                | 2 +-
 databases/xls2txt/Makefile                  | 2 +-
 deskutils/health/Makefile                   | 2 +-
 deskutils/just/Makefile                     | 2 +-
 deskutils/sigi/Makefile                     | 1 +
 deskutils/solanum/Makefile                  | 2 +-
 deskutils/taskwarrior-tui/Makefile          | 2 +-
 devel/bingrep/Makefile                      | 2 +-
 devel/cargo-c/Makefile                      | 1 +
 devel/cargo-generate/Makefile               | 2 +-
 devel/desed/Makefile                        | 2 +-
 devel/dtool/Makefile                        | 2 +-
 devel/elfcat/Makefile                       | 2 +-
 devel/gbump/Makefile                        | 2 +-
 devel/gfold/Makefile                        | 2 +-
 devel/git-absorb/Makefile                   | 2 +-
 devel/git-delta/Makefile                    | 2 +-
 devel/gitui/Makefile                        | 2 +-
 devel/grcov/Makefile                        | 1 +
 devel/grex/Makefile                         | 1 +
 devel/interactive_rebase_tool/Makefile      | 1 +
 devel/libdatadog/Makefile                   | 2 +-
 devel/pijul/Makefile                        | 2 +-
 devel/py-maturin/Makefile                   | 2 +-
 devel/py-orjson/Makefile                    | 2 +-
 devel/rust-analyzer/Makefile                | 2 +-
 devel/rust-bindgen/Makefile                 | 2 +-
 devel/rust-cbindgen/Makefile                | 2 +-
 devel/sccache/Makefile                      | 2 +-
 devel/sentry-cli/Makefile                   | 2 +-
 devel/stylua/Makefile                       | 2 +-
 devel/texlab/Makefile                       | 2 +-
 devel/tokei/Makefile                        | 2 +-
 devel/wrangler/Makefile                     | 2 +-
 dns/dog/Makefile                            | 2 +-
 dns/doh-proxy/Makefile                      | 2 +-
 dns/encrypted-dns-server/Makefile           | 2 +-
 editors/amp/Makefile                        | 2 +-
 editors/helix/Makefile                      | 2 +-
 editors/kak-lsp/Makefile                    | 1 +
 editors/kibi/Makefile                       | 2 +-
 editors/lapce/Makefile                      | 1 +
 editors/parinfer-rust/Makefile              | 2 +-
 editors/xi-core/Makefile                    | 1 +
 editors/xi-term/Makefile                    | 2 +-
 finance/tickrs/Makefile                     | 2 +-
 games/0ad/Makefile                          | 2 +-
 games/abstreet/Makefile                     | 2 +-
 games/anki/Makefile                         | 2 +-
 games/dose-response/Makefile                | 2 +-
 games/genact/Makefile                       | 2 +-
 games/jaggedalliance2/Makefile              | 2 +-
 games/jumpy/Makefile                        | 2 +-
 games/punchy/Makefile                       | 2 +-
 games/rpg-cli/Makefile                      | 2 +-
 games/veloren/Makefile                      | 2 +-
 graphics/dify/Makefile                      | 1 +
 graphics/dssim/Makefile                     | 1 +
 graphics/gifski/Makefile                    | 2 +-
 graphics/ikona/Makefile                     | 2 +-
 graphics/libimagequant/Makefile             | 1 +
 graphics/libopenraw/Makefile                | 2 +-
 graphics/librsvg2-rust/Makefile             | 2 +-
 graphics/oxipng/Makefile                    | 1 +
 graphics/pastel/Makefile                    | 2 +-
 graphics/rx/Makefile                        | 2 +-
 graphics/svgbob/Makefile                    | 2 +-
 graphics/viu/Makefile                       | 2 +-
 java/icedtea-web/Makefile                   | 1 +
 lang/gleam/Makefile                         | 2 +-
 lang/spidermonkey102/Makefile               | 1 +
 lang/spidermonkey78/Makefile                | 2 +-
 lang/spidermonkey91/Makefile                | 2 +-
 mail/thunderbird/Makefile                   | 2 +-
 math/kalker/Makefile                        | 1 +
 math/py-rustworkx/Makefile                  | 2 +-
 math/savage/Makefile                        | 2 +-
 misc/broot/Makefile                         | 2 +-
 misc/ruut/Makefile                          | 2 +-
 misc/xd-rust/Makefile                       | 2 +-
 misc/xplr/Makefile                          | 2 +-
 multimedia/ab-av1/Makefile                  | 1 +
 multimedia/av1an/Makefile                   | 2 +-
 multimedia/gstreamer1-plugins-rust/Makefile | 1 +
 multimedia/helvum/Makefile                  | 2 +-
 multimedia/kooha/Makefile                   | 2 +-
 multimedia/librav1e/Makefile                | 2 +-
 multimedia/librespot/Makefile               | 2 +-
 multimedia/neolink/Makefile                 | 2 +-
 multimedia/rav1e/Makefile                   | 2 +-
 multimedia/ringrtc/Makefile                 | 2 +-
 multimedia/scte35dump/Makefile              | 2 +-
 multimedia/termplay/Makefile                | 2 +-
 multimedia/video-trimmer/Makefile           | 1 +
 net-im/conduit/Makefile                     | 2 +-
 net-im/fractal/Makefile                     | 2 +-
 net-im/libsignal-client/Makefile            | 2 +-
 net-im/libsignal-node/Makefile              | 2 +-
 net-im/py-matrix-synapse/Makefile           | 1 +
 net-im/yume/Makefile                        | 2 +-
 net-im/zkgroup/Makefile                     | 2 +-
 net-mgmt/bandwhich/Makefile                 | 2 +-
 net-mgmt/nfs-exporter/Makefile              | 2 +-
 net-p2p/cncli/Makefile                      | 2 +-
 net-p2p/openethereum/Makefile               | 2 +-
 net-p2p/oura/Makefile                       | 2 +-
 net/findomain/Makefile                      | 2 +-
 net/gemserv/Makefile                        | 2 +-
 net/krill/Makefile                          | 1 +
 net/oha/Makefile                            | 2 +-
 net/proby/Makefile                          | 2 +-
 net/quiche/Makefile                         | 2 +-
 net/rabbiteer/Makefile                      | 2 +-
 net/routinator/Makefile                     | 2 +-
 ports-mgmt/pkg-graph/Makefile               | 2 +-
 ports-mgmt/sccache-overlay/Makefile         | 2 +-
 science/py-qiskit-terra/Makefile            | 1 +
 security/acmed/Makefile                     | 2 +-
 security/arti/Makefile                      | 2 +-
 security/authenticator/Makefile             | 2 +-
 security/cargo-audit/Makefile               | 1 +
 security/clamav/Makefile                    | 2 +-
 security/cloak/Makefile                     | 2 +-
 security/gpg-tui/Makefile                   | 2 +-
 security/rustscan/Makefile                  | 1 +
 security/sequoia/Makefile                   | 2 +-
 security/sniffglue/Makefile                 | 2 +-
 security/solana/Makefile                    | 2 +-
 security/suricata/Makefile                  | 2 +-
 security/vaultwarden/Makefile               | 2 +-
 security/weggli/Makefile                    | 2 +-
 shells/ion/Makefile                         | 2 +-
 shells/nsh/Makefile                         | 2 +-
 shells/starship/Makefile                    | 2 +-
 sysutils/b3sum/Makefile                     | 2 +-
 sysutils/bkt/Makefile                       | 2 +-
 sysutils/bottom/Makefile                    | 2 +-
 sysutils/bupstash/Makefile                  | 2 +-
 sysutils/czkawka/Makefile                   | 2 +-
 sysutils/diskonaut/Makefile                 | 2 +-
 sysutils/diskus/Makefile                    | 2 +-
 sysutils/dua-cli/Makefile                   | 2 +-
 sysutils/dust/Makefile                      | 2 +-
 sysutils/exa/Makefile                       | 2 +-
 sysutils/fd/Makefile                        | 1 +
 sysutils/flowgger/Makefile                  | 2 +-
 sysutils/fselect/Makefile                   | 2 +-
 sysutils/fusefs-sandboxfs/Makefile          | 2 +-
 sysutils/fusefs-xfuse/Makefile              | 2 +-
 sysutils/gstat-rs/Makefile                  | 2 +-
 sysutils/handlr/Makefile                    | 2 +-
 sysutils/hexyl/Makefile                     | 2 +-
 sysutils/jail_exporter/Makefile             | 2 +-
 sysutils/lsd/Makefile                       | 2 +-
 sysutils/mcfly/Makefile                     | 2 +-
 sysutils/mprocs/Makefile                    | 1 +
 sysutils/onefetch/Makefile                  | 2 +-
 sysutils/potnet/Makefile                    | 2 +-
 sysutils/rsfetch/Makefile                   | 2 +-
 sysutils/tealdeer/Makefile                  | 2 +-
 sysutils/topgrade/Makefile                  | 1 +
 sysutils/vector/Makefile                    | 2 +-
 sysutils/vivid/Makefile                     | 2 +-
 sysutils/yadf/Makefile                      | 2 +-
 sysutils/zellij/Makefile                    | 1 +
 sysutils/zoxide/Makefile                    | 2 +-
 sysutils/ztop/Makefile                      | 2 +-
 textproc/angle-grinder/Makefile             | 2 +-
 textproc/bat/Makefile                       | 2 +-
 textproc/cast2gif/Makefile                  | 2 +-
 textproc/difftastic/Makefile                | 1 +
 textproc/htmlq/Makefile                     | 2 +-
 textproc/jless/Makefile                     | 2 +-
 textproc/jql/Makefile                       | 1 +
 textproc/mdbook-linkcheck/Makefile          | 2 +-
 textproc/mdbook-mermaid/Makefile            | 2 +-
 textproc/mdbook/Makefile                    | 2 +-
 textproc/meilisearch/Makefile               | 2 +-
 textproc/ripgrep-all/Makefile               | 2 +-
 textproc/ripgrep/Makefile                   | 2 +-
 textproc/sd/Makefile                        | 2 +-
 textproc/sonic/Makefile                     | 2 +-
 textproc/xsv-rs/Makefile                    | 2 +-
 www/castor/Makefile                         | 2 +-
 www/deno/Makefile                           | 2 +-
 www/dufs/Makefile                           | 1 +
 www/ffsend/Makefile                         | 2 +-
 www/firefox-esr/Makefile                    | 1 +
 www/firefox/Makefile                        | 2 +-
 www/garage/Makefile                         | 2 +-
 www/geckodriver/Makefile                    | 2 +-
 www/jwt-cli/Makefile                        | 2 +-
 www/lychee/Makefile                         | 2 +-
 www/miniserve/Makefile                      | 2 +-
 www/monolith/Makefile                       | 2 +-
 www/newsboat/Makefile                       | 2 +-
 www/py-adblock/Makefile                     | 2 +-
 www/rearx/Makefile                          | 2 +-
 www/rustypaste-cli/Makefile                 | 2 +-
 www/rustypaste/Makefile                     | 2 +-
 www/so/Makefile                             | 2 +-
 www/tuifeed/Makefile                        | 2 +-
 www/websocat/Makefile                       | 2 +-
 www/wiki-tui/Makefile                       | 1 +
 www/xh/Makefile                             | 2 +-
 www/zola/Makefile                           | 2 +-
 x11-wm/leftwm/Makefile                      | 2 +-
 x11/admiral/Makefile                        | 2 +-
 x11/alacritty/Makefile                      | 2 +-
 x11/eww/Makefile                            | 2 +-
 x11/inputplug/Makefile                      | 2 +-
 x11/kickoff/Makefile                        | 2 +-
 x11/salut/Makefile                          | 1 +
 x11/sirula/Makefile                         | 2 +-
 x11/squeekboard/Makefile                    | 2 +-
 x11/swayr/Makefile                          | 1 +
 x11/swayrbar/Makefile                       | 1 +
 x11/wezterm/Makefile                        | 2 +-
 x11/wmfocus/Makefile                        | 2 +-
 237 files changed, 237 insertions(+), 201 deletions(-)
Comment 10 commit-hook freebsd_committer freebsd_triage 2022-11-17 07:07:21 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=af39fba60871f5bec770ee76c5375c2915deb703

commit af39fba60871f5bec770ee76c5375c2915deb703
Author:     Mikael Urankar <mikael@FreeBSD.org>
AuthorDate: 2022-11-07 18:00:46 +0000
Commit:     Mikael Urankar <mikael@FreeBSD.org>
CommitDate: 2022-11-17 07:06:13 +0000

    lang/rust: Update to 1.65.0

    Announce:       https://blog.rust-lang.org/2022/11/03/Rust-1.65.0.html
    ChangeLog:      https://github.com/rust-lang/rust/releases/tag/1.65.0

    PR:             267622
    Reviewed by:    tokib, pkubaj
    Tested by:      mikael, pkubaj

 Mk/Uses/cargo.mk                                   |   2 +-
 Mk/bsd.gecko.mk                                    |   2 +-
 lang/rust-bootstrap/Makefile                       |   2 +-
 lang/rust-bootstrap/distinfo                       |   6 +-
 lang/rust/Makefile                                 |   8 +-
 lang/rust/distinfo                                 | 126 ++++++++++-----------
 .../files/patch-vendor_cc-1.0.69_src_lib.rs (gone) |  38 -------
 .../patch-compiler_rustc__llvm_build.rs (new)      |  29 +++++
 .../patch-vendor_cc-1.0.69_src_lib.rs (gone)       |  12 --
 9 files changed, 103 insertions(+), 122 deletions(-)