Bug 259738 - lang/rust: Fails to build with libressl 3.4.1
Summary: lang/rust: Fails to build with libressl 3.4.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: Tobias Kortkamp
URL:
Keywords: needs-qa
Depends on:
Blocks:
 
Reported: 2021-11-09 12:54 UTC by Ivan Rozhuk
Modified: 2021-12-05 14:16 UTC (History)
5 users (show)

See Also:
tobik: maintainer-feedback+


Attachments
patch (1.10 KB, patch)
2021-11-09 19:03 UTC, Ivan Rozhuk
tobik: maintainer-approval+
Details | Diff
rust + libressl 3.4.x patch (718 bytes, patch)
2021-11-11 19:58 UTC, John Kennedy
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ivan Rozhuk 2021-11-09 12:54:19 UTC
[RUSTC-SHIM] rustc tempfile libdir: "/tmp/ports/usr/ports/lang/rust/work/rustc-1.56.0-src/build/x86_64-unknown-freebsd/stage2/lib"
     Running `/tmp/ports/usr/ports/lang/rust/work/rustc-1.56.0-src/build/x86_64-unknown-freebsd/stage2-tools/release/build/openssl-sys-cbf5ead83f7082e4/build-script-main`
error: failed to run custom build command for `openssl-sys v0.9.65`

Caused by:
  process didn't exit successfully: `/tmp/ports/usr/ports/lang/rust/work/rustc-1.56.0-src/build/x86_64-unknown-freebsd/stage2-tools/release/build/openssl-sys-cbf5ead83f7082e4/build-script-main` (exit status: 101)
  --- stdout
  cargo:rustc-cfg=const_fn
  cargo:rerun-if-env-changed=X86_64_UNKNOWN_FREEBSD_OPENSSL_LIB_DIR
  X86_64_UNKNOWN_FREEBSD_OPENSSL_LIB_DIR unset
  cargo:rerun-if-env-changed=OPENSSL_LIB_DIR
  OPENSSL_LIB_DIR unset
  cargo:rerun-if-env-changed=X86_64_UNKNOWN_FREEBSD_OPENSSL_INCLUDE_DIR
  X86_64_UNKNOWN_FREEBSD_OPENSSL_INCLUDE_DIR unset
  cargo:rerun-if-env-changed=OPENSSL_INCLUDE_DIR
  OPENSSL_INCLUDE_DIR unset
  cargo:rerun-if-env-changed=X86_64_UNKNOWN_FREEBSD_OPENSSL_DIR
  X86_64_UNKNOWN_FREEBSD_OPENSSL_DIR unset
  cargo:rerun-if-env-changed=OPENSSL_DIR
  OPENSSL_DIR = /usr/local
  cargo:rustc-link-search=native=/usr/local/lib
  cargo:include=/usr/local/include
  OPT_LEVEL = Some("3")
  TARGET = Some("x86_64-unknown-freebsd")
  HOST = Some("x86_64-unknown-freebsd")
  CC_x86_64-unknown-freebsd = Some("cc")
  CFLAGS_x86_64-unknown-freebsd = Some("-ffunction-sections -fdata-sections -fPIC -m64 -pipe -pipe -funroll-loops -DSTRIP_FBSDID -D_FORTIFY_SOURCE=2 -mretpoline -fstack-protector-strong -fno-strict-aliasing -fdebug-prefix-map=/tmp/ports/usr/ports/lang/rust/work/rustc-1.56.0-src=.")
  CRATE_CC_NO_DEFAULTS = None
  DEBUG = Some("false")
  CARGO_CFG_TARGET_FEATURE = Some("fxsr,sse,sse2")
  running: "cc" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "-m64" "-ffunction-sections" "-fdata-sections" "-fPIC" "-m64" "-pipe" "-pipe" "-funroll-loops" "-DSTRIP_FBSDID" "-D_FOR
Comment 1 Ivan Rozhuk 2021-11-09 19:03:37 UTC
Created attachment 229388 [details]
patch
Comment 2 Tobias Kortkamp freebsd_committer 2021-11-10 11:09:35 UTC
Comment on attachment 229388 [details]
patch

Implicit approval through the portmgr blanket.
Comment 3 Tobias Kortkamp freebsd_committer 2021-11-10 11:11:09 UTC
For any committer to take or until Rust 1.57.0
Comment 4 John Kennedy 2021-11-11 19:56:52 UTC
When I submit a patch (every libressl bump), I fix the extra crate-compatible text too.
Comment 5 John Kennedy 2021-11-11 19:58:15 UTC
Created attachment 229435 [details]
rust + libressl 3.4.x patch
Comment 6 Thomas Guymer 2021-11-26 10:43:58 UTC
Hi,

I just encountered this too; does anyone have an estimate on when the patches will appear in the ports tree?

Thanks
Comment 7 commit-hook freebsd_committer 2021-12-05 12:36:29 UTC
A commit in branch main references this bug:

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

commit 237b36fa2e73986dc19284686e80a47cb329bb6f
Author:     Tobias Kortkamp <tobik@FreeBSD.org>
AuthorDate: 2021-11-30 12:54:55 +0000
Commit:     Tobias Kortkamp <tobik@FreeBSD.org>
CommitDate: 2021-12-05 12:35:41 +0000

    lang/rust: Update to 1.57.0

    - Unbreak build with LibreSSL 3.4.x [0]
    - Disable backtrace's libunwind backend on armv* since it or
      libunwind in base seem to be buggy and cause rustc to crash when
      building some consumers [1]
    - Follow rust-nightly in d5f09dc31fcfdb77b69c86b9093bf67ec67653d9
      and reenable hardlinks in the build

    Changes:        https://blog.rust-lang.org/2021/12/02/Rust-1.57.0.html
    PR:             259738 [0]
    PR:             259799 [1]
    PR:             260140
    Exp-run by:     antoine
    Differential Revision:  https://reviews.freebsd.org/D33190
    With hat:       rust

 Mk/Uses/cargo.mk                                   |   2 +-
 Mk/bsd.gecko.mk                                    |   2 +-
 lang/rust-bootstrap/Makefile                       |   2 +-
 lang/rust-bootstrap/distinfo                       |   6 +-
 lang/rust/Makefile                                 |   9 +-
 lang/rust/distinfo                                 | 114 ++++++++++-----------
 .../{ => no-hardlinks}/patch-src_bootstrap_lib.rs  |   0
 .../patch-src_bootstrap_native.rs                  |   0
 ...ch-library_backtrace_src_backtrace_mod.rs (new) |  10 ++
 .../files/patch-vendor_cc-1.0.69_src_lib.rs (new)  |  38 +++++++
 .../patch-vendor_openssl-sys_build_main.rs (new)   |  19 ++++
 lang/rust/update.sh                                |  31 ++----
 12 files changed, 144 insertions(+), 89 deletions(-)