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

LibCURL does not build behind a proxy #69

Closed
ChristianKurz opened this issue Jun 25, 2019 · 9 comments · Fixed by #70
Closed

LibCURL does not build behind a proxy #69

ChristianKurz opened this issue Jun 25, 2019 · 9 comments · Fixed by #70

Comments

@ChristianKurz
Copy link

ChristianKurz commented Jun 25, 2019

The build.jl script uses the download function in line 20.
I think the Base.download function is shadowed by a version from BinaryProvider, which does not use the proxy.

@omus
Copy link
Collaborator

omus commented Jun 25, 2019

I did a quick check on how other using BinaryBuilder handle the dependency problem currently and after looking over JuliaPackaging/BinaryBuilder.jl#194 it appears that we should just include the dependency build scripts instead of downloading them. Doing so should resolve your proxy issue.

@omus
Copy link
Collaborator

omus commented Jun 25, 2019

Could you try to install ImageMagick.jl? I imagine it has the same issue

@ChristianKurz
Copy link
Author

Correct, ImageMagick got the same problem.

@omus
Copy link
Collaborator

omus commented Jun 26, 2019

I think the Base.download function is shadowed by a version from BinaryProvider, which does not use the proxy.

It appears that the download function in BinaryProvider doesn't extend Base so it shouldn't be doing any shadowing. Just to confirm can you run this and post the output?

using BinaryProvider
url = "https://github.com/bicycle1885/ZlibBuilder/releases/download/v1.0.4/build_Zlib.v1.2.11.jl"
Base.download(url, "a.jl")
BinaryProvider.download(url, "b.jl"; verbose=true)

@omus omus mentioned this issue Jun 26, 2019
@ChristianKurz
Copy link
Author

I am using a patched version of BinaryProvider which uses the proxy for Powershell-Downloads. (see JuliaPackaging/BinaryProvider.jl#168)

That's the output for your code:

julia> Base.download(url, "a.jl")
┌ Error: Download failed: curl: (35) schannel: next InitializeSecurityContext failed: Unknown error (0x80092012) - The revocation function was unable to check revocation for the certificate.
└ @ Base download.jl:43
ERROR: failed process: Process(`'C:\WINDOWS\System32\curl.exe' -s -S -g -L -f -o a.jl https://github.com/bicycle1885/ZlibBuilder/releases/download/v1.0.4/build_Zlib.v1.2.11.jl`, ProcessExited(35)) [35]

Stacktrace:
 [1] pipeline_error at .\process.jl:813 [inlined]
 [2] download_curl(::String, ::String, ::String) at .\download.jl:44
 [3] download(::String, ::String) at .\download.jl:52
 [4] top-level scope at REPL[3]:1

julia> BinaryProvider.download(url, "b.jl"; verbose=true)
[ Info: Downloading https://github.com/bicycle1885/ZlibBuilder/releases/download/v1.0.4/build_Zlib.v1.2.11.jl to b.jl...

Interestingly, the BinaryProvider version works, but the Base.download version doesn't - so you were right about the shadowing. The certificate problem is due to the way our company inspect ssl encrypted connections and cannot be solved (short of using dangerous option -k for curl.).

If I make sure that powershell is used for the download, everything works:

julia> Base.find_curl() = nothing

julia> Base.download(url, "a.jl")
"a.jl"

@omus
Copy link
Collaborator

omus commented Jun 27, 2019

Thanks for the output. I think I'll update my PR to use BinaryProvider.download based upon these results.

@omus omus closed this as completed in #70 Jun 28, 2019
@omus
Copy link
Collaborator

omus commented Jul 2, 2019

Now included in LibCURL v0.5.2

@ChristianKurz
Copy link
Author

[b27032c2]  LibCURL v0.5.1  v0.5.2
  Building LibCURL ──── `~\.julia\packages\LibCURL\lWJxD\deps\build.log`

Works! Thank you!

@AmebaBrain
Copy link

For me still doesn't work

(v1.1) pkg> add LibCURL
 Resolving package versions...
  Updating `~/.julia/environments/v1.1/Project.toml`
  [b27032c2] + LibCURL v0.5.2
  Updating `~/.julia/environments/v1.1/Manifest.toml`
  [b27032c2] + LibCURL v0.5.2

(v1.1) pkg> build LibCURL
  Building LibCURL → `~/.julia/packages/LibCURL/lWJxD/deps/build.log`
┌ Error: Error building `LibCURL`: 
│ ERROR: LoadError: Could not download https://github.com/bicycle1885/ZlibBuilder/releases/download/v1.0.4/build_Zlib.v1.2.11.jl to /home/toleg/.julia/packages/LibCURL/lWJxD/deps/build_Zlib.v1.2.11.jl:
│ ErrorException("")
│ Stacktrace:
│  [1] error(::String) at ./error.jl:33
│  [2] #download#89(::Bool, ::Function, ::String, ::String) at /home/toleg/.julia/packages/BinaryProvider/TcAwt/src/PlatformEngines.jl:498
│  [3] download(::String, ::String) at /home/toleg/.julia/packages/BinaryProvider/TcAwt/src/PlatformEngines.jl:485
│  [4] top-level scope at /home/toleg/.julia/packages/LibCURL/lWJxD/deps/build.jl:19
│  [5] include at ./boot.jl:326 [inlined]
│  [6] include_relative(::Module, ::String) at ./loading.jl:1038
│  [7] include(::Module, ::String) at ./sysimg.jl:29
│  [8] include(::String) at ./client.jl:403
│  [9] top-level scope at none:0
│ in expression starting at /home/toleg/.julia/packages/LibCURL/lWJxD/deps/build.jl:14
│ curl: symbol lookup error: curl: undefined symbol: curl_url_cleanup
└ @ Pkg.Operations /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.1/Pkg/src/Operations.jl:1075

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 a pull request may close this issue.

3 participants