Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to specify the source version to compile? rolled back openssl v3.3.2 to v3.3.1 #2300

Open
metercai opened this issue Sep 5, 2024 · 4 comments

Comments

@metercai
Copy link

metercai commented Sep 5, 2024

The routine compilation in GitHub action encountered a failure due to the OpenSSL upgrade of 3.3.2.

Then, we submitted a bug report: openssl/openssl#25368

And then, The official only applied patches and did not release a new version: openssl/openssl#25367

But, it's no way to patch in CI script because it is automatically compiled.

So, how to specify the source version to compile in Cargo.toml for openssl crate? Going back from v3.3.2 to v3.3.1 will be ok.

Cargo.toml :
openssl = { version = "0.10", features = ["vendored"] }

the complie logs :
2024-09-03T18:18:49.7286681Z running cd "/home/runner/work/simpleai_base/simpleai_base/target/x86_64-unknown-linux-gnu/release/build/openssl-sys-a8783d2b6f7231a7/out/openssl-build/build/src" && env -u CROSS_COMPILE AR="ar" CC="sccache cc" RANLIB="ranlib" "perl" "./Configure" "--prefix=/home/runner/work/simpleai_base/simpleai_base/target/x86_64-unknown-linux-gnu/release/build/openssl-sys-a8783d2b6f7231a7/out/openssl-build/install" "--openssldir=/usr/local/ssl" "no-dso" "no-shared" "no-ssl3" "no-tests" "no-comp" "no-zlib" "no-zlib-dynamic" "--libdir=lib" "no-md2" "no-rc5" "no-weak-ssl-ciphers" "no-camellia" "no-idea" "no-seed" "linux-x86_64" "-O2" "-ffunction-sections" "-fdata-sections" "-fPIC" "-m64"
2024-09-03T18:18:49.7292338Z Configuring OpenSSL version 3.3.2 for target linux-x86_64
2024-09-03T18:18:49.7293269Z Using os-specific seed configuration
2024-09-03T18:18:49.7293900Z Created configdata.pm
2024-09-03T18:18:49.7294541Z Running configdata.pm
2024-09-03T18:18:49.7295379Z Created Makefile.in
2024-09-03T18:18:49.7295866Z Created Makefile
2024-09-03T18:18:49.7296522Z Created include/openssl/configuration.h
2024-09-03T18:18:49.7296992Z
2024-09-03T18:18:49.7297302Z **********************************************************************
2024-09-03T18:18:49.7298037Z *** ***
2024-09-03T18:18:49.7299033Z *** OpenSSL has been successfully configured ***
2024-09-03T18:18:49.7300160Z *** ***
2024-09-03T18:18:49.7301084Z *** If you encounter a problem while building, please open an ***
2024-09-03T18:18:49.7302239Z *** issue on GitHub https://github.com/openssl/openssl/issues ***
2024-09-03T18:18:49.7303319Z *** and include the output from the following command: ***
2024-09-03T18:18:49.7304223Z *** ***
2024-09-03T18:18:49.7305216Z *** perl configdata.pm --dump ***
2024-09-03T18:18:49.7306150Z *** ***
2024-09-03T18:18:49.7428039Z *** (If you are new to OpenSSL, you might want to consult the ***
2024-09-03T18:18:49.7429479Z *** 'Troubleshooting' section in the INSTALL.md file first) ***
2024-09-03T18:18:49.7430448Z *** ***
2024-09-03T18:18:49.7431265Z **********************************************************************
2024-09-03T18:18:49.7433496Z running cd "/home/runner/work/simpleai_base/simpleai_base/target/x86_64-unknown-linux-gnu/release/build/openssl-sys-a8783d2b6f7231a7/out/openssl-build/build/src" && "make" "depend"
2024-09-03T18:18:49.7437097Z running cd "/home/runner/work/simpleai_base/simpleai_base/target/x86_64-unknown-linux-gnu/release/build/openssl-sys-a8783d2b6f7231a7/out/openssl-build/build/src" && MAKEFLAGS="-j --jobserver-fds=8,9 --jobserver-auth=8,9" "make" "build_libs"
2024-09-03T18:18:49.7440973Z /usr/bin/perl util/mkinstallvars.pl PREFIX=. BINDIR=apps APPLINKDIR=ms LIBDIR= INCLUDEDIR=include "INCLUDEDIR=./include" ENGINESDIR=engines MODULESDIR=providers "VERSION=3.3.2" "LDLIBS=-ldl -pthread " > builddata.pm
2024-09-03T18:18:49.7442854Z
2024-09-03T18:18:49.7443099Z --- stderr
2024-09-03T18:18:49.7443716Z "pairs" is not exported by the List::Util module
2024-09-03T18:18:49.7444910Z Can't continue after import errors at util/mkinstallvars.pl line 14.
2024-09-03T18:18:49.7446122Z BEGIN failed--compilation aborted at util/mkinstallvars.pl line 14.
2024-09-03T18:18:49.7447042Z make: *** [builddata.pm] Error 255
2024-09-03T18:18:49.7448664Z thread 'main' panicked at /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/openssl-src-300.3.2+3.3.2/src/lib.rs:633:9:

@sfackler
Copy link
Owner

sfackler commented Sep 5, 2024

You can use cargo update --precise to adjust the version of openssl-src in your Cargo.lock.

@metercai
Copy link
Author

metercai commented Sep 5, 2024

You can use cargo update --precise to adjust the version of openssl-src in your Cargo.lock.

thanks. but, in the action script, only the project source and run before build script can be adjusted, and everything else is automated. adjusting Cargo.lock needs to be done after cargo build. it seems unlikely?

@sfackler
Copy link
Owner

sfackler commented Sep 5, 2024

I don't know the details of your build process. If you want to use the vendored OpenSSL build, the only way to adjust the OpenSSL version is to adjust the version of the openssl-src crate the build uses.

@LorenzoLeonardo
Copy link

you can peg that version in your cargo.toml like this

wiremock = "=0.5.15"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants