Rust 1.20.0 has been released 15 days ago as of this writing. Additionally, after bug 221088 was committed as ports r449914, the port fails to build when libressl is used as the default ssl, as the latest upstream and port version 2.5.5 is not supported in rust-1.19: Running `/wrkdirs/usr/ports/lang/rust/work/rustc-1.19.0-src/build/x86_64-unknown-freebsd/stage2-tools/release/build/openssl-sys-7383df0b2b2e0b57/build-script-build` error: failed to run custom build command for `openssl-sys v0.9.12` process didn't exit successfully: `/wrkdirs/usr/ports/lang/rust/work/rustc-1.19.0-src/build/x86_64-unknown-freebsd/stage2-tools/release/build/openssl-sys-7383df0b2b2e0b57/build-script-build` (exit code: 101) --- stdout cargo:rustc-link-search=native=/usr/local/lib cargo:include=/usr/local/include OPT_LEVEL = Some("2") TARGET = Some("x86_64-unknown-freebsd") HOST = Some("x86_64-unknown-freebsd") TARGET = Some("x86_64-unknown-freebsd") TARGET = Some("x86_64-unknown-freebsd") HOST = Some("x86_64-unknown-freebsd") CC_x86_64-unknown-freebsd = Some("cc") TARGET = Some("x86_64-unknown-freebsd") HOST = Some("x86_64-unknown-freebsd") CFLAGS_x86_64-unknown-freebsd = Some("-ffunction-sections -fdata-sections -fPIC -m64") PROFILE = Some("release") running: "cc" "-O2" "-ffunction-sections" "-fdata-sections" "-fPIC" "-ffunction-sections" "-fdata-sections" "-fPIC" "-m64" "-m64" "-I" "/usr/local/include" "-E" "/wrkdirs/usr/ports/lang/rust/work/rustc-1.19.0-src/build/x86_64-unknown-freebsd/stage2-tools/x86_64-unknown-freebsd/release/build/openssl-sys-5927edc57e54ea05/out/expando.c" exit code: 0 cargo:rustc-cfg=osslconf="OPENSSL_NO_BUF_FREELISTS" cargo:rustc-cfg=osslconf="OPENSSL_NO_COMP" cargo:rustc-cfg=osslconf="OPENSSL_NO_KRB5" cargo:rustc-cfg=osslconf="OPENSSL_NO_PSK" cargo:rustc-cfg=osslconf="OPENSSL_NO_RFC3779" cargo:rustc-cfg=osslconf="OPENSSL_NO_SRP" cargo:rustc-cfg=osslconf="OPENSSL_NO_SSL3_METHOD" cargo:conf=OPENSSL_NO_BUF_FREELISTS,OPENSSL_NO_COMP,OPENSSL_NO_KRB5,OPENSSL_NO_PSK,OPENSSL_NO_RFC3779,OPENSSL_NO_SRP,OPENSSL_NO_SSL3_METHOD --- stderr thread 'main' panicked at ' This crate is only compatible with OpenSSL 1.0.1, 1.0.2, and 1.1.0, or LibreSSL 2.5.0, 2.5.1, 2.5.2, 2.5.3, and 2.5.4, but a different version of OpenSSL was found. The build is now aborting due to this version mismatch. ', src/vendor/openssl-sys/build.rs:363 note: Run with `RUST_BACKTRACE=1` for a backtrace. Build failed, waiting for other jobs to finish... error: build failed command did not execute successfully: "/wrkdirs/usr/ports/lang/rust/work/rustc-1.19.0-src/build/x86_64-unknown-freebsd/stage0/bin/cargo" "build" "-j" "4" "--target" "x86_64-unknown-freebsd" "-v" "--release" "--frozen" "--manifest-path" "/wrkdirs/usr/ports/lang/rust/work/rustc-1.19.0-src/src/tools/cargo/Cargo.toml" expected success, got: exit code: 101 Traceback (most recent call last): File "/wrkdirs/usr/ports/lang/rust/work/rustc-1.19.0-src/x.py", line 20, in <module> bootstrap.main() File "/wrkdirs/usr/ports/lang/rust/work/rustc-1.19.0-src/src/bootstrap/bootstrap.py", line 678, in main bootstrap() File "/wrkdirs/usr/ports/lang/rust/work/rustc-1.19.0-src/src/bootstrap/bootstrap.py", line 670, in bootstrap run(args, env=env, verbose=rb.verbose) File "/wrkdirs/usr/ports/lang/rust/work/rustc-1.19.0-src/src/bootstrap/bootstrap.py", line 142, in run raise RuntimeError(err) RuntimeError: failed to run: /wrkdirs/usr/ports/lang/rust/work/rustc-1.19.0-src/build/bootstrap/debug/bootstrap build --verbose --config ./config.toml --jobs 4 *** Error code 1 Stop. make: stopped in /usr/ports/lang/rust =>> Cleaning up wrkdir ===> Cleaning for rust-1.19.0_2 build of lang/rust | rust-1.19.0_2 ended at Fri Sep 15 17:40:42 EDT 2017 build time: 01:50:35 !!! build failure encountered !!! Apparently this part was not built in previous port versions, but this is a moot point now.
Maintainer informed via mail
It does not know libressl 2.5.5. I solved it with Index: files/patch-vendor_openssl-sys_build_rs =================================================================== --- files/patch-vendor_openssl-sys_build_rs (nonexistent) +++ files/patch-vendor_openssl-sys_build_rs (working copy) @@ -0,0 +1,24 @@ +--- src/vendor/openssl-sys/build.rs.prig 2017-09-16 13:08:12 UTC ++++ src/vendor/openssl-sys/build.rs +@@ -241,7 +241,7 @@ fn validate_headers(include_dirs: &[Path + #include <openssl/opensslconf.h> + + #if LIBRESSL_VERSION_NUMBER >= 0x20505000 +-RUST_LIBRESSL_NEW ++RUST_LIBRESSL_255 + #elif LIBRESSL_VERSION_NUMBER >= 0x20504000 + RUST_LIBRESSL_254 + #elif LIBRESSL_VERSION_NUMBER >= 0x20503000 +@@ -347,6 +347,12 @@ See rust-openssl README for more informa : but I have problems with the REINPLACE_CMD to replace the checksum for build.rs in src/vendor/openssl-sys/.cargo-checksum.json.
Created attachment 186451 [details] Possible_patch_lang_rust
Maintainer, please could you make Tests optional?
Created attachment 186453 [details] possible-patch-lang_rust Forgot something to delete.
Auto-assigner chokes on rust@ not being a valid bugzilla user.
Hi! Before working on the LibreSSL patch, I'll update the port to 1.20.0. I prepared the patch and Poudriere is running. In parallel, I'm recreating a bootstrap for aarch64. I'll keep you posted!
A commit references this bug: Author: dumbbell Date: Wed Oct 4 08:13:38 UTC 2017 New revision: 451188 URL: https://svnweb.freebsd.org/changeset/ports/451188 Log: lang/rust: Update to 1.20.0 This patch only upgrades the port to Rust 1.20.0. The PR also covers a build failure with the latest LibreSSL, which is not addressed here. PR: 222359 Reported by: Charlie Li <ml+freebsd-bugs@vishwin.info> Changes: head/lang/rust/Makefile head/lang/rust/distinfo
Compiles now fine with libreSSL.
Great! Thank you for testing! I didn't have a chance to do it. But for future updates, I'll add that to the list of tests before committing.
Just wanted to second the confirmation of success with LibreSSL, including specifically version 2.5.5. Thanks!
It was no problem of testing. The versions of rust have the right libreSSL version. But this time a update of libressl comes between the versons.
There's still problem with libressl-devel, which will become stable probably this month. This commit covers this issue: https://github.com/sfackler/rust-openssl/commit/e0efd1d438fbf426a7e1006e4983b0f352c630f6
Thanks for the pointer! I'm build-testing patches to add support for LibreSSL 2.6.1 and 2.6.2 to Rust 1.20.0.
So I let Poudriere run during the night with: DEFAULT_VERSIONS+= ssl=libressl-devel However, it failed early with: Starting build of ftp/curl Finished build of ftp/curl: Ignored: unsupported TLS-SRP in LibreSSL Skipping build of devel/cmake: Dependent port ftp/curl ignored Skipping build of lang/rust: Dependent port ftp/curl ignored How do you test the build with LibreSSL?
(In reply to Jean-Sébastien Pédron from comment #15) Disable the TLS_SRP and GSSAPI_BASE options in ftp/curl. Those are not supported with libressl at all. https://wiki.freebsd.org/LibreSSL#Problems_you.27ll_run_into
A commit references this bug: Author: dumbbell Date: Wed Oct 11 12:28:01 UTC 2017 New revision: 451743 URL: https://svnweb.freebsd.org/changeset/ports/451743 Log: lang/rust: Add support for LibreSSL 2.6.1 and 2.6.2 Patches come from upstream: https://github.com/sfackler/rust-openssl PR: 222359 Reported by: Charlie Li <ml+freebsd-bugs@vishwin.info>, Piotr Kubaj <pkubaj@anongoth.pl>, w.schwarzenfeld@utanet.at, nhoyle@hoyletech.com Changes: head/lang/rust/Makefile head/lang/rust/files/patch-src_vendor_openssl-sys_build.rs head/lang/rust/files/patch-src_vendor_openssl-sys_src_lib.rs head/lang/rust/files/patch-src_vendor_openssl-sys_src_libressl_mod.rs head/lang/rust/files/patch-src_vendor_openssl_build.rs head/lang/rust/files/patch-src_vendor_openssl_src_ssl_mod.rs head/lang/rust/files/patch-src_vendor_openssl_src_ssl_tests_mod.rs
(In reply to commit-hook from comment #17) Thanks for the quick reaction!