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

Use curl temporarily until Downloads fixes make their way into 1.6 #54

Merged
merged 2 commits into from
Oct 20, 2020

Conversation

staticfloat
Copy link
Member

No description provided.

@simeonschaub
Copy link

Using this build_tarballs.jl, I still get the following error on latest master:

~/.../D/diffutils >>> julia-latest --project build_tarballs.jl x86_64-linux-gnu --debug --deploy=local        ✓ 565
[ Info: Building for x86_64-linux-gnu
ERROR: LoadError: download failed: ProcessFailedException(Base.Process[Process(`curl -C - -s '-#' -f -L https://ftp.gnu.org/gnu/diffutils/diffutils-3.7.tar.xz -o /home/simeon/.julia/dev/BinaryBuilderBase/deps/downloads/b3a7a6221c3dc916085f0d205abf6b8e1ba443d4dd965118da364a1dc1cb3a26-diffutils-3.7.tar.xz`, ProcessExited(23))])
Stacktrace:
  [1] error(s::String)
    @ Base ./error.jl:33
  [2] download_verify(url::String, hash::String, path::String)
    @ BinaryBuilderBase ~/.julia/dev/BinaryBuilderBase/src/ArchiveUtils.jl:135
  [3] download_source(source::ArchiveSource; verbose::Bool, downloads_dir::String)
    @ BinaryBuilderBase ~/.julia/dev/BinaryBuilderBase/src/Sources.jl:140
  [4] #31
    @ ./broadcast.jl:1245 [inlined]
  [5] _broadcast_getindex_evalf
    @ ./broadcast.jl:648 [inlined]
  [6] _broadcast_getindex
    @ ./broadcast.jl:621 [inlined]
  [7] getindex
    @ ./broadcast.jl:575 [inlined]
  [8] macro expansion
    @ ./broadcast.jl:932 [inlined]
  [9] macro expansion
    @ ./simdloop.jl:77 [inlined]
 [10] copyto!
    @ ./broadcast.jl:931 [inlined]
 [11] copyto!
    @ ./broadcast.jl:886 [inlined]
 [12] copy
    @ ./broadcast.jl:862 [inlined]
 [13] materialize(bc::Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1}, Nothing, Base.Broadcast.var"#31#32"{Base.Iterators.Pairs{Symbol, Bool, Tuple{Symbol}, NamedTuple{(:verbose,), Tuple{Bool}}}, typeof(BinaryBuilderBase.download_source)}, Tuple{Vector{ArchiveSource}}})
    @ Base.Broadcast ./broadcast.jl:837
 [14] autobuild(dir::AbstractString, src_name::AbstractString, src_version::VersionNumber, sources::Vector{var"#s1129"} where var"#s1129"<:BinaryBuilderBase.AbstractSource, script::AbstractString, platforms::Vector{T} where T, products::Vector{var"#s1128"} where var"#s1128"<:Product, dependencies::Vector{var"#s824"} where var"#s824"<:BinaryBuilderBase.AbstractDependency; verbose::Bool, debug::Bool, skip_audit::Bool, ignore_audit_errors::Bool, autofix::Bool, code_dir::Union{Nothing, String}, require_license::Bool, kwargs::Any)
    @ BinaryBuilder ~/.julia/dev/BinaryBuilder/src/AutoBuild.jl:632
 [15] build_tarballs(ARGS::Any, src_name::Any, src_version::Any, sources::Any, script::Any, platforms::Any, products::Any, dependencies::Any; kwargs::Any)
    @ BinaryBuilder ~/.julia/dev/BinaryBuilder/src/AutoBuild.jl:264
 [16] build_tarballs(ARGS::Any, src_name::Any, src_version::Any, sources::Any, script::Any, platforms::Any, products::Any, dependencies::Any)
    @ BinaryBuilder ~/.julia/dev/BinaryBuilder/src/AutoBuild.jl:119
 [17] top-level scope
    @ ~/Documents/Julia/Yggdrasil/D/diffutils/build_tarballs.jl:57
in expression starting at /home/simeon/Documents/Julia/Yggdrasil/D/diffutils/build_tarballs.jl:57
caused by: failed process: Process(`curl -C - -s '-#' -f -L https://ftp.gnu.org/gnu/diffutils/diffutils-3.7.tar.xz -o /home/simeon/.julia/dev/BinaryBuilderBase/deps/downloads/b3a7a6221c3dc916085f0d205abf6b8e1ba443d4dd965118da364a1dc1cb3a26-diffutils-3.7.tar.xz`, ProcessExited(23)) [23]
Stacktrace:
  [1] pipeline_error
    @ ./process.jl:525 [inlined]
  [2] run(::Cmd; wait::Bool)
    @ Base ./process.jl:440
  [3] run
    @ ./process.jl:438 [inlined]
  [4] download_verify(url::String, hash::String, path::String)
    @ BinaryBuilderBase ~/.julia/dev/BinaryBuilderBase/src/ArchiveUtils.jl:132
  [5] download_source(source::ArchiveSource; verbose::Bool, downloads_dir::String)
    @ BinaryBuilderBase ~/.julia/dev/BinaryBuilderBase/src/Sources.jl:140
  [6] #31
    @ ./broadcast.jl:1245 [inlined]
  [7] _broadcast_getindex_evalf
    @ ./broadcast.jl:648 [inlined]
  [8] _broadcast_getindex
    @ ./broadcast.jl:621 [inlined]
  [9] getindex
    @ ./broadcast.jl:575 [inlined]
 [10] macro expansion
    @ ./broadcast.jl:932 [inlined]
 [11] macro expansion
    @ ./simdloop.jl:77 [inlined]
 [12] copyto!
    @ ./broadcast.jl:931 [inlined]
 [13] copyto!
    @ ./broadcast.jl:886 [inlined]
 [14] copy
    @ ./broadcast.jl:862 [inlined]
 [15] materialize(bc::Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1}, Nothing, Base.Broadcast.var"#31#32"{Base.Iterators.Pairs{Symbol, Bool, Tuple{Symbol}, NamedTuple{(:verbose,), Tuple{Bool}}}, typeof(BinaryBuilderBase.download_source)}, Tuple{Vector{ArchiveSource}}})
    @ Base.Broadcast ./broadcast.jl:837
 [16] autobuild(dir::AbstractString, src_name::AbstractString, src_version::VersionNumber, sources::Vector{var"#s1129"} where var"#s1129"<:BinaryBuilderBase.AbstractSource, script::AbstractString, platforms::Vector{T} where T, products::Vector{var"#s1128"} where var"#s1128"<:Product, dependencies::Vector{var"#s824"} where var"#s824"<:BinaryBuilderBase.AbstractDependency; verbose::Bool, debug::Bool, skip_audit::Bool, ignore_audit_errors::Bool, autofix::Bool, code_dir::Union{Nothing, String}, require_license::Bool, kwargs::Any)
    @ BinaryBuilder ~/.julia/dev/BinaryBuilder/src/AutoBuild.jl:632
 [17] build_tarballs(ARGS::Any, src_name::Any, src_version::Any, sources::Any, script::Any, platforms::Any, products::Any, dependencies::Any; kwargs::Any)
    @ BinaryBuilder ~/.julia/dev/BinaryBuilder/src/AutoBuild.jl:264
 [18] build_tarballs(ARGS::Any, src_name::Any, src_version::Any, sources::Any, script::Any, platforms::Any, products::Any, dependencies::Any)
    @ BinaryBuilder ~/.julia/dev/BinaryBuilder/src/AutoBuild.jl:119
 [19] top-level scope
    @ ~/Documents/Julia/Yggdrasil/D/diffutils/build_tarballs.jl:57

I have dev'ed BinaryBuilder#master, this PR and FluxML/MacroTools.jl#149.

Comment on lines 130 to 137
# Temporarily shell out to `curl` to download, until `Downloads` bugs are squashed
try
run(`curl -C - -s -\# -f -L $(url) -o $(path)`)
catch e
# Downloads throws an ErrorException, so we'll do the same
error("download failed: $(e)")
end
#Downloads.download(url, path)
Copy link

@simeonschaub simeonschaub Oct 17, 2020

Choose a reason for hiding this comment

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

This fixes the issue for me:

Suggested change
# Temporarily shell out to `curl` to download, until `Downloads` bugs are squashed
try
run(`curl -C - -s -\# -f -L $(url) -o $(path)`)
catch e
# Downloads throws an ErrorException, so we'll do the same
error("download failed: $(e)")
end
#Downloads.download(url, path)
mkpath(dirname(path))
Downloads.download(url, path)

@giordano giordano closed this Oct 19, 2020
@giordano giordano reopened this Oct 19, 2020
@giordano
Copy link
Member

Ok, the tests are much entangled with LibCURL, which now broke....

@giordano
Copy link
Member

Looking better to the log, I believe the issue is that we're always installing LibCURL_jll in the environment, which is bad

@staticfloat staticfloat merged commit 2f9e354 into master Oct 20, 2020
@staticfloat staticfloat deleted the sf/hello_curl_my_old_friend branch October 20, 2020 17:03
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

3 participants