Julia: Julia does not recognize proxy settings

Created on 7 Jan 2019  ยท  25Comments  ยท  Source: JuliaLang/julia

I am working behind a corporate firewall. The proxy settings to bypass the firewall are correct, but Julia package manager does not recognize the proxy settings.

I have the proxy settings in ~/.bashrc, which read

export http_proxy=<proxyhost>:<port>
export https_proxy=<proxyhost>:<port>

where <proxyhost> and <port> are replaced with the proxy host address and port number. This allows me to git clone a Julia package in BASH:

$ git clone https://github.com/JuliaCI/BenchmarkTools.jl
Cloning into 'BenchmarkTools.jl'...
remote: Enumerating objects: 1230, done.
remote: Total 1230 (delta 0), reused 0 (delta 0), pack-reused 1230
Receiving objects: 100% (1230/1230), 310.90 KiB | 1.16 MiB/s, done.
Resolving deltas: 100% (815/815), done.

However, in REPL the Julia package manager can neither read the package registry nor clone the package:

julia> VERSION
v"1.2.0-DEV.93"

(v1.2) pkg> add BenchmarkTools
   Cloning default registries into `~/.julia`
   Cloning registry from "https://github.com/JuliaRegistries/General.git"
ERROR: failed to clone from https://github.com/JuliaRegistries/General.git, error: GitError(Code:ERROR, Class:OS, failed to connect to github.com: Operation timed out)

(v1.2) pkg> add https://github.com/JuliaCI/BenchmarkTools.jl.git
   Cloning git-repo `https://github.com/JuliaCI/BenchmarkTools.jl.git`
ERROR: failed to clone from https://github.com/JuliaCI/BenchmarkTools.jl.git, error: GitError(Code:ERROR, Class:OS, failed to connect to github.com: Operation timed out)

If I remove the proxy settings from ~/.bashrc, I get a similar error message from git clone in BASH as well:

$ git clone https://github.com/JuliaCI/BenchmarkTools.jl
Cloning into 'BenchmarkTools.jl'...
fatal: unable to access 'https://github.com/JuliaCI/BenchmarkTools.jl/': Failed to connect to github.com port 443: Operation timed out

which suggests that the above error message is generated because Julia does not recognize the proxy settings.

libgit2 packages

Most helpful comment

I can't emphasise how importatnt it is to be able to fix this for wider corporate adoption of Julia. In R, this is mostly solved as I can install from github without much issue.

All 25 comments

I can't emphasise how importatnt it is to be able to fix this for wider corporate adoption of Julia. In R, this is mostly solved as I can install from github without much issue.

At https://github.com/JuliaLang/julia/issues/20948#issuecomment-452083920 you said you tried the solutions mentioned at https://github.com/JuliaLang/julia/issues/20948#issuecomment-287306113, but what you mention in the description is different. Have you also tried HTTP_PROXY and HTTPS_PROXY in uppercase, and the .gitconfig approach?

@nalimilan, I have tried both the lowercase and uppercase variables, but neither works. I also tried the .gitconfig approach without success.

In any case, I think these different approaches are not relevant to the present issue, because the hard fact is that the direct invocation of git clone in the terminal honors the proxy settings, no matter whether they are defined in lowercase or uppercase, and no matter whether they are in ~/.bashrc or ~/.gitconfig, whereas the indirect invocation of git clone through pkg> add in the Julia REPL does not.

We don't use git, but libgit2. Thus need to figure out how to get libgit2 to work through proxies. The actual package download for released packages is a simple tarball download (and perhaps that uses a different method and different proxy variables? Just thinking aloud).

OK, I think something is messed up during my build procedure.

I downloaded the prebuilt binary for v1.0.3 from https://julialang.org/downloads/ and tested it. pkg> add works fine here. On the other hand, the issue exist in the binaries built from the release-1.0 and master branches of the GitHub repository.

Any ideas why my personal build's package manager fails to work properly?

Can you give details on your system and on how you built Julia?

My system is a brand-new Mac running macOS 10.14.2. Julia was never installed before on this machine.

I had a trouble building 0.7 on this machine because of the problem described in https://github.com/JuliaLang/julia/pull/30153#issuecomment-443057005, but I didn't have any problem building versions โ‰ฅ 1.0.

Any thoughts on the possible cause of my defective custom build? For example, is it possible that I was using a different libgit2 than the one used in the prebuilt package available at https://julialang.org?

Maybe @staticfloat has some information about the correct build procedure?

In general, just typing make is the correct build procedure. Maybe check if you export DYLD_LIBRARY_PATH?

echo $DYLD_LIBRARY_PATH and echo $LD_LIBRARY_PATH return nothing, and I believe this is the correct setting according to README.md. Please let me know if they need to be set different.

I just tried to build from the most recent repository. The issue persists. Because https://github.com/JuliaLang/julia/issues/30635#issuecomment-452439894 implied that there could be something wrong about libgit2, I dumped the stderr messages to a file and if there is anything suspicious. No error was generated, but I had lots of warning messages such as warning: 'futimens' is only available on macOS 10.13 or newer [-Wunguarded-availability-new]. My macOS is version 10.14.2, so I think this warning is irrelevant, but let me know if it is.

Is there anything that I need to pay attention to in stderr to identify the source of this issue?

I have just built Julia locally on my mac (running version 10.14.2) and it respects the environment variables, as proven by exporting https_proxy=localhost:1234, then trying to run pkg> update and seeing a connection failure to localhost:1234. So there is some kind of difference between your Julia and mine that I just built, that I do not understand. Let's dig in!

First off, my build uses the following make variables:

make VERBOSE=1 USECCACHE=1 MARCH=x86-64 PYTHON=$(which python2) USE_BINARYBUILDER_LLVM=1 USE_BINARYBUILDER_OPENBLAS=1

I doubt any of those would effect your build, but you never know. Also, I "install" my Julia versions, e.g. I run make binary-dist, then I extract that tarball someplace else that is on my $PATH. You may want to try that.

Maybe disable any firewall and antivirus etc?

@staticfloat, I tried your build options and was able to build successfully. I started the build after doing git reset --hard; git clean -x -f -d as instructed in README.md to make sure it starts a clean build. Still, I got the same Operation timed out error message when attempting to add a package:

(v1.2) pkg> add BenchmarkTools
   Cloning default registries into `~/.julia`
   Cloning registry from "https://github.com/JuliaRegistries/General.git"
ERROR: failed to clone from https://github.com/JuliaRegistries/General.git, error: GitError(Code:ERROR, Class:OS, failed to connect to github.com: Operation timed out)

I also tried make binary-dist as you recommended. Unfortunately, the procedure included a step where it tried to clone the registry from https://github.com/JuliaRegistries/General.git, the same step where adding a package failed as described above. This made make binary-dist fail.

@ViralBShah, why do you think firewall or antivirus programs matter? As I mentioned earlier, the proxy setting is working fine outside the Julia REPL (e.g., when cloning a GitHub repository in bash), so I think this is a problem within Julia.

Just trying to think what could be different with your build environment. Yes, it shouldn't matter, but then, libgit2 should work in your build if it works otherwise.

Note that git doesn't use libgit2, so the fact that git works at the commandline doesn't mean that libgit2 should work. There may be a general problem which affects libgit2 on your system, which isn't necessarily related to the Julia build in particular. Maybe you could try installing other applications using libgit2 to check that.

@nalimilan, libgit2 must be working fine, because as I reported in
https://github.com/JuliaLang/julia/issues/30635#issuecomment-452856757, I don't have any problem adding packages from the prebuilt binary downloaded from https://julialang.org. I get the Operation timed out error only from the Julia binary built on my machine.

Sorry, I checked quickly but I missed that comment (and more importantly I had forgotten about it).

@wsshin can you show the output of using Libdl; println.(Libdl.dllist());? Let's make sure that there isn't something funny going on like a rogue libgit2.dylib getting loaded into your process or something like that.

@staticfloat, here is the output. Hope this helps!

julia> VERSION
v"1.2.0-DEV.234"

julia> using Libdl; println.(Libdl.dllist())
/Users/<my user id>/pkg/julia/julia-master2/usr/lib/libjulia.1.2.dylib
/usr/lib/libSystem.B.dylib
/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
/System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices
/usr/lib/libc++.1.dylib
/Users/<my user id>/pkg/julia/julia-master2/usr/lib/libLLVM.dylib
/usr/lib/system/libcache.dylib
/usr/lib/system/libcommonCrypto.dylib
/usr/lib/system/libcompiler_rt.dylib
/usr/lib/system/libcopyfile.dylib
/usr/lib/system/libcorecrypto.dylib
/usr/lib/system/libdispatch.dylib
/usr/lib/system/libdyld.dylib
/usr/lib/system/libkeymgr.dylib
/usr/lib/system/liblaunch.dylib
/usr/lib/system/libmacho.dylib
/usr/lib/system/libquarantine.dylib
/usr/lib/system/libremovefile.dylib
/usr/lib/system/libsystem_asl.dylib
/usr/lib/system/libsystem_blocks.dylib
/usr/lib/system/libsystem_c.dylib
/usr/lib/system/libsystem_configuration.dylib
/usr/lib/system/libsystem_coreservices.dylib
/usr/lib/system/libsystem_darwin.dylib
/usr/lib/system/libsystem_dnssd.dylib
/usr/lib/system/libsystem_info.dylib
/usr/lib/system/libsystem_m.dylib
/usr/lib/system/libsystem_malloc.dylib
/usr/lib/system/libsystem_networkextension.dylib
/usr/lib/system/libsystem_notify.dylib
/usr/lib/system/libsystem_sandbox.dylib
/usr/lib/system/libsystem_secinit.dylib
/usr/lib/system/libsystem_kernel.dylib
/usr/lib/system/libsystem_platform.dylib
/usr/lib/system/libsystem_pthread.dylib
/usr/lib/system/libsystem_symptoms.dylib
/usr/lib/system/libsystem_trace.dylib
/usr/lib/system/libunwind.dylib
/usr/lib/system/libxpc.dylib
/usr/lib/libobjc.A.dylib
/usr/lib/libc++abi.dylib
/usr/lib/libDiagnosticMessagesClient.dylib
/usr/lib/libicucore.A.dylib
/usr/lib/libz.1.dylib
/System/Library/Frameworks/CFNetwork.framework/Versions/A/CFNetwork
/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/FSEvents.framework/Versions/A/FSEvents
/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CarbonCore.framework/Versions/A/CarbonCore
/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Metadata.framework/Versions/A/Metadata
/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/OSServices.framework/Versions/A/OSServices
/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/SearchKit.framework/Versions/A/SearchKit
/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/AE.framework/Versions/A/AE
/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/LaunchServices
/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/DictionaryServices.framework/Versions/A/DictionaryServices
/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/SharedFileList.framework/Versions/A/SharedFileList
/usr/lib/libauto.dylib
/usr/lib/libbsm.0.dylib
/System/Library/Frameworks/IOKit.framework/Versions/A/IOKit
/System/Library/Frameworks/SystemConfiguration.framework/Versions/A/SystemConfiguration
/System/Library/Frameworks/Security.framework/Versions/A/Security
/usr/lib/libsqlite3.dylib
/usr/lib/libxml2.2.dylib
/usr/lib/libnetwork.dylib
/usr/lib/libapple_nghttp2.dylib
/usr/lib/libenergytrace.dylib
/usr/lib/system/libkxld.dylib
/usr/lib/libpcap.A.dylib
/usr/lib/libcoretls.dylib
/usr/lib/libcoretls_cfhelpers.dylib
/System/Library/Frameworks/Foundation.framework/Versions/C/Foundation
/System/Library/PrivateFrameworks/AppleFSCompression.framework/Versions/A/AppleFSCompression
/usr/lib/libOpenScriptingUtil.dylib
/usr/lib/libpam.2.dylib
/usr/lib/libxar.1.dylib
/System/Library/Frameworks/DiskArbitration.framework/Versions/A/DiskArbitration
/usr/lib/libarchive.2.dylib
/usr/lib/liblangid.dylib
/usr/lib/libCRFSuite.dylib
/usr/lib/libbz2.1.0.dylib
/usr/lib/liblzma.5.dylib
/System/Library/Frameworks/NetFS.framework/Versions/A/NetFS
/System/Library/PrivateFrameworks/NetAuth.framework/Versions/A/NetAuth
/System/Library/PrivateFrameworks/login.framework/Versions/A/Frameworks/loginsupport.framework/Versions/A/loginsupport
/System/Library/PrivateFrameworks/TCC.framework/Versions/A/TCC
/System/Library/PrivateFrameworks/CoreNLP.framework/Versions/A/CoreNLP
/System/Library/PrivateFrameworks/MetadataUtilities.framework/Versions/A/MetadataUtilities
/usr/lib/libmecabra.dylib
/System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices
/System/Library/Frameworks/CoreGraphics.framework/Versions/A/CoreGraphics
/System/Library/Frameworks/CoreText.framework/Versions/A/CoreText
/System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO
/System/Library/Frameworks/ColorSync.framework/Versions/A/ColorSync
/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ATS.framework/Versions/A/ATS
/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ColorSyncLegacy.framework/Versions/A/ColorSyncLegacy
/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/HIServices.framework/Versions/A/HIServices
/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/LangAnalysis.framework/Versions/A/LangAnalysis
/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/PrintCore.framework/Versions/A/PrintCore
/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/QD.framework/Versions/A/QD
/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/SpeechSynthesis.framework/Versions/A/SpeechSynthesis
/System/Library/PrivateFrameworks/SkyLight.framework/Versions/A/SkyLight
/System/Library/Frameworks/IOSurface.framework/Versions/A/IOSurface
/System/Library/Frameworks/Accelerate.framework/Versions/A/Accelerate
/usr/lib/libcompression.dylib
/System/Library/Frameworks/CoreDisplay.framework/Versions/A/CoreDisplay
/System/Library/Frameworks/Metal.framework/Versions/A/Metal
/System/Library/Frameworks/MetalPerformanceShaders.framework/Versions/A/MetalPerformanceShaders
/System/Library/PrivateFrameworks/MultitouchSupport.framework/Versions/A/MultitouchSupport
/System/Library/Frameworks/QuartzCore.framework/Versions/A/QuartzCore
/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vImage.framework/Versions/A/vImage
/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/vecLib
/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libvMisc.dylib
/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libvDSP.dylib
/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libLAPACK.dylib
/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libLinearAlgebra.dylib
/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libSparseBLAS.dylib
/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libQuadrature.dylib
/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBNNS.dylib
/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libSparse.dylib
/System/Library/PrivateFrameworks/GPUWrangler.framework/Versions/A/GPUWrangler
/System/Library/PrivateFrameworks/IOAccelerator.framework/Versions/A/IOAccelerator
/System/Library/PrivateFrameworks/IOPresentment.framework/Versions/A/IOPresentment
/System/Library/PrivateFrameworks/DSExternalDisplay.framework/Versions/A/DSExternalDisplay
/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libCoreFSCache.dylib
/System/Library/Frameworks/MetalPerformanceShaders.framework/Frameworks/MPSCore.framework/Versions/A/MPSCore
/System/Library/Frameworks/MetalPerformanceShaders.framework/Frameworks/MPSImage.framework/Versions/A/MPSImage
/System/Library/Frameworks/MetalPerformanceShaders.framework/Frameworks/MPSNeuralNetwork.framework/Versions/A/MPSNeuralNetwork
/System/Library/Frameworks/MetalPerformanceShaders.framework/Frameworks/MPSMatrix.framework/Versions/A/MPSMatrix
/System/Library/Frameworks/MetalPerformanceShaders.framework/Frameworks/MPSRayIntersector.framework/Versions/A/MPSRayIntersector
/System/Library/PrivateFrameworks/MetalTools.framework/Versions/A/MetalTools
/System/Library/PrivateFrameworks/AggregateDictionary.framework/Versions/A/AggregateDictionary
/usr/lib/libMobileGestalt.dylib
/System/Library/Frameworks/CoreImage.framework/Versions/A/CoreImage
/System/Library/Frameworks/CoreVideo.framework/Versions/A/CoreVideo
/System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL
/System/Library/PrivateFrameworks/GraphVisualizer.framework/Versions/A/GraphVisualizer
/System/Library/PrivateFrameworks/FaceCore.framework/Versions/A/FaceCore
/System/Library/Frameworks/OpenCL.framework/Versions/A/OpenCL
/usr/lib/libFosl_dynamic.dylib
/System/Library/PrivateFrameworks/OTSVG.framework/Versions/A/OTSVG
/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ATS.framework/Versions/A/Resources/libFontParser.dylib
/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ATS.framework/Versions/A/Resources/libFontRegistry.dylib
/System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libJPEG.dylib
/System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libTIFF.dylib
/System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libPng.dylib
/System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libGIF.dylib
/System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libJP2.dylib
/System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libRadiance.dylib
/System/Library/PrivateFrameworks/AppleJPEG.framework/Versions/A/AppleJPEG
/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGFXShared.dylib
/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLU.dylib
/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib
/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLImage.dylib
/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libCVMSPluginSupport.dylib
/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libCoreVMClient.dylib
/usr/lib/libcups.2.dylib
/System/Library/Frameworks/Kerberos.framework/Versions/A/Kerberos
/System/Library/Frameworks/GSS.framework/Versions/A/GSS
/usr/lib/libresolv.9.dylib
/usr/lib/libiconv.2.dylib
/System/Library/PrivateFrameworks/Heimdal.framework/Versions/A/Heimdal
/usr/lib/libheimdal-asn1.dylib
/System/Library/Frameworks/OpenDirectory.framework/Versions/A/OpenDirectory
/System/Library/PrivateFrameworks/CommonAuth.framework/Versions/A/CommonAuth
/System/Library/Frameworks/OpenDirectory.framework/Versions/A/Frameworks/CFOpenDirectory.framework/Versions/A/CFOpenDirectory
/System/Library/Frameworks/SecurityFoundation.framework/Versions/A/SecurityFoundation
/System/Library/PrivateFrameworks/APFS.framework/Versions/A/APFS
/usr/lib/libutil.dylib
/usr/lib/libcharset.1.dylib
/System/Library/Frameworks/CoreAudio.framework/Versions/A/CoreAudio
/System/Library/Frameworks/AudioToolbox.framework/Versions/A/AudioToolbox
/System/Library/PrivateFrameworks/AppleSauce.framework/Versions/A/AppleSauce
/System/Library/PrivateFrameworks/AssertionServices.framework/Versions/A/AssertionServices
/System/Library/PrivateFrameworks/BaseBoard.framework/Versions/A/BaseBoard
/usr/lib/libmecab.1.0.0.dylib
/usr/lib/libgermantok.dylib
/usr/lib/libThaiTokenizer.dylib
/usr/lib/libChineseTokenizer.dylib
/System/Library/PrivateFrameworks/LanguageModeling.framework/Versions/A/LanguageModeling
/System/Library/PrivateFrameworks/CoreEmoji.framework/Versions/A/CoreEmoji
/System/Library/PrivateFrameworks/Lexicon.framework/Versions/A/Lexicon
/System/Library/PrivateFrameworks/LinguisticData.framework/Versions/A/LinguisticData
/usr/lib/libcmph.dylib
/System/Library/Frameworks/CoreData.framework/Versions/A/CoreData
/System/Library/Frameworks/ServiceManagement.framework/Versions/A/ServiceManagement
/System/Library/PrivateFrameworks/BackgroundTaskManagement.framework/Versions/A/BackgroundTaskManagement
/usr/lib/libxslt.1.dylib
/Users/<my user id>/pkg/julia/julia-master2/usr/lib/julia/sys.dylib
/Users/<my user id>/pkg/julia/julia-master2/usr/lib/libpcre2-8.0.dylib
/Users/<my user id>/pkg/julia/julia-master2/usr/lib/libgmp.10.dylib
/Users/<my user id>/pkg/julia/julia-master2/usr/lib/libmpfr.6.dylib
/Users/<my user id>/pkg/julia/julia-master2/usr/lib/libdSFMT.dylib
/Users/<my user id>/pkg/julia/julia-master2/usr/lib/libopenblas64_.dylib
/Users/<my user id>/pkg/julia/julia-master2/usr/lib/libgfortran.5.dylib
/Users/<my user id>/pkg/julia/julia-master2/usr/lib/libquadmath.0.dylib
/Users/<my user id>/pkg/julia/julia-master2/usr/lib/libgcc_s.1.dylib
/Users/<my user id>/pkg/julia/julia-master2/usr/lib/libcholmod.dylib
/Users/<my user id>/pkg/julia/julia-master2/usr/lib/libcolamd.dylib
/Users/<my user id>/pkg/julia/julia-master2/usr/lib/libamd.dylib
/Users/<my user id>/pkg/julia/julia-master2/usr/lib/libcamd.dylib
/Users/<my user id>/pkg/julia/julia-master2/usr/lib/libccolamd.dylib
/Users/<my user id>/pkg/julia/julia-master2/usr/lib/libsuitesparseconfig.dylib
/Users/<my user id>/pkg/julia/julia-master2/usr/lib/libsuitesparse_wrapper.dylib
/Users/<my user id>/pkg/julia/julia-master2/usr/lib/libumfpack.dylib
/Users/<my user id>/pkg/julia/julia-master2/usr/lib/libspqr.dylib
204-element Array{Nothing,1}:
 nothing
 nothing
 nothing
 nothing
 nothing
 nothing
 nothing
 nothing
 nothing
 nothing
 nothing
 nothing
 nothing
 nothing
 nothing
 nothing
 nothing
 nothing
 nothing
 nothing
 nothing
 nothing
 nothing
 nothing
 nothing
 nothing
 nothing
 nothing
 nothing
 nothing
 nothing
 โ‹ฎ
 nothing
 nothing
 nothing
 nothing
 nothing
 nothing
 nothing
 nothing
 nothing
 nothing
 nothing
 nothing
 nothing
 nothing
 nothing
 nothing
 nothing
 nothing
 nothing
 nothing
 nothing
 nothing
 nothing
 nothing
 nothing
 nothing
 nothing
 nothing
 nothing
 nothing
 nothing

similar to #25245

I tested the up-to-date repository, and the problem has gone in v1.2.0-DEV.422!

Again, to make sure I run a fresh test, I did git reset --hard; git clean -x -f -d as instructed in README.md. Also, I deleted ~/.julia directory before each test, and here is the result. For the up-to-date repository,

julia> VERSION
v"1.2.0-DEV.422"

(v1.2) pkg> add BenchmarkTools
   Cloning default registries into `~/.julia`
   Cloning registry from "https://github.com/JuliaRegistries/General.git"
     Added registry `General` to `~/.julia/registries/General`
 Resolving package versions...
 Installed BenchmarkTools โ”€ v0.4.2
 Installed JSON โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ v0.20.0
  Updating `~/.julia/environments/v1.2/Project.toml`
  [6e4b80f9] + BenchmarkTools v0.4.2
  Updating `~/.julia/environments/v1.2/Manifest.toml`
  [6e4b80f9] + BenchmarkTools v0.4.2
  [682c06a0] + JSON v0.20.0
  [2a0f44e3] + Base64
  [ade2ca70] + Dates
  [8ba89e20] + Distributed
  [b77e0a4c] + InteractiveUtils
  [8f399da3] + Libdl
  [37e2e46d] + LinearAlgebra
  [56ddb016] + Logging
  [d6f4376e] + Markdown
  [a63ad114] + Mmap
  [de0858da] + Printf
  [9a3f8284] + Random
  [9e88b42a] + Serialization
  [6462fe0b] + Sockets
  [2f01184e] + SparseArrays
  [10745b16] + Statistics
  [8dfed614] + Test
  [4ec0a83e] + Unicode

On the other hand, for the previous version I built,

julia> VERSION
v"1.2.0-DEV.234"

(v1.2) pkg> add BenchmarkTools
   Cloning default registries into `~/.julia`
   Cloning registry from "https://github.com/JuliaRegistries/General.git"
ERROR: failed to clone from https://github.com/JuliaRegistries/General.git, error: GitError(Code:ERROR, Class:OS, failed to connect to github.com: Operation timed out)

It seems that something has changed between the two versions. Any idea? I'm glad that the problem has been resolved, but still curious what change has fixed it.

I think I should take back what I wrote above. I have conducted a further investigation, and it doesn't seem that Julia code change is not what solved the problem. The v1.2.0-DEV.234 that did not work above was built a while ago, so I was curious what would happen for a clean build. So, I did make cleanall; git reset --hard; git clean -x -f -d and performed make. Then, I removed ~/.julia to delete any previously cloned registries. Here is the result for adding a package:

julia> VERSION
v"1.2.0-DEV.234"

(v1.2) pkg> add BenchmarkTools
   Cloning default registries into `~/.julia`
   Cloning registry from "https://github.com/JuliaRegistries/General.git"
     Added registry `General` to `~/.julia/registries/General`
 Resolving package versions...
 Installed BenchmarkTools โ”€ v0.4.2
 Installed JSON โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ v0.20.0
  Updating `~/.julia/environments/v1.2/Project.toml`
  [6e4b80f9] + BenchmarkTools v0.4.2
  Updating `~/.julia/environments/v1.2/Manifest.toml`
  [6e4b80f9] + BenchmarkTools v0.4.2
  [682c06a0] + JSON v0.20.0
  [2a0f44e3] + Base64
  [ade2ca70] + Dates
  [8ba89e20] + Distributed
  [b77e0a4c] + InteractiveUtils
  [8f399da3] + Libdl
  [37e2e46d] + LinearAlgebra
  [56ddb016] + Logging
  [d6f4376e] + Markdown
  [a63ad114] + Mmap
  [de0858da] + Printf
  [9a3f8284] + Random
  [9e88b42a] + Serialization
  [6462fe0b] + Sockets
  [2f01184e] + SparseArrays
  [10745b16] + Statistics
  [8dfed614] + Test
  [4ec0a83e] + Unicode

So, the clean build of the previous version works fine as well. This means something outside the Julia repository mush have been changed. It could be a macOS update or some external library that Julia downloads during the build procedure.

Does Julia download libgit2 during the build procedure? Then, is it possible that some recent change in libgit2 has fixed this issue? Maybe something like https://github.com/libgit2/libgit2/pull/4934?

The libgit2 version used by Julia is fixed for a given commit, so the fix must have come from somewhere else.

Seems like we can close this one.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

felixrehren picture felixrehren  ยท  3Comments

tkoolen picture tkoolen  ยท  3Comments

StefanKarpinski picture StefanKarpinski  ยท  3Comments

manor picture manor  ยท  3Comments

musm picture musm  ยท  3Comments