Bug 246332 - [PATCH] lang/rust: does not build with LibreSSL 3.1
Summary: [PATCH] lang/rust: does not build with LibreSSL 3.1
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: FreeBSD Rust Team
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-05-09 14:55 UTC by Maciej Pasternacki
Modified: 2020-06-04 18:08 UTC (History)
3 users (show)

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


Attachments
rust-libressl31.patch (1.08 KB, text/plain)
2020-05-09 14:55 UTC, Maciej Pasternacki
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Maciej Pasternacki 2020-05-09 14:55:05 UTC
Created attachment 214312 [details]
rust-libressl31.patch

Build ends with:

error: failed to run custom build command for `openssl-sys v0.9.53`
[...]
thread 'main' panicked at '

This crate is only compatible with OpenSSL 1.0.1 through 1.1.1, or LibreSSL 2.5
through 3.0.x, but a different version of OpenSSL was found. The build is now aborting
due to this version mismatch.

', /wrkdirs/usr/ports/lang/rust/work/rustc-1.43.1-src/vendor/openssl-sys/build/main.rs:243:5

This patch just expands whitelist of vendored openssl-sys crate, which is taken from upstream PRs:

https://github.com/sfackler/rust-openssl/pull/1260
https://github.com/sfackler/rust-openssl/pull/1271

Builds successfully with libressl-3.1.1.
Comment 1 jakub_lach 2020-05-09 16:06:38 UTC
Confirmed, I wish ports were more aware of LibreSSL in general.
Comment 2 Ivan Rozhuk 2020-05-09 23:40:14 UTC
(In reply to jakub_lach from comment #1)
+1 bump version of all ports uses openssl will be user friendly
Comment 3 jakub_lach 2020-05-10 11:42:00 UTC
(In reply to rozhuk.im from comment #2)

yes, but if somebody uses base openssl, the bump will trigger not needed recompiling.
Comment 4 Ivan Rozhuk 2020-05-10 20:01:22 UTC
(In reply to jakub_lach from comment #3)

But version for ffmpeg, nginx and other bumped on every dep update, even if this dep not in default options.
Also we have ports that can chose BLAS from different libs, it also bump version on every BLAS lib update.
Comment 5 Maciej Pasternacki 2020-05-10 22:31:57 UTC
In my experience, bumping other ports is not necessary, because soname changes. Plumbing of pkg/poudriere picks this up well enough without revision bump, and I wouldn't expect ports-based plumbing to be worse. Bump is needed to force upggrade of dependent packages if no other changes (such as soname) trigger that.

This is how I found out about the change: all openssl-dependent packages were rebuilt by poudriere, rust failed (and firefox couldn't be rebuilt), so pkg upgrade wanted to uninstall firefox. If the revision bump was actually needed, old version of firefox would stay installed, and it would fail to start.
Comment 6 Thomas Hurst 2020-06-04 04:59:56 UTC
It took me *way* too long to realise why this patch didn't apply - DOS line endings.
Comment 7 commit-hook freebsd_committer freebsd_triage 2020-06-04 18:08:43 UTC
A commit references this bug:

Author: tobik
Date: Thu Jun  4 18:08:09 UTC 2020
New revision: 537917
URL: https://svnweb.freebsd.org/changeset/ports/537917

Log:
  lang/rust: Update to 1.44.0

  - Remove devel/cargo-tree since it is now integrated into cargo
  - Add patch to fix build with LibreSSL 3.1.x and 3.2.0 [1]
  - Force rebuild all consumers to catch regressions early

  Changes:	https://blog.rust-lang.org/2020/06/04/Rust-1.44.0.html
  PR:		246332 [1]
  Tested by:	mikael, tobik
  With hat:	rust
  Differential Revision:	https://reviews.freebsd.org/D25099

Changes:
  head/MOVED
  head/Mk/Uses/cargo.mk
  head/audio/ncspot/Makefile
  head/audio/spotify-tui/Makefile
  head/audio/spotifyd/Makefile
  head/benchmarks/hyperfine/Makefile
  head/deskutils/just/Makefile
  head/devel/Makefile
  head/devel/bingrep/Makefile
  head/devel/cargo-c/Makefile
  head/devel/cargo-tree/
  head/devel/desed/Makefile
  head/devel/dtool/Makefile
  head/devel/gbump/Makefile
  head/devel/git-absorb/Makefile
  head/devel/git-delta/Makefile
  head/devel/interactive_rebase_tool/Makefile
  head/devel/pijul/Makefile
  head/devel/racer/Makefile
  head/devel/racer/distinfo
  head/devel/rust-analyzer/Makefile
  head/devel/rust-bindgen/Makefile
  head/devel/rust-cbindgen/Makefile
  head/devel/sccache/Makefile
  head/devel/sentry-cli/Makefile
  head/devel/tokei/Makefile
  head/dns/doh-proxy/Makefile
  head/editors/kak-lsp/Makefile
  head/editors/parinfer-rust/Makefile
  head/editors/xi-core/Makefile
  head/editors/xi-term/Makefile
  head/games/dose-response/Makefile
  head/games/genact/Makefile
  head/games/jaggedalliance2/Makefile
  head/games/veloren/Makefile
  head/graphics/ikona/Makefile
  head/graphics/librsvg2-rust/Makefile
  head/graphics/pastel/Makefile
  head/graphics/rx/Makefile
  head/graphics/svgbob/Makefile
  head/graphics/viu/Makefile
  head/lang/rust/Makefile
  head/lang/rust/distinfo
  head/lang/rust/files/patch-vendor_backtrace-sys_build.rs
  head/lang/rust/files/patch-vendor_backtrace-sys_src_libbacktrace_fileline.c
  head/lang/rust/files/patch-vendor_openssl-sys_build_main.rs
  head/lang/rust/files/powerpc64-elfv1/patch-src_librustc__mir_dataflow_generic_engine.rs
  head/lang/rust/files/powerpc64-elfv2/patch-src_librustc__mir_dataflow_generic_engine.rs
  head/lang/rust-bootstrap/Makefile
  head/lang/rust-bootstrap/distinfo
  head/mail/thunderbird/Makefile
  head/misc/broot/Makefile
  head/multimedia/librav1e/Makefile
  head/multimedia/rav1e/Makefile
  head/multimedia/termplay/Makefile
  head/net/findomain/Makefile
  head/net/proby/Makefile
  head/net/rabbiteer/Makefile
  head/net/routinator/Makefile
  head/net-im/fractal/Makefile
  head/net-p2p/openethereum/Makefile
  head/security/acmed/Makefile
  head/security/cargo-audit/Makefile
  head/security/cloak/Makefile
  head/security/suricata/Makefile
  head/shells/ion/Makefile
  head/shells/starship/Makefile
  head/sysutils/dua-cli/Makefile
  head/sysutils/exa/Makefile
  head/sysutils/fd/Makefile
  head/sysutils/flowgger/Makefile
  head/sysutils/fselect/Makefile
  head/sysutils/fusefs-sandboxfs/Makefile
  head/sysutils/hexyl/Makefile
  head/sysutils/lsd/Makefile
  head/sysutils/onefetch/Makefile
  head/sysutils/potnet/Makefile
  head/sysutils/rsfetch/Makefile
  head/sysutils/tealdeer/Makefile
  head/sysutils/vector/Makefile
  head/sysutils/zoxide/Makefile
  head/textproc/bat/Makefile
  head/textproc/ripgrep/Makefile
  head/textproc/sd/Makefile
  head/textproc/sonic/Makefile
  head/textproc/xsv-rs/Makefile
  head/www/cliqz/Makefile
  head/www/ffsend/Makefile
  head/www/firefox/Makefile
  head/www/firefox-esr/Makefile
  head/www/geckodriver/Makefile
  head/www/jwt-cli/Makefile
  head/www/miniserve/Makefile
  head/www/newsboat/Makefile
  head/www/websocat/Makefile
  head/www/zola/Makefile
  head/x11/admiral/Makefile
  head/x11/alacritty/Makefile
  head/x11/squeekboard/Makefile