curl-rust icon indicating copy to clipboard operation
curl-rust copied to clipboard

Never enable `USE_SECTRANSP` on macOS 10.7

Open catap opened this issue 3 years ago • 3 comments

Hey,

Is it possible to introduce a way to never force USE_SECTRANSP to build curl on macOS 10.7 or anything before 10.8?

Right now it can't be linked agains such old system because curl uses CCDigestGetOutputSizeFromRef which was iintroduced at 10.8, and a usual way to build it (via configure script) detects that system is too old, and simple disabled this feature.

Thanks!

catap avatar Dec 02 '21 11:12 catap

Seems somewhat reasonable, though I'm not sure the best way of doing this. Detecting based on the version of the host system might work, but that doesn't necessarily tell you the version of macOS you want to target (you might be building on a newer macOS build machine, but want to target macOS 10.4+ for example).

I'm not actually seeing CCDigestGetOutputSizeFromRef being used by the latest version of curl. Maybe you could share your error message and the version of curl you are using?

Also, if we didn't set USE_SECTRANSP, what would you expect to happen instead? Would we use OpenSSL?

sagebind avatar Dec 02 '21 16:12 sagebind

@sagebind I have this errors:

:info:destroot             "_Curl_ssl_sectransp", referenced from:
:info:destroot                 _Curl_ssl in libcurl_sys-1cf6183c18262091.rlib(vtls.o)
:info:destroot                 _available_backends in libcurl_sys-1cf6183c18262091.rlib(vtls.o)
:info:destroot           ld: symbol(s) not found for architecture x86_64
:info:destroot           clang: error: linker command failed with exit code 1 (use -v to see invocation)

right now I've replaced USE_SECTRANSP to USE_SECTRANSP_DISABLED here https://github.com/alexcrichton/curl-rust/blob/8de2e0595cb0744584b76536fe667e9c3156f8ee/curl-sys/build.rs#L292.

and rebuilding everything (whole rust) to confirm agains that it is really linked and that it is linked.

But OPENSSL is best possible option here I guess.

catap avatar Dec 02 '21 16:12 catap

Wired, the only way how can I reproduce this issue is building rust.

cargo build --examples works very well.

catap avatar Dec 02 '21 19:12 catap