Commit 6492bb70 authored by Zeyi (Rice) Fan's avatar Zeyi (Rice) Fan Committed by Facebook Github Bot

getdeps: add libcurl and make Eden use libcurl instead of system curl

Summary:
We are seeing random segment fault originating from OpenSSL on macOS when
Mononoke fetching is enabled.

The cause is that on macOS we are actually linking against libcurl shipped with
the system instead of ours. That copy of libcurl is linked with macOS's
libcrypto instead of the one we compiles during Eden's build, and it seems that
version of libcrypto does not provide concurrency safety.

The solution is to build curl on macOS and make sure it is linked to our
OpenSSL that has the concurrency callbacks registered.

Reviewed By: wez

Differential Revision: D17657822

fbshipit-source-id: 85abdf3be10b3903a5efc6b3a91624c7258de790
parent 03191fe7
......@@ -31,6 +31,12 @@ sqlite3
[dependencies.os=darwin]
osxfuse
# TODO: teach getdeps to compile curl on Windows.
# Enabling curl on Windows requires us to find a way to compile libcurl with
# msvc.
[dependencies.not(os=windows)]
libcurl
[shipit.pathmap]
fbcode/eden/oss = .
fbcode/eden = eden
......
......@@ -5,7 +5,14 @@ name = libcurl
url = https://curl.haxx.se/download/curl-7.65.1.tar.gz
sha256 = 821aeb78421375f70e55381c9ad2474bf279fc454b791b7e95fc83562951c690
[build.os=linux]
[dependencies]
nghttp2
# We use system OpenSSL on Linux (see folly's manifest for details)
[dependencies.not(os=linux)]
openssl
[build.not(os=windows)]
builder = autoconf
subdir = curl-7.65.1
......@@ -13,8 +20,13 @@ subdir = curl-7.65.1
# fboss (which added the libcurl dep) doesn't need ldap so it is disabled here.
# if someone in the future wants to add ldap for something else, it won't hurt
# fboss. However, that would require adding an ldap manifest.
#
# For the same reason, we disable libssh2 and libidn2 which aren't really used
# but would require adding manifests if we don't disable them.
--disable-ldap
--without-libssh2
--without-libidn2
[build.not(os=linux)]
[build.os=windows]
builder = cmake
subdir = curl-7.65.1
[manifest]
name = nghttp2
[download]
url = https://github.com/nghttp2/nghttp2/releases/download/v1.39.2/nghttp2-1.39.2.tar.gz
sha256 = fc820a305e2f410fade1a3260f09229f15c0494fc089b0100312cd64a33a38c0
[build]
builder = autoconf
subdir = nghttp2-1.39.2
[autoconf.args]
--enable-lib-only
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment