Created attachment 237840 [details] patch bumping version =====line 1 col 0 lines from top 1 ============================================ --- stderr thread 'main' panicked at ' This crate is only compatible with OpenSSL (version 1.0.1 through 1.1.1, or 3.0.0), or LibreSSL 2. through 3.4.1, but a different version of OpenSSL was found. The build is now aborting due to this version mismatch. ', /usr/obj/usr/ports/devel/cargo-c/work/cargo-c-0.9.8+cargo-0.60/cargo-crates/openssl-sys-0.9.7 2/build/mai stack backtrace: 0: std::panicking::begin_panic 1: build_script_main::version_error 2: build_script_main::validate_headers 3: build_script_main::main 4: core::ops::function::FnOnce::call_once note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace. warning: build failed, waiting for other jobs to finish... warning: unused return value of `std::mem::replace` that must be used --> /usr/obj/usr/ports/devel/cargo-c/work/cargo-c-0.9.8+cargo-0.60/cargo-crates/im-rc-15.0.0/./src/vector/mod.rs:986:13 | 986 | replace(self, other); | ^^^^^^^^^^^^^^^^^^^^^ | = note: `#[warn(unused_must_use)]` on by default = note: if you don't need the old value, you can just assign the new value directly warning: `im-rc` (lib) generated 1 warning *** Error code 101 Stop. make: stopped in /usr/ports/devel/cargo-c
Comment on attachment 237840 [details] patch bumping version Looks incomplete compared to https://github.com/sfackler/rust-openssl/commit/ea03bc0200a5
Created attachment 237870 [details] 0002-devel-cargo-c-Fix-build-with-LibreSSL-3.5 Here's a patch backporting the commit mentioned above instead. It's very likely incomplete, so will probably expose *some* wrong runtime behavior. At least it works for me temporarily (until we have new upstream versions).
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=4e139a162009b6af2aa039ca33cce5e4b629f55d commit 4e139a162009b6af2aa039ca33cce5e4b629f55d Author: Felix Palmen <zirias@FreeBSD.org> AuthorDate: 2022-11-04 12:18:51 +0000 Commit: Jan Beich <jbeich@FreeBSD.org> CommitDate: 2022-11-05 18:10:39 +0000 devel/cargo-c: Fix build with LibreSSL 3.5 PR: 267542 devel/cargo-c/files/patch-libressl-3.5 (new) | 252 +++++++++++++++++++++++++++ 1 file changed, 252 insertions(+)
A commit in branch 2022Q4 references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=8026af5b3e55c8f6702965ca3b6b72144c594d2c commit 8026af5b3e55c8f6702965ca3b6b72144c594d2c Author: Felix Palmen <zirias@FreeBSD.org> AuthorDate: 2022-11-04 12:18:51 +0000 Commit: Jan Beich <jbeich@FreeBSD.org> CommitDate: 2022-11-05 18:11:27 +0000 devel/cargo-c: Fix build with LibreSSL 3.5 PR: 267542 (cherry picked from commit 4e139a162009b6af2aa039ca33cce5e4b629f55d) devel/cargo-c/files/patch-libressl-3.5 (new) | 252 +++++++++++++++++++++++++++ 1 file changed, 252 insertions(+)
Comment on attachment 237870 [details] 0002-devel-cargo-c-Fix-build-with-LibreSSL-3.5 > It's very likely incomplete, Looks fine as far as backport of that particular commit. > so will probably expose *some* wrong runtime behavior. *SSL is mainly used (by bundled cargo) to fetch registry + crates when building outside of ports. Something like the following maybe enough for testing: $ git clone https://github.com/ImageOptim/libimagequant $ cd libimagequant $ cargo cbuild
(In reply to Jan Beich from comment #5) > $ cd libimagequant Forgot about subdirectory $ cd libimagequant/imagequant-sys Otherwise, build would fail $ cargo cbuild Error: CliError { error: Some(none of the selected packages contains these features: capi), exit_code: 101 } I originally used lewton (doesn't use a subdirectory for capi) as example but switched to libimagequant as it's more popular and depends on fewer crates (faster build).
(In reply to Jan Beich from comment #5) > Looks fine as far as backport of that particular commit. Yes, I meant the commit itself is very likely incomplete, at least that's what vishwin told me on IRC, showing some later commits fixing things... > *SSL is mainly used (by bundled cargo) to fetch registry + crates when > building outside of ports. Good to know, I'll give that a test soon!