JuliaLang / Downloads.jl

MIT License
89 stars 34 forks source link

Unnecessary SSL_VERSION throws errors #216

Closed smartalecH closed 1 year ago

smartalecH commented 1 year ago

Currently, Curl.jl queries curl_version_info for an ssl_version. It then supposedly uses this information to set the SYSTEM_SSL flag:

https://github.com/JuliaLang/Downloads.jl/blob/2a21b1536aec0219c6bdb78dbb6570fc31a40983/src/Curl/Curl.jl#L70-L73

This doesn't make sense though... because Julia's libcurl is configured without ssl support:

https://github.com/JuliaLang/julia/blob/d77575063d7ecb5e79ee6fc9f3b73242f8282853/deps/curl.mk#L39

And according to the curl docs, this results in a NULL:

ssl_version is an ASCII string for the TLS library name + version used. If libcurl has no SSL support, this is NULL. For example "Schannel", "Secure Transport" or "OpenSSL/1.1.0g".

This is problematic, as a NULL throws an error (sometimes during building Julia itself). See for example, this issue.

DilumAluthge commented 1 year ago

Interestingly enough, when Julia is built without BinaryBuilder, we configure libcurl without SSL, as you linked in https://github.com/JuliaLang/julia/blob/d77575063d7ecb5e79ee6fc9f3b73242f8282853/deps/curl.mk#L39

But when Julia is built with BinaryBuilder enabled, we use the BinaryBuilder libcurl, which doesn't seem to disable SSL: https://github.com/JuliaPackaging/Yggdrasil/blob/206e953cce60ef7bf6a5243555f63633aeede108/L/LibCURL/common.jl

giordano commented 1 year ago

That's because libcurl 7.87 can't be built with --without-ssl: https://github.com/JuliaPackaging/Yggdrasil/pull/6040#issuecomment-1368010247

giordano commented 1 year ago

And libcurl in julia is still at 7.84: https://github.com/JuliaLang/julia/blob/d77575063d7ecb5e79ee6fc9f3b73242f8282853/stdlib/LibCURL_jll/Project.toml#L3. So you're comparing different versions.

DilumAluthge commented 1 year ago

Cross-ref https://github.com/JuliaLang/julia/issues/48407