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-sys constantly recompiling since 0.9.100
with OPENSSL_LIB_DIR
, OPENSSL_INCLUDE_DIR
set
#2183
Comments
I'm not able to reproduce this with the latest release. Can you run |
I had custom set It's quite possible then that this issue may not affect many / any other use scenarios. So I'll close, sorry for the noise. |
Ah so interestingly if I have OPENSSL_LIB_DIR and OPENSSL_INCLUDE_DIR set then it recompiles openssl-sys, every time. That seems bad. |
I think the problem is this line: rust-openssl/openssl-sys/build/main.rs Lines 86 to 88 in 3439059
If I set OPENSSL_INCLUDE_DIR to /usr/include/openssl (rather than /usr/include ) then the path /usr/include/openssl/openssl doesn't exist, causing cargo to rebuild every time.
|
Interesting. CC @reaperhulk
…On Thu, Feb 22, 2024, 9:01 AM Jack Rickard ***@***.***> wrote:
I think the problem is this line:
https://github.com/sfackler/rust-openssl/blob/3439059e1dbb0df5d0e29ac64670735c65a2aa6c/openssl-sys/build/main.rs#L86-L88
If I set OPENSSL_INCLUDE_DIR to /usr/include/openssl (rather than
/usr/include) then the path /usr/include/openssl/openssl doesn't exist,
causing cargo to rebuild every time.
—
Reply to this email directly, view it on GitHub
<#2183 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAAGBGRJPUE7MD3QU35IRLYU5FVBAVCNFSM6AAAAABDUXENIOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNJZGUYTCNBQHE>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Although thinking about it, I think I've just misconfigured it by specifying it as |
0.9.100
0.9.100
with OPENSSL_LIB_DIR
, OPENSSL_INCLUDE_DIR
set
I think erroring is highly likely to break somebody, but we could check if the path exists ( I don't love the complexity that is arising here though. If we make this change we will emit this rerun event if it's not vendored and if it is able to find a While the previous behavior was not ideal, it also probably only affected a small subset of folks who regularly upgrade their OpenSSL and also have rust intermediate caching systems. It just so happens it directly affected the project @alex and I work on 😄 @alex @sfackler do you two have an opinion? I can add the existence check or I can revert the whole thing -- up to you! |
I think silently ignoring it if the directory doesn't exist there is the best path |
openssl-sys constantly recompiling since
0.9.100
. This has significant impact on incremental builds.Steps to reproduce
New project with
Incremental build output:
Downgrade to older openssl-sys
Incremental build output: (Does not recompile each time).
The text was updated successfully, but these errors were encountered: