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

OpenSSL compiling at every cargo run #2176

Closed
EricFecteau opened this issue Feb 19, 2024 · 5 comments
Closed

OpenSSL compiling at every cargo run #2176

EricFecteau opened this issue Feb 19, 2024 · 5 comments

Comments

@EricFecteau
Copy link

EricFecteau commented Feb 19, 2024

Ran Cargo Update and now Openssl compiles every time I run cargo run.

Updating openssl v0.10.63 -> v0.10.64
Updating openssl-src v300.2.2+3.2.1 -> v300.2.3+3.2.1
Updating openssl-sys v0.9.99 -> v0.9.100
> cargo run --release
   Compiling openssl-sys v0.9.100
   Compiling openssl v0.10.64
   Compiling native-tls v0.2.11
   Compiling tungstenite v0.21.0

This was not the case before. Wonder if it's linked to #2157

Open SSL comes from:

tungstenite = { version = "0.21", features = ["native-tls-vendored"] }

@alex
Copy link
Collaborator

alex commented Feb 19, 2024

#2157 is the most likely culprit, but it was pretty intentionally written so that this shouldn't happen.

Can you increase the logging verbosity on cargo?

@EricFecteau EricFecteau changed the title OpenSSL compiling at every cargo run --release OpenSSL compiling at every cargo run Feb 19, 2024
@EricFecteau
Copy link
Author

EricFecteau commented Feb 19, 2024

Here is the output of cargo build --verbose:

       Fresh cc v1.0.83
       Fresh cfg-if v1.0.0
       Fresh libc v0.2.153
       Fresh pkg-config v0.3.30
       Fresh vcpkg v0.2.15
       Fresh unicode-ident v1.0.12
       Fresh proc-macro2 v1.0.78
       Fresh quote v1.0.35
       Fresh once_cell v1.19.0
       Fresh syn v2.0.49
       Fresh target-lexicon v0.12.13
       Fresh openssl-src v300.2.3+3.2.1
       Fresh version_check v0.9.4
       Fresh autocfg v1.1.0
       Fresh tinyvec_macros v0.1.1
       Fresh getrandom v0.2.12
       Fresh foreign-types-shared v0.1.1
       Fresh openssl-macros v0.1.1
       Fresh heck v0.4.1
       Fresh percent-encoding v2.3.1
       Fresh ppv-lite86 v0.2.17
       Dirty openssl-sys v0.9.100: the file `target/debug/build/openssl-sys-ba681e03203e127e/out/openssl-build/install/include/openssl` has changed (1708381318.068368745s, 23s after last build at 1708381295.784739056s)
   Compiling openssl-sys v0.9.100
       Fresh pyo3-build-config v0.20.2
       Fresh typenum v1.17.0
       Fresh tinyvec v1.6.0
       Fresh rand_core v0.6.4
       Fresh foreign-types v0.3.2
       Fresh unicode-bidi v0.3.15
       Fresh bitflags v2.4.2
       Fresh generic-array v0.14.7
       Fresh unicode-normalization v0.1.22
       Fresh scopeguard v1.2.0
       Fresh itoa v1.0.10
       Fresh smallvec v1.13.1
       Fresh rand_chacha v0.3.1
       Fresh form_urlencoded v1.2.1
       Fresh pyo3-macros-backend v0.20.2
     Running `/home/eric/Rust/dcss-api/target/debug/build/openssl-sys-b6e4645b1cb0057f/build-script-main`
       Fresh crypto-common v0.1.6
       Fresh block-buffer v0.10.4
       Fresh parking_lot_core v0.9.9
       Fresh lock_api v0.4.11
       Fresh idna v0.5.0
       Fresh thiserror-impl v1.0.57
       Fresh log v0.4.20
       Fresh cpufeatures v0.2.12
       Fresh openssl-probe v0.1.5
       Fresh bytes v1.5.0
       Fresh fnv v1.0.7
       Fresh serde v1.0.196
       Fresh digest v0.10.7
       Fresh thiserror v1.0.57
       Fresh pyo3-ffi v0.20.2
       Fresh memoffset v0.9.0
       Fresh url v2.5.0
       Fresh http v1.0.0
       Fresh parking_lot v0.12.1
       Fresh rand v0.8.5
       Fresh libz-sys v1.1.15
       Fresh httparse v1.8.0
       Fresh pyo3-macros v0.20.2
       Fresh crc32fast v1.4.0
       Fresh ryu v1.0.17
       Fresh sha1 v0.10.6
       Fresh indoc v2.0.4
       Fresh utf-8 v0.7.6
       Fresh unindent v0.2.3
       Fresh data-encoding v2.5.0
       Fresh byteorder v1.5.0
       Fresh flate2 v1.0.28
       Fresh serde_json v1.0.113
       Fresh pyo3 v0.20.2
       Dirty openssl v0.10.64: the dependency build_script_main was rebuilt
   Compiling openssl v0.10.64
       Dirty native-tls v0.2.11: the dependency build_script_main was rebuilt
   Compiling native-tls v0.2.11
     Running `/home/eric/Rust/dcss-api/target/debug/build/openssl-829c33bb42e6ab88/build-script-build`
     Running `/home/eric/Rust/dcss-api/target/debug/build/native-tls-58d8931cc450f4c9/build-script-build`
     Running `/home/eric/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/rustc --crate-name openssl_sys --edition=2018 /home/eric/.cargo/registry/src/index.crates.io-6f17d22bba15001f/openssl-sys-0.9.100/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=169 --crate-type lib --emit=dep-info,metadata,link -C embed-bitcode=no -C debuginfo=2 --cfg 'feature="openssl-src"' --cfg 'feature="vendored"' -C metadata=00ac49dffbf84702 -C extra-filename=-00ac49dffbf84702 --out-dir /home/eric/Rust/dcss-api/target/debug/deps -L dependency=/home/eric/Rust/dcss-api/target/debug/deps --extern libc=/home/eric/Rust/dcss-api/target/debug/deps/liblibc-50cf0445600f9cae.rmeta --cap-lints allow -L native=/home/eric/Rust/dcss-api/target/debug/build/openssl-sys-ba681e03203e127e/out/openssl-build/install/lib -l static=ssl -l static=crypto --cfg 'osslconf="OPENSSL_NO_IDEA"' --cfg 'osslconf="OPENSSL_NO_CAMELLIA"' --cfg 'osslconf="OPENSSL_NO_COMP"' --cfg 'osslconf="OPENSSL_NO_SSL3_METHOD"' --cfg 'osslconf="OPENSSL_NO_SEED"' --cfg openssl --cfg ossl320 --cfg ossl300 --cfg ossl101 --cfg ossl102 --cfg ossl102f --cfg ossl102h --cfg ossl110 --cfg ossl110f --cfg ossl110g --cfg ossl110h --cfg ossl111 --cfg ossl111b --cfg ossl111c --cfg ossl111d`
     Running `/home/eric/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/rustc --crate-name openssl --edition=2018 /home/eric/.cargo/registry/src/index.crates.io-6f17d22bba15001f/openssl-0.10.64/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=169 --crate-type lib --emit=dep-info,metadata,link -C embed-bitcode=no -C debuginfo=2 --cfg 'feature="default"' --cfg 'feature="vendored"' -C metadata=3236084deeb89cf0 -C extra-filename=-3236084deeb89cf0 --out-dir /home/eric/Rust/dcss-api/target/debug/deps -L dependency=/home/eric/Rust/dcss-api/target/debug/deps --extern bitflags=/home/eric/Rust/dcss-api/target/debug/deps/libbitflags-7888bca69ca0a633.rmeta --extern cfg_if=/home/eric/Rust/dcss-api/target/debug/deps/libcfg_if-a4e1ca4231ab3b1f.rmeta --extern foreign_types=/home/eric/Rust/dcss-api/target/debug/deps/libforeign_types-33b7bd75f928e48b.rmeta --extern libc=/home/eric/Rust/dcss-api/target/debug/deps/liblibc-50cf0445600f9cae.rmeta --extern once_cell=/home/eric/Rust/dcss-api/target/debug/deps/libonce_cell-a5f155bc652541d7.rmeta --extern openssl_macros=/home/eric/Rust/dcss-api/target/debug/deps/libopenssl_macros-e651849f15bd0162.so --extern ffi=/home/eric/Rust/dcss-api/target/debug/deps/libopenssl_sys-00ac49dffbf84702.rmeta --cap-lints allow -L native=/home/eric/Rust/dcss-api/target/debug/build/openssl-sys-ba681e03203e127e/out/openssl-build/install/lib --cfg 'osslconf="OPENSSL_NO_IDEA"' --cfg 'osslconf="OPENSSL_NO_CAMELLIA"' --cfg 'osslconf="OPENSSL_NO_COMP"' --cfg 'osslconf="OPENSSL_NO_SSL3_METHOD"' --cfg 'osslconf="OPENSSL_NO_SEED"' --cfg ossl101 --cfg ossl102 --cfg ossl110 --cfg ossl110g --cfg ossl110h --cfg ossl111 --cfg ossl300 --cfg ossl310 --cfg ossl320`
     Running `/home/eric/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/rustc --crate-name native_tls /home/eric/.cargo/registry/src/index.crates.io-6f17d22bba15001f/native-tls-0.2.11/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=169 --crate-type lib --emit=dep-info,metadata,link -C embed-bitcode=no -C debuginfo=2 --cfg 'feature="vendored"' -C metadata=b70204a2d8a7d246 -C extra-filename=-b70204a2d8a7d246 --out-dir /home/eric/Rust/dcss-api/target/debug/deps -L dependency=/home/eric/Rust/dcss-api/target/debug/deps --extern log=/home/eric/Rust/dcss-api/target/debug/deps/liblog-7aa96ba0919470e4.rmeta --extern openssl=/home/eric/Rust/dcss-api/target/debug/deps/libopenssl-3236084deeb89cf0.rmeta --extern openssl_probe=/home/eric/Rust/dcss-api/target/debug/deps/libopenssl_probe-72b78d57ed480035.rmeta --extern openssl_sys=/home/eric/Rust/dcss-api/target/debug/deps/libopenssl_sys-00ac49dffbf84702.rmeta --cap-lints allow -L native=/home/eric/Rust/dcss-api/target/debug/build/openssl-sys-ba681e03203e127e/out/openssl-build/install/lib --cfg have_min_max_version`
       Dirty tungstenite v0.21.0: the dependency native_tls_crate was rebuilt
   Compiling tungstenite v0.21.0
     Running `/home/eric/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/rustc --crate-name tungstenite --edition=2018 /home/eric/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tungstenite-0.21.0/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=169 --crate-type lib --emit=dep-info,metadata,link -C embed-bitcode=no -C debuginfo=2 --cfg 'feature="data-encoding"' --cfg 'feature="default"' --cfg 'feature="handshake"' --cfg 'feature="http"' --cfg 'feature="httparse"' --cfg 'feature="native-tls"' --cfg 'feature="native-tls-crate"' --cfg 'feature="native-tls-vendored"' --cfg 'feature="sha1"' --cfg 'feature="url"' -C metadata=22444b43268ee305 -C extra-filename=-22444b43268ee305 --out-dir /home/eric/Rust/dcss-api/target/debug/deps -L dependency=/home/eric/Rust/dcss-api/target/debug/deps --extern byteorder=/home/eric/Rust/dcss-api/target/debug/deps/libbyteorder-34348d75f49273e9.rmeta --extern bytes=/home/eric/Rust/dcss-api/target/debug/deps/libbytes-ed3aeb66deaa63ba.rmeta --extern data_encoding=/home/eric/Rust/dcss-api/target/debug/deps/libdata_encoding-9cbc17461d3e38bc.rmeta --extern http=/home/eric/Rust/dcss-api/target/debug/deps/libhttp-cc213b28f1e1c973.rmeta --extern httparse=/home/eric/Rust/dcss-api/target/debug/deps/libhttparse-c16d0160854009e5.rmeta --extern log=/home/eric/Rust/dcss-api/target/debug/deps/liblog-7aa96ba0919470e4.rmeta --extern native_tls_crate=/home/eric/Rust/dcss-api/target/debug/deps/libnative_tls-b70204a2d8a7d246.rmeta --extern rand=/home/eric/Rust/dcss-api/target/debug/deps/librand-4c7b4306cc069190.rmeta --extern sha1=/home/eric/Rust/dcss-api/target/debug/deps/libsha1-7104715b00a825b3.rmeta --extern thiserror=/home/eric/Rust/dcss-api/target/debug/deps/libthiserror-33f2440ef856d70b.rmeta --extern url=/home/eric/Rust/dcss-api/target/debug/deps/liburl-8652ee173125ef14.rmeta --extern utf8=/home/eric/Rust/dcss-api/target/debug/deps/libutf8-8d70bb405f15c3d8.rmeta --cap-lints allow -L native=/home/eric/Rust/dcss-api/target/debug/build/openssl-sys-ba681e03203e127e/out/openssl-build/install/lib`
       Dirty dcss-api v0.1.5 (/home/eric/Rust/dcss-api): the dependency tungstenite was rebuilt
   Compiling dcss-api v0.1.5 (/home/eric/Rust/dcss-api)
     Running `/home/eric/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/rustc --crate-name dcss_api --edition=2021 src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=169 --crate-type lib --crate-type cdylib --emit=dep-info,link -C embed-bitcode=no -C debuginfo=2 -C metadata=d5daa56dca959f47 --out-dir /home/eric/Rust/dcss-api/target/debug/deps -C incremental=/home/eric/Rust/dcss-api/target/debug/incremental -L dependency=/home/eric/Rust/dcss-api/target/debug/deps --extern flate2=/home/eric/Rust/dcss-api/target/debug/deps/libflate2-3300dddeaed96ff6.rlib --extern pyo3=/home/eric/Rust/dcss-api/target/debug/deps/libpyo3-080c5c4ccf71319f.rlib --extern serde_json=/home/eric/Rust/dcss-api/target/debug/deps/libserde_json-0b963ec933c0317d.rlib --extern thiserror=/home/eric/Rust/dcss-api/target/debug/deps/libthiserror-33f2440ef856d70b.rlib --extern tungstenite=/home/eric/Rust/dcss-api/target/debug/deps/libtungstenite-22444b43268ee305.rlib --extern url=/home/eric/Rust/dcss-api/target/debug/deps/liburl-8652ee173125ef14.rlib -L native=/home/eric/Rust/dcss-api/target/debug/build/openssl-sys-ba681e03203e127e/out/openssl-build/install/lib`
    Finished dev [unoptimized + debuginfo] target(s) in 24.37s

@alex
Copy link
Collaborator

alex commented Feb 19, 2024

Ahh, the problem has to do with the vendor feature. We should not be emitting the "rebuild if OpenSSL changed" when using the vendor feature.

@alex
Copy link
Collaborator

alex commented Feb 20, 2024

#2177 should resolve this. Will be included in the next release.

@alex alex closed this as completed Feb 20, 2024
@sigaloid
Copy link

openssl-sys = "=0.9.99" in my Cargo.toml unfreezes my IDEs at least until next release, in case anyone else is blocked by this

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