# Too much time taken to build GR

**URL:** https://discourse.julialang.org/t/too-much-time-taken-to-build-gr/22798
**Category:** General Usage
**Tags:** package
**Created:** [April 5, 2019, 1:15pm UTC](https://discourse.julialang.org/t/too-much-time-taken-to-build-gr/22798 "2019-04-05T13:15:16Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Ajaychat3](https://avatars.discourse-cdn.com/v4/letter/a/ecd19e/32.png) [@Ajaychat3](https://discourse.julialang.org/u/Ajaychat3)
#### Post date: [April 5, 2019, 1:15pm UTC](https://discourse.julialang.org/t/too-much-time-taken-to-build-gr/22798/1 "2019-04-05T13:15:16Z")

</div>

I am using julia 1.1.0 on win 10 and it takes long time to build GR. It was taking long time and so I disconnected from internet and it resulted in error. It seems to download couple of file during build process which I think should happen beforehand. am I doing something wrong here?

```julia
Building GR ───→ `C:\Users\Himanshi\.julia\packages\GR\Q8slp\deps\build.log`
┌ Error: Error building `GR`:
│ Exception calling "DownloadFile" with "2" argument(s): "An exception occurred during a WebClient request."
│ At line:1 char:96
│ + ... pe]::Tls12; (New-Object System.Net.Webclient).DownloadFile('https://g ...
│ + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
│ + CategoryInfo : NotSpecified: (:) [], MethodInvocationException
│ + FullyQualifiedErrorId : WebException
│
│ Exception calling "DownloadFile" with "2" argument(s): "The remote name could not be resolved: 'gr-framework.org'"
│ At line:1 char:96
│ + ... pe]::Tls12; (New-Object System.Net.Webclient).DownloadFile('https://g ...
│ + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
│ + CategoryInfo : NotSpecified: (:) [], MethodInvocationException
│ + FullyQualifiedErrorId : WebException
│
│ Exception calling "DownloadFile" with "2" argument(s): "The remote name could not be resolved: 'gr-framework.org'"
│ At line:1 char:96
│ + ... pe]::Tls12; (New-Object System.Net.Webclient).DownloadFile('http://gr ...
│ + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
│ + CategoryInfo : NotSpecified: (:) [], MethodInvocationException
│ + FullyQualifiedErrorId : WebException
│
│ [ Info: Downloading pre-compiled GR 0.39.0 Windows binary
│ [ Info: Using insecure connection
│ [ Info: Cannot download GR run-time
│ ERROR: LoadError: IOError: chmod: no such file or directory (ENOENT)
│ Stacktrace:
│ [1] uv_error at .\libuv.jl:85 [inlined]
│ [2] #chmod#16(::Bool, ::Function, ::String, ::UInt16) at .\file.jl:834
│ [3] chmod at .\file.jl:833 [inlined]
│ [4] #rm#9(::Bool, ::Bool, ::Function, ::String) at .\file.jl:250
│ [5] rm(::String) at .\file.jl:245
│ [6] top-level scope at C:\Users\Himanshi\.julia\packages\GR\Q8slp\deps\build.jl:113
│ [7] include at .\boot.jl:326 [inlined]
│ [8] include_relative(::Module, ::String) at .\loading.jl:1038
│ [9] include(::Module, ::String) at .\sysimg.jl:29
│ [10] include(::String) at .\client.jl:403
│ [11] top-level scope at none:0
│ in expression starting at C:\Users\Himanshi\.julia\packages\GR\Q8slp\deps\build.jl:63
└ @ Pkg.Operations C:\cygwin\home\Administrator\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.1\Pkg\src\Operations.jl:1075
  Building Plots → `C:\Users\Himanshi\.julia\packages\Plots\47Tik\deps\build.log`

```

---

<div class="post-metadata">

### Author: ![jpsamaroo](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jpsamaroo/32/46804_2.png) [@jpsamaroo](https://discourse.julialang.org/u/jpsamaroo)
#### Post date: [April 5, 2019, 7:27pm UTC](https://discourse.julialang.org/t/too-much-time-taken-to-build-gr/22798/2 "2019-04-05T19:27:30Z")

</div>

I don’t know if this is the same issue you’re experiencing, but with GR builds here in the US, I’ve found that I usually get horrid speeds when downloading the GR binaries (on the order of Kbps). This occurs for the two different ISPs I’ve had (ATT and Google Fiber), both on fiber high-bandwidth plans.

I’ve found that one of the ISPs/CDNs along the route (I seem to recall it was somewhere in Germany) has a horrible case of packet loss, causing the GR “build” to hang for up to 30 minutes.

You could try a fresh `] build GR` and watch your network monitor to see if you’re experiencing the same issues.

---

<div class="post-metadata">

### Author: ![Ajaychat3](https://avatars.discourse-cdn.com/v4/letter/a/ecd19e/32.png) [@Ajaychat3](https://discourse.julialang.org/u/Ajaychat3)
#### Post date: [April 7, 2019, 9:06am UTC](https://discourse.julialang.org/t/too-much-time-taken-to-build-gr/22798/3 "2019-04-07T09:06:58Z")

</div>

I tried to measure build time for GR using 8mbps broadband network here in India ant it took 88s.

```julia
julia> @time Pkg.build("GR")
  Building GR → `C:\Users\Himanshi\.julia\packages\GR\Q8slp\deps\build.log`
 87.689709 seconds (1.08 M allocations: 54.539 MiB, 0.01% gc time)

```

---

<div class="post-metadata">

### Author: ![cserteGT3](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/csertegt3/32/8283_2.png) [@cserteGT3](https://discourse.julialang.org/u/cserteGT3)
#### Post date: [April 7, 2019, 12:36pm UTC](https://discourse.julialang.org/t/too-much-time-taken-to-build-gr/22798/4 "2019-04-07T12:36:06Z")

</div>

Earlier I had some issues with building GR, more precisely with downloading the binaries .  
This [issue](https://github.com/jheinen/GR.jl/issues/161) may help (if you want to download and extract the tarball manually).

---

<div class="post-metadata">

### Author: ![Ajaychat3](https://avatars.discourse-cdn.com/v4/letter/a/ecd19e/32.png) [@Ajaychat3](https://discourse.julialang.org/u/Ajaychat3)
#### Post date: [April 11, 2019, 7:26am UTC](https://discourse.julialang.org/t/too-much-time-taken-to-build-gr/22798/5 "2019-04-11T07:26:29Z")

</div>

@cserteGT3  
Thanks, I downloaded the tar.gz file from the link given in your post and then tried to build GR after putting it in the “…/deps/download” folder. It still went on to download tar.gz file. I then modified the “…/dep/build.jl” and commented out code as per the following and then build GR. The build was quick.

```julia
version = get_version()
  tarball = "gr-$version-$os-$arch.tar.gz"
  # rm("downloads", force=true, recursive=true)
  @info("Downloading pre-compiled GR $version $os binary")
  # mkpath("downloads")
  # file = "downloads/$tarball"
  
  # try
  # # url = "github.com/sciapp/gr/releases/download/v$version/$tarball"
  # url ="gr-framework.org/downloads/$tarball"
  # download("http://$url", file)
  # catch
  # url = "gr-framework.org/downloads/$tarball"
  # try
  # download("http://$url", file)
  # catch
  # @info("Using insecure connection")
  # try
  # download("http://$url", file)
  # catch
  # @info("Cannot download GR run-time")
  # end
  # end
  # end
  if os == :Windows
    home = (VERSION < v"0.7-") ? JULIA_HOME : Sys.BINDIR
    success(`$home/7z x downloads/$tarball -y`)
    # rm("downloads/$tarball")
    tarball = tarball[1:end-3]
    success(`$home/7z x $tarball -y -ttar`)
    # rm(tarball)
  else
    run(`tar xzf downloads/$tarball`)
    rm("downloads/$tarball")
  end

julia> @time Pkg.build("GR")
  Building GR → `C:\Users\chatura\.julia\packages\GR\Q8slp\deps\build.log`
  3.576517 seconds (914.80 k allocations: 46.154 MiB, 0.23% gc time)

```

---

<div class="post-metadata">

### Author: ![Marius\_Kruger](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/marius_kruger/32/904_2.png) [@Marius\_Kruger](https://discourse.julialang.org/u/Marius_Kruger)
#### Post date: [January 23, 2020, 6:55pm UTC](https://discourse.julialang.org/t/too-much-time-taken-to-build-gr/22798/6 "2020-01-23T18:55:53Z")

</div>

It was going to take me about 24 hours[\*] 😢 So I think it would be nice the file was already downloaded, it should not re-download it every time I call build…

[\*] Some undersea internet cables were down [https://www.businessinsider.co.za/why-is-internet-slow-2020-1](https://www.businessinsider.co.za/why-is-internet-slow-2020-1)

$ tail ~/.julia/packages/GR/oiZD3/deps/build.log  
% Total % Received % Xferd Average Speed Time Time Time Current  
Dload Upload Total Spent Left Speed  
100 620 0 620 0 0 274 0 --:–:-- 0:00:02 --:–:-- 274  
1 13.5M 1 169k 0 0 174 0 22:45:06 0:16:33 22:28:33 201
