-
Notifications
You must be signed in to change notification settings - Fork 556
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
Use a common build script for both CURL and LibCURL #4472
Conversation
2333d10
to
66b9472
Compare
L/LibCURL/LibCURL/build_tarballs.jl
Outdated
include("../common.jl") | ||
|
||
build_libcurl(ARGS, "LibCURL") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't want to rebuild libcurl, nothing changed. This file should be removed from this PR and added in a follow-up PR with [skip ci]
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it cool if I leave the file in until the PR is ready to merge, just to make sure that CI passes (and that I don't have any bugs for the libcurl code path)? And then, once the PR is ready to merge, I'll remove the file from this PR, and then you can merge immediately afterwards?
14e32be
to
7455cc6
Compare
Edit: on a second thought, you'd need also static libraries of libmedtls and libssh2, which we don't have, so that's not going to fully disentangle curl from julia's libraries anyway. |
Co-authored-by: Eric Hanson <5846501+ericphanson@users.noreply.github.com> Co-authored-by: Mosè Giordano <giordano@users.noreply.github.com>
7455cc6
to
fe8851b
Compare
@giordano @staticfloat Apart from deleting the |
This still creates libcurl in |
I have no idea. @staticfloat? |
Or, put in another way: what do Linux distributions do? They also split libcurl and curl into different packages. |
Just delete |
if [[ "${THIS_IS_CURL}" == true ]]; then | ||
# Manually install only `curl` | ||
install -Dm 755 "src/.libs/curl${exeext}" "${bindir}/curl${exeext}" | ||
else | ||
# Install everything... | ||
make install | ||
# ...but remove `curl` | ||
rm "${bindir}/curl${exeext}" | ||
fi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I followed what I did in
Yggdrasil/H/HarfBuzz/common.jl
Lines 38 to 45 in 2fa71a4
if [[ "${ICU}" == true ]]; then | |
# Manually install only ICU-related files | |
cp src/libharfbuzz-icu*${dlext}* ${libdir}/. | |
cp meson-private/harfbuzz-icu.pc ${prefix}/lib/pkgconfig/. | |
cp ../src/hb-icu.h ${includedir}/harfbuzz/. | |
else | |
ninja install | |
fi |
end | ||
|
||
# Build the tarballs, and possibly a `build.jl` as well. | ||
build_tarballs(ARGS, name, version, sources, script, platforms, products, dependencies; julia_compat="1.8") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why 1.8 only?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh… I guess that’s why we’d want a fully static thing like you mentioned. Annoying.
Still, thanks for your help with this!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@giordano @staticfloat What if we:
- Don't make CURL_jll depend on LibCURL_jll
- When building CURL_jll, don't delete
libcurl
. So then CURL_jll will supply bothlibcurl
andcurl
.
Would that allow us to use the same version of CURL_jll
on multiple versions of Julia?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see, so we'd need static libraries for all of the dependencies.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So this just means that we need to remember to make a new release of CURL_jll every time there's a new minor release of Julia, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, just always build CURL_jll
together with (well, right after) a new LibCURL_jll.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, just always build
CURL_jll
together with (well, right after) a new LibCURL_jll.
It would be nice if we could automate that process.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
JuliaPackaging/BinaryBuilder.jl#778. This is what #4472 (comment) and
Yggdrasil/H/HarfBuzz/common.jl
Lines 17 to 19 in 2fa71a4
# Bash recipe for building across all platforms | |
# Side note: this is a great use-case for | |
# https://github.com/JuliaPackaging/BinaryBuilder.jl/issues/778 |
@giordano @staticfloat @ericphanson Thanks so much for your help with this! |
For the record, showing this is working: julia> using CURL_jll
julia> run(`$(curl()) --version`);
curl 7.81.0 (x86_64-pc-linux-gnu) libcurl/7.81.0 mbedTLS/2.28.0 zlib/1.2.11 libssh2/1.10.0 nghttp2/1.41.0
Release-Date: 2022-01-05
Protocols: dict file ftp ftps gopher gophers http https imap imaps mqtt pop3 pop3s rtsp scp sftp smb smbs smtp smtps telnet tftp
Features: alt-svc AsynchDNS HSTS HTTP2 IPv6 Largefile libz NTLM NTLM_WB SSL UnixSockets |
Yggdrasil pull request JuliaPackaging/Yggdrasil#4472 deleted the file `L/LibCURL/build_tarballs.jl`, which made the test checking that the file exists fail. Arguably, we should make the check more robust, but it'd be considerably more work for relatively little gain (vast majority of packages do follow the predictable naming scheme).
Yggdrasil pull request JuliaPackaging/Yggdrasil#4472 deleted the file `L/LibCURL/build_tarballs.jl`, which made the test checking that the file exists fail. Arguably, we should make the check more robust, but it'd be considerably more work for relatively little gain (vast majority of packages do follow the predictable naming scheme).
Yggdrasil pull request JuliaPackaging/Yggdrasil#4472 deleted the file `L/LibCURL/build_tarballs.jl`, which made the test checking that the file exists fail. Arguably, we should make the check more robust, but it'd be considerably more work for relatively little gain (vast majority of packages do follow the predictable naming scheme).
Fixes #2720
Closes #4153