Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Apparently openssl-sys has a separate branch: https://github.com/sfackler/rust-openssl/tree/openssl-300
It seems to me that openssl-sys replicates many C constructs in rust sources, e.g.:
pub const EVP_PKEY_CTRL_RSA_PADDING: c_int = EVP_PKEY_ALG_CTRL + 1;
pub const EVP_PKEY_CTRL_RSA_PSS_SALTLEN: c_int = EVP_PKEY_ALG_CTRL + 2;
pub const EVP_PKEY_CTRL_RSA_MGF1_MD: c_int = EVP_PKEY_ALG_CTRL + 5;
pub const EVP_PKEY_CTRL_GET_RSA_PADDING: c_int = EVP_PKEY_ALG_CTRL + 6;
I any of these constants have changed on the OpenSSL side, a silent incompatibility will be the result.
The "fixed in version" build was still built with the old openssl-devel, but it include the compatibility changes in the Rust crates.
Here is a successful scratch build targeting c9s-build-ssl3:
https://kojihub.stream.centos.org/koji/taskinfo?taskID=266651
Comment 8Alexandra Petlanová Hájková
2021-05-21 14:46:50 UTC
FYI, the upstream rust-openssl changes have been merged and published.
I also submitted an upstream pull request to update the dependencies in rust itself.
Building with openssl-devel from OpenSSL 3.0 fails: The following warnings were emitted during compilation: warning: build/expando.c:4:24: error: pasting "RUST_VERSION_OPENSSL_" and "(" does not give a valid preprocessing token warning: 4 | #define VERSION2(n, v) RUST_VERSION_##n##_##v warning: | ^~~~~~~~~~~~~ warning: build/expando.c:5:23: note: in expansion of macro ‘VERSION2’ warning: 5 | #define VERSION(n, v) VERSION2(n, v) warning: | ^~~~~~~~ warning: build/expando.c:10:1: note: in expansion of macro ‘VERSION’ warning: 10 | VERSION(OPENSSL, OPENSSL_VERSION_NUMBER) warning: | ^~~~~~~ error: failed to run custom build command for `openssl-sys v0.9.58` Caused by: process didn't exit successfully: `/builddir/build/BUILD/rustc-1.49.0-src/build/i686-unknown-linux-gnu/stage2-tools/release/build/openssl-sys-89b8c7c3d28ae09c/build-script-main` (exit code: 101) --- stdout cargo:rustc-cfg=const_fn cargo:rerun-if-env-changed=I686_UNKNOWN_LINUX_GNU_OPENSSL_LIB_DIR I686_UNKNOWN_LINUX_GNU_OPENSSL_LIB_DIR unset cargo:rerun-if-env-changed=OPENSSL_LIB_DIR OPENSSL_LIB_DIR unset cargo:rerun-if-env-changed=I686_UNKNOWN_LINUX_GNU_OPENSSL_INCLUDE_DIR I686_UNKNOWN_LINUX_GNU_OPENSSL_INCLUDE_DIR unset cargo:rerun-if-env-changed=OPENSSL_INCLUDE_DIR OPENSSL_INCLUDE_DIR unset cargo:rerun-if-env-changed=I686_UNKNOWN_LINUX_GNU_OPENSSL_DIR I686_UNKNOWN_LINUX_GNU_OPENSSL_DIR unset cargo:rerun-if-env-changed=OPENSSL_DIR OPENSSL_DIR unset cargo:rerun-if-env-changed=OPENSSL_NO_PKG_CONFIG cargo:rerun-if-env-changed=PKG_CONFIG cargo:rerun-if-env-changed=OPENSSL_STATIC cargo:rerun-if-env-changed=OPENSSL_DYNAMIC cargo:rerun-if-env-changed=PKG_CONFIG_ALL_STATIC cargo:rerun-if-env-changed=PKG_CONFIG_ALL_DYNAMIC cargo:rerun-if-env-changed=PKG_CONFIG_PATH_i686-unknown-linux-gnu cargo:rerun-if-env-changed=PKG_CONFIG_PATH_i686_unknown_linux_gnu cargo:rerun-if-env-changed=HOST_PKG_CONFIG_PATH cargo:rerun-if-env-changed=PKG_CONFIG_PATH cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_i686-unknown-linux-gnu cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_i686_unknown_linux_gnu cargo:rerun-if-env-changed=HOST_PKG_CONFIG_LIBDIR cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_i686-unknown-linux-gnu cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_i686_unknown_linux_gnu cargo:rerun-if-env-changed=HOST_PKG_CONFIG_SYSROOT_DIR cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR cargo:rerun-if-env-changed=OPENSSL_STATIC cargo:rerun-if-env-changed=OPENSSL_DYNAMIC cargo:rerun-if-env-changed=PKG_CONFIG_ALL_STATIC cargo:rerun-if-env-changed=PKG_CONFIG_ALL_DYNAMIC cargo:rustc-link-lib=ssl cargo:rustc-link-lib=crypto cargo:rerun-if-env-changed=PKG_CONFIG cargo:rerun-if-env-changed=OPENSSL_STATIC cargo:rerun-if-env-changed=OPENSSL_DYNAMIC cargo:rerun-if-env-changed=PKG_CONFIG_ALL_STATIC cargo:rerun-if-env-changed=PKG_CONFIG_ALL_DYNAMIC cargo:rerun-if-env-changed=PKG_CONFIG_PATH_i686-unknown-linux-gnu cargo:rerun-if-env-changed=PKG_CONFIG_PATH_i686_unknown_linux_gnu cargo:rerun-if-env-changed=HOST_PKG_CONFIG_PATH cargo:rerun-if-env-changed=PKG_CONFIG_PATH cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_i686-unknown-linux-gnu cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_i686_unknown_linux_gnu cargo:rerun-if-env-changed=HOST_PKG_CONFIG_LIBDIR cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_i686-unknown-linux-gnu cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_i686_unknown_linux_gnu cargo:rerun-if-env-changed=HOST_PKG_CONFIG_SYSROOT_DIR cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR OPT_LEVEL = Some("3") TARGET = Some("i686-unknown-linux-gnu") HOST = Some("i686-unknown-linux-gnu") CC_i686-unknown-linux-gnu = Some("gcc") CFLAGS_i686-unknown-linux-gnu = Some("-ffunction-sections -fdata-sections -fPIC -m32 -march=i686 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m32 -march=i686 -mtune=generic -msse2 -mfpmath=sse -mstackrealign -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection") CRATE_CC_NO_DEFAULTS = None DEBUG = Some("false") CARGO_CFG_TARGET_FEATURE = Some("fxsr,sse,sse2") running: "gcc" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "-m32" "-march=i686" "-ffunction-sections" "-fdata-sections" "-fPIC" "-m32" "-march=i686" "-flto=auto" "-ffat-lto-objects" "-fexceptions" "-g" "-grecord-gcc-switches" "-pipe" "-Wall" "-Werror=format-security" "-Wp,-D_FORTIFY_SOURCE=2" "-Wp,-D_GLIBCXX_ASSERTIONS" "-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1" "-fstack-protector-strong" "-specs=/usr/lib/rpm/redhat/redhat-annobin-cc1" "-m32" "-march=i686" "-mtune=generic" "-msse2" "-mfpmath=sse" "-mstackrealign" "-fasynchronous-unwind-tables" "-fstack-clash-protection" "-fcf-protection" "-I" "/usr/include" "-E" "build/expando.c" cargo:warning=build/expando.c:4:24: error: pasting "RUST_VERSION_OPENSSL_" and "(" does not give a valid preprocessing token cargo:warning= 4 | #define VERSION2(n, v) RUST_VERSION_##n##_##v cargo:warning= | ^~~~~~~~~~~~~ cargo:warning=build/expando.c:5:23: note: in expansion of macro ‘VERSION2’ cargo:warning= 5 | #define VERSION(n, v) VERSION2(n, v) cargo:warning= | ^~~~~~~~ cargo:warning=build/expando.c:10:1: note: in expansion of macro ‘VERSION’ cargo:warning= 10 | VERSION(OPENSSL, OPENSSL_VERSION_NUMBER) cargo:warning= | ^~~~~~~ exit code: 1 --- stderr thread 'main' panicked at ' Header expansion error: Error { kind: ToolExecError, message: "Command \"gcc\" \"-O3\" \"-ffunction-sections\" \"-fdata-sections\" \"-fPIC\" \"-m32\" \"-march=i686\" \"-ffunction-sections\" \"-fdata-sections\" \"-fPIC\" \"-m32\" \"-march=i686\" \"-flto=auto\" \"-ffat-lto-objects\" \"-fexceptions\" \"-g\" \"-grecord-gcc-switches\" \"-pipe\" \"-Wall\" \"-Werror=format-security\" \"-Wp,-D_FORTIFY_SOURCE=2\" \"-Wp,-D_GLIBCXX_ASSERTIONS\" \"-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1\" \"-fstack-protector-strong\" \"-specs=/usr/lib/rpm/redhat/redhat-annobin-cc1\" \"-m32\" \"-march=i686\" \"-mtune=generic\" \"-msse2\" \"-mfpmath=sse\" \"-mstackrealign\" \"-fasynchronous-unwind-tables\" \"-fstack-clash-protection\" \"-fcf-protection\" \"-I\" \"/usr/include\" \"-E\" \"build/expando.c\" with args \"gcc\" did not execute successfully (status code exit code: 1)." } Failed to find OpenSSL development headers. You can try fixing this setting the `OPENSSL_DIR` environment variable pointing to your OpenSSL installation or installing OpenSSL headers package specific to your distribution: # On Ubuntu sudo apt-get install libssl-dev # On Arch Linux sudo pacman -S openssl # On Fedora sudo dnf install openssl-devel See rust-openssl README for more information: https://github.com/sfackler/rust-openssl#linux ', /builddir/build/BUILD/rustc-1.49.0-src/vendor/openssl-sys/build/main.rs:140:13 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace