Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 678286 - dev-util/cargo-0.30.0 with dev-libs/libressl-2.8.3 - thread 'main' panicked at 'This crate is only compatible with OpenSSL 1.0.1 through 1.1.1, or LibreSSL 2.5 through 2.7, but a different version of OpenSSL was found. The build is now aborting due to ...
Summary: dev-util/cargo-0.30.0 with dev-libs/libressl-2.8.3 - thread 'main' panicked a...
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal with 2 votes (vote)
Assignee: Gentoo Rust Project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: libressl-support
  Show dependency tree
 
Reported: 2019-02-18 11:23 UTC by fkater
Modified: 2021-04-30 21:09 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log showing error (build.log,23.09 KB, text/x-log)
2019-02-18 15:45 UTC, fkater
Details
updated cargo ebuild (cargo-0.30.0-r1.ebuild,3.68 KB, text/plain)
2019-02-19 19:34 UTC, fkater
Details

Note You need to log in before you can comment on or make changes to this bug.
Description fkater 2019-02-18 11:23:37 UTC
Current stable cargo 0.30.0 cannot be rebuilt against libressl-2.8.3 which
just became stable.

I believe this is major since at least firefox depends on cargo, and there is no unstable upstream cargo in portage yet to fix that.

The relevant snippet from the build process:

> [...]
> 
>    Compiling tempfile v3.0.4
>    Compiling clap v2.32.0
> error: failed to run custom build command for `openssl-sys v0.9.36`
> process didn't exit successfully: `/var/tmp/portage/dev-util/cargo-0.30.0/work/cargo-0.30.0/target/release/build/openssl-sys-289fa0e97cfedf35/build-script-main` (exit code: 101)
> --- stdout
> cargo:rerun-if-env-changed=X86_64_UNKNOWN_LINUX_GNU_OPENSSL_LIB_DIR
> cargo:rerun-if-env-changed=OPENSSL_LIB_DIR
> cargo:rerun-if-env-changed=X86_64_UNKNOWN_LINUX_GNU_OPENSSL_INCLUDE_DIR
> cargo:rerun-if-env-changed=OPENSSL_INCLUDE_DIR
> cargo:rerun-if-env-changed=X86_64_UNKNOWN_LINUX_GNU_OPENSSL_DIR
> cargo:rerun-if-env-changed=OPENSSL_DIR
> cargo:rustc-link-lib=ssl
> cargo:rustc-link-lib=crypto
> OPT_LEVEL = Some("3")
> TARGET = Some("x86_64-unknown-linux-gnu")
> HOST = Some("x86_64-unknown-linux-gnu")
> CC_x86_64-unknown-linux-gnu = None
> CC_x86_64_unknown_linux_gnu = None
> HOST_CC = None
> CC = None
> CFLAGS_x86_64-unknown-linux-gnu = None
> CFLAGS_x86_64_unknown_linux_gnu = None
> HOST_CFLAGS = None
> CFLAGS = Some("-march=native -g0 -O3 -pipe -fomit-frame-pointer -mindirect-branch=thunk -mfunction-return=thunk -mindirect-branch-register -fno-diagnostics-show-caret -flto=5 -fuse-linker-plugin -fno-lto -fno-use-linker-plugin")
> DEBUG = Some("false")
> running: "cc" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "-march=native" "-g0" "-O3" "-pipe" "-fomit-frame-pointer" "-mindirect-branch=thunk" "-mfunction-return=thunk" "-mindirect-branch-register" "-fno-diagnostics-show-caret" "-flto=5" "-fuse-linker-plugin" "-fno-lto" "-fno-use-linker-plugin" "-m64" "-E" "/var/tmp/portage/dev-util/cargo-0.30.0/work/cargo-0.30.0/target/release/build/openssl-sys-c16fb61044f52df6/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
> cargo:rustc-cfg=libressl
> cargo:rustc-cfg=libressl251
> cargo:rustc-cfg=libressl261
> cargo:rustc-cfg=libressl270
> cargo:rustc-cfg=libressl273
> cargo:rustc-cfg=libressl280
> cargo:libressl_version_number=2080300f
> 
> --- stderr
> thread 'main' panicked at '
> 
> This crate is only compatible with OpenSSL 1.0.1 through 1.1.1, or LibreSSL 2.5
> through 2.7, but a different version of OpenSSL was found. The build is now aborting
> due to this version mismatch.
> 
> ', /var/tmp/portage/dev-util/cargo-0.30.0/work/cargo_home/gentoo/openssl-sys-0.9.36/build/main.rs:537:5
> note: Run with `RUST_BACKTRACE=1` for a backtrace.
> 
> warning: build failed, waiting for other jobs to finish...
> error: build failed
>  * ERROR: dev-util/cargo-0.30.0::gentoo failed (compile phase):
>  *   (no error message)
>  *
>  * Call stack:
>  *     ebuild.sh, line 124:  Called src_compile
>  *   environment, line 2147:  Called die
>  * The specific snippet of code:
>  *       ${cargo} build -j$(makeopts_jobs) --release || die;
>  *
>  * If you need support, post the output of `emerge --info '=dev-util/cargo-0.30.0::gentoo'`,
>  * the complete build log and the output of `emerge -pqv '=dev-util/cargo-0.30.0::gentoo'`.
>  * The complete build log is located at '/var/tmp/portage/dev-util/cargo-0.30.0/temp/build.log'.
>  * The ebuild environment file is located at '/var/tmp/portage/dev-util/cargo-0.30.0/temp/environment'.
>  * Working directory: '/var/tmp/portage/dev-util/cargo-0.30.0/work/cargo-0.30.0'
>  * S: '/var/tmp/portage/dev-util/cargo-0.30.0/work/cargo-0.30.0'
> 
>  >>> Failed to emerge dev-util/cargo-0.30.0, Log file:
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2019-02-18 15:38:25 UTC
Please attach the entire build log to this bug report.
Comment 2 fkater 2019-02-18 15:45:45 UTC
Created attachment 565718 [details]
build.log showing error
Comment 3 fkater 2019-02-19 19:34:39 UTC
Created attachment 565908 [details]
updated cargo ebuild

I have created a -r1 version of cargo-0.30.0, with slight updates:

# diff cargo-0.30.0.ebuild cargo-0.30.0-r1.ebuild
73,74c73,74
< openssl-src-110.0.7+1.1.0i
< openssl-sys-0.9.36
---
> openssl-src-111.1.0+1.1.1a
> openssl-sys-0.9.40

Works for me.
Comment 4 Mark Olesen 2019-02-25 21:09:37 UTC
I am using LibreSSL and get the same error

 * One or more packages are either masked or have missing dependencies:
 * 
 *   dev-libs/libressl:0/44= pulled in by:
 *     (dev-util/cargo-0.30.0:0/0::gentoo, installed)
 * 
...
 * Package:    dev-util/cargo-0.30.0
 * Repository: gentoo
 * Maintainer: rust@gentoo.org
 * USE:        abi_x86_64 amd64 elibc_glibc kernel_linux libressl userland_GNU
 * FEATURES:   preserve-libs sandbox userpriv usersandbox
...
--- stderr
thread 'main' panicked at '

This crate is only compatible with OpenSSL 1.0.1 through 1.1.1, or LibreSSL 2.5
through 2.7, but a different version of OpenSSL was found. The build is now aborting due to this version mismatch.
Comment 5 pagorman 2019-03-04 07:52:51 UTC
I'll vouch for this error's existence. Updating cargo package 'openssl-sys' to v0.9.40 resolves the issue - that's the meaningful update in this ebuild.

rust-1.32.0 had a similar error, but as the portage repos won't add that package, I had patched openssl-sys within to support libressl-2.8.x
Comment 6 Stefan Strogin gentoo-dev 2019-05-09 04:16:51 UTC
With LibreSSL 2.9.1:

error: failed to run custom build command for `openssl-sys v0.9.36`
process didn't exit successfully: `/var/tmp/portage/dev-util/cargo-0.30.0-r1/work/cargo-0.30.0/target/release/build/openssl-sys-541db8cb9e1825ee/build-script-main` (exit code: 101)
--- stdout
cargo:rerun-if-env-changed=X86_64_UNKNOWN_LINUX_GNU_OPENSSL_LIB_DIR
cargo:rerun-if-env-changed=OPENSSL_LIB_DIR
cargo:rerun-if-env-changed=X86_64_UNKNOWN_LINUX_GNU_OPENSSL_INCLUDE_DIR
cargo:rerun-if-env-changed=OPENSSL_INCLUDE_DIR
cargo:rerun-if-env-changed=X86_64_UNKNOWN_LINUX_GNU_OPENSSL_DIR
cargo:rerun-if-env-changed=OPENSSL_DIR
cargo:rustc-link-lib=ssl
cargo:rustc-link-lib=crypto
OPT_LEVEL = Some("3")
TARGET = Some("x86_64-unknown-linux-gnu")
HOST = Some("x86_64-unknown-linux-gnu")
CC_x86_64-unknown-linux-gnu = None
CC_x86_64_unknown_linux_gnu = None
HOST_CC = None
CC = None
CFLAGS_x86_64-unknown-linux-gnu = None
CFLAGS_x86_64_unknown_linux_gnu = None
HOST_CFLAGS = None
CFLAGS = Some("-march=skylake -O3 -pipe")
DEBUG = Some("false")
running: "cc" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "-march=skylake" "-O3" "-pipe" "-m64" "-E" "/var/tmp/portage/dev-util/cargo-0.30.0-r1/work/cargo-0.30.0/target/release/build/openssl-sys-43945062714c9a5d/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
cargo:rustc-cfg=libressl
cargo:rustc-cfg=libressl251
cargo:rustc-cfg=libressl261
cargo:rustc-cfg=libressl270
cargo:rustc-cfg=libressl273
cargo:rustc-cfg=libressl280
cargo:libressl_version_number=2090100f

--- stderr
thread 'main' panicked at '

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

', /var/tmp/portage/dev-util/cargo-0.30.0-r1/work/cargo_home/gentoo/openssl-sys-0.9.36/build/main.rs:537:5
note: Run with `RUST_BACKTRACE=1` environment variable to display a backtrace.

warning: build failed, waiting for other jobs to finish...
error: build failed
Comment 7 Larry the Git Cow gentoo-dev 2019-05-09 13:15:26 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/proj/libressl.git/commit/?id=bf14a415b362e75ddc6b7381dda86c045abfd7f0

commit bf14a415b362e75ddc6b7381dda86c045abfd7f0
Author:     Quentin Retornaz <gentoo@retornaz.com>
AuthorDate: 2019-05-07 20:04:01 +0000
Commit:     Stefan Strogin <steils@gentoo.org>
CommitDate: 2019-05-09 04:18:13 +0000

    dev-util/cargo: update openssl-sys crate to 0.9.45 for libressl 2.9.1
    
    Package-Manager: Portage-2.3.62, Repoman-2.3.11
    Signed-off-by: Quentin Retornaz <gentoo@retornaz.com>
    Bug: https://bugs.gentoo.org/678286
    Closes: https://github.com/gentoo/libressl/pull/293
    Signed-off-by: Stefan Strogin <steils@gentoo.org>

 dev-util/cargo/Manifest               | 5 +++--
 dev-util/cargo/cargo-0.30.0-r1.ebuild | 5 +++--
 2 files changed, 6 insertions(+), 4 deletions(-)