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

Fix for builds with system libcurl < 7.30 #1722

Merged
merged 1 commit into from Dec 12, 2017

Conversation

bhipple
Copy link
Contributor

@bhipple bhipple commented Dec 10, 2017

CentOS 7.4 and RHEL 7.4 ship with libcurl-devel-7.29.0-42.el7.x86_64; this flag
was added in 7.30.0
https://curl.haxx.se/libcurl/c/CURLMOPT_MAX_TOTAL_CONNECTIONS.html

Tangentially related to NixOS/nixpkgs#32320, which tracks some efforts to get the latest Nix working on CentOS 7.4. To fully get there we need to figure out what to do with c++14 and libsodium, but in the meantime this is a generic fix for any enterprise distribution maintaining an older libcurl for binary compatibility.

CentOS 7.4 and RHEL 7.4 ship with libcurl-devel-7.29.0-42.el7.x86_64; this flag
was added in 7.30.0
https://curl.haxx.se/libcurl/c/CURLMOPT_MAX_TOTAL_CONNECTIONS.html
@@ -369,11 +369,13 @@ struct CurlDownloader : public Downloader

curlm = curl_multi_init();

#if LIBCURL_VERSION_NUM >= 0x072b00 // correct?
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The answer to your question is that it was indeed correct, @edolstra :)
https://curl.haxx.se/libcurl/c/CURLMOPT_PIPELINING.html

I can remove/reformat/change the comments if you prefer.

@edolstra
Copy link
Member

Disabling multiplexing will kill HTTP/2 performance. But then, maybe those curl versions don't support HTTP/2 anyway?

@bhipple
Copy link
Contributor Author

bhipple commented Dec 12, 2017

Indeed, if you have an older libcurl the choices are either fail to compile or build without HTTP/2; the libcurl used on CentOS/RHEL came out in early 2013.

Probably the best thing to do is use an existing nix installation to bootstrap a statically linked nix for deployment. I believe @abbradar mentioned doing something to this effect for CentOS 7.4, but that said, it doesn't hurt to have the option of building Nix by itself on these platforms.

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

Successfully merging this pull request may close these issues.

None yet

2 participants