Error building packages on Windows 7 x64. (Old title GR.jl)

Hello.

I could install and use GR (through Plots) on my Windows 10 X64 computer with Julia 1.0.2.
But I’m not able to install it on the computer at work using Windows 7 x64.

I get this error:

julia> Pkg.build(“GR”)
Building GR → C:\Users\med\.julia\packages\GR\k8wwU\deps\build.log
┌ Error: Error building GR:
│ �[ Info: Downloading pre-compiled GR 0.35.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:829
│ [3] chmod at .\file.jl:828 [inlined]
│ [4] #rm#9(::Bool, ::Bool, ::Function, ::String) at .\file.jl:250
│ [5] rm(::String) at .\file.jl:245
│ [6] top-level scope at logging.jl:319
│ [7] top-level scope at C:\Users\med.julia\packages\GR\k8wwU\deps\build.jl:91
│ [8] include at .\boot.jl:317 [inlined]
│ [9] include_relative(::Module, ::String) at .\loading.jl:1044
│ [10] include(::Module, ::String) at .\sysimg.jl:29
│ [11] include(::String) at .\client.jl:392
│ [12] top-level scope at none:0
│ in expression starting at C:\Users\med.julia\packages\GR\k8wwU\deps\build.jl:63
└ @ Pkg.Operations C:\cygwin\home\Administrator\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.0\Pkg\src\Operations.jl:1097

I’ve tried both as administrator and as a user. I’ve tried applying exclusion rules on the antivirus and firewall. But nothing changes.

I don’t have problems installing other programs.

This may be the cure:
https://support.microsoft.com/en-us/help/3140245/update-to-enable-tls-1-1-and-tls-1-2-as-default-secure-protocols-in-wi

And see thread:

There is some SSL problem on your machine when the GR build script tries to download the run-time using a secure connection. As a result, build.jl tries an insecure connection, which seems to fail, too. It’s hard for me to identify the real problem as I can’t reproduce this behaviour.

Can you download the run-time from the command line (wget, curl or whatever)?

Unfortunatelly it doesn’t work.
I have also tried removing the folder .julia\registries

Could you tell me the command line to do it, please?

I don’t know why I didn’t have any problem with Julia 0.7.

I had another error after installing 1.02. I removed .julia completely and afterwards it worked.

Do you have additional info in C:\Users\med\.julia\packages\GR\k8wwU\deps\build.log?

Up to now I’m also gettinh errors while installing other packages.

Building Rmath ───────────→ C:\Users\med\.julia\packages\Rmath\Py9gH\deps\build.log
┌ Error: Error building Rmath:
│ ┌ Warning: platform_key() is deprecated, use platform_key_abi() from now on
│ │ caller = ip:0x0
│ └ @ Core :-1
│ ┌ Warning: Could not extract the platform key of https://github.com/staticfloat/RmathBuilder/releases/download/v0.2.0-1/libRmath.x86_64-w64-mingw32.tar.gz; continuing…
│ └ @ BinaryProvider C:\Users\med.julia\packages\BinaryProvider\1nGWd\src\Prefix.jl:185
│ [ Info: Downloading https://github.com/staticfloat/RmathBuilder/releases/download/v0.2.0-1/libRmath.x86_64-w64-mingw32.tar.gz to C:\Users\med.julia\packages\Rmath\Py9gH\deps\usr\downloads\libRmath.x86_64-w64-mingw32.tar.gz…
│ ERROR: LoadError: Could not download https://github.com/staticfloat/RmathBuilder/releases/download/v0.2.0-1/libRmath.x86_64-w64-mingw32.tar.gz to C:\Users\med.julia\packages\Rmath\Py9gH\deps\usr\downloads\libRmath.x86_64-w64-mingw32.tar.gz:
│ ErrorException("")
│ Stacktrace:
│ [1] error(::String) at .\error.jl:33
│ [2] macro expansion at .\logging.jl:311 [inlined]
│ [3] #download#93(::Bool, ::Function, ::String, ::String) at C:\Users\med.julia\packages\BinaryProvider\1nGWd\src\PlatformEngines.jl:487
│ [4] #download at .\none:0 [inlined]
│ [5] #download_verify#94(::Bool, ::Bool, ::Bool, ::Function, ::String, ::String, ::String) at C:\Users\med.julia\packages\BinaryProvider\1nGWd\src\PlatformEngines.jl:567
│ [6] #download_verify at .\none:0 [inlined]
│ [7] #install#133(::Prefix, ::String, ::Bool, ::Bool, ::Bool, ::Function, ::String, ::String) at C:\Users\med.julia\packages\BinaryProvider\1nGWd\src\Prefix.jl:314
│ [8] (::getfield(BinaryProvider, Symbol("#kw##install")))(::NamedTuple{(:prefix, :force, :verbose),Tuple{Prefix,Bool,Bool}}, ::typeof(install), ::String, ::String) at .\none:0
│ [9] top-level scope at C:\Users\med.julia\packages\Rmath\Py9gH\deps\build.jl:36
│ [10] include at .\boot.jl:317 [inlined]
│ [11] include_relative(::Module, ::String) at .\loading.jl:1044
│ [12] include(::Module, ::String) at .\sysimg.jl:29
│ [13] include(::String) at .\client.jl:392
│ [14] top-level scope at none:0
│ in expression starting at C:\Users\med.julia\packages\Rmath\Py9gH\deps\build.jl:32
│ Excepci�n al establecer “SecurityProtocol”: “No se puede convertir a NULL el tipo “System.Net.SecurityProtocolType” porque hay valores de enumeraci�n no v�lidos. Especifique uno de los siguientes valores de enumeraci�
│ n e int�ntelo de nuevo. Los posibles valores de enumeraci�n son “Ssl3, Tls”.”
│ En l�nea: 1 Car�cter: 35
│ + [System.Net.ServicePointManager]:: <<<< SecurityProtocol =
│ + CategoryInfo : InvalidOperation: (:slight_smile: , RuntimeException
│ + FullyQualifiedErrorId : PropertyAssignmentException

│ Excepci�n al llamar a “DownloadFile” con los argumentos “2”: “Se ha terminado la conexi�n: Error inesperado de env�o.”
│ En l�nea: 5 Car�cter: 24
│ + $webclient.DownloadFile <<<< (“https://github.com/staticfloat/RmathBuilder/releases/download/v0.2.0-1/libRmath.x86_64-w64-mingw32.tar.gz”, “C:\Users\med.julia\packages\Rmath\Py9gH\deps\usr\downloads\libRmath.x86_64
│ -w64-mingw32.tar.gz”)
│ + CategoryInfo : NotSpecified: (:slight_smile: , MethodInvocationException
│ + FullyQualifiedErrorId : DotNetMethodException

└ @ Pkg.Operations C:\cygwin\home\Administrator\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.0\Pkg\src\Operations.jl:1097

I’m going to uninstall everything and clean all folders and try again.

Looking into c:\Users\username\.julia\packages\GR\k8wwU\deps\build.jl
it is trying to download
https://gr-framework.org/downloads/gr-0.35.0-Windows-x86_64.tar.gz
You can try this in your browser.
The julia command line used is (line 93 in build.jl)

file = "downloads/gr-0.35.0-Windows-x86_64.tar.gz"
download("https://gr-framework.org/downloads/gr-0.35.0-Windows-x86_64.tar.gz", file)

You can try this in the REPL. Remove "downloads/" from file, as the folder probably doesn’t exist in your current path.

I’ll download all needed packages. How should I continue with the installation from that packages?
Anyway if I need to do it manually for every package it’s going to be very messy.

It was meant to check if there is some system problem with downloading, not that you download the tar archives manually.

I can download them well.

Can I force Julia to use another protocol?
It seems to be something related with access permisions even if I run it as administrator.

I’ve tried everything you say but can’t solve the problem yet.

In file
c:\Users\username\.julia\packages\GR\k8wwU\deps\build.jl
add line 96: @info("https://$url")
It should look like;

    try
      @info("https://$url")
      download("https://$url", file)
    catch

Run

using Pkg
Pkg.build("GR")

Show us the output of
c:\Users\username\.julia\packages\GR\k8wwU\deps\build.log

For me it shows:

[ Info: Downloading pre-compiled GR 0.35.0 Windows binary
[ Info: https://gr-framework.org/downloads/gr-0.35.0-Windows-x86_64.tar.gz

The terminal shows:

Pkg.build(“GR”)
Building GR → C:\Users\med\.julia\packages\GR\k8wwU\deps\build.log
┌ Error: Error building GR:
� N�o� �s�e� �p�u�e�d�e� �i�n�i�c�i�a�r� �l�a� �v�e�r�s�i���n� �3� �d�e� �W�i�n�d�o�w�s� �P�o�w�e�r�S�h�e�l�l�.� �N�o� �e�s�t��� �i�n�s�t�a�l�a�d�a� �c�o�r�r�e�c�t�a�m�e�n�t�e�.�
� �N�o� �s�e� �p�u�e�d�e� �i�n�i�c�i�a�r� �l�a� �v�e�r�s�i���n� �3� �d�e� �W�i�n�d�o�w�s� �P�o�w�e�r�S�h�e�l�l�.� �N�o� �e�s�t��� �i�n�s�t�a�l�a�d�a� �c�o�r�r�e�c�t�a�m�e�n�t�e�.�
│ �[ Info: Downloading pre-compiled GR 0.35.0 Windows binary
│ [ Info: https://gr-framework.org/downloads/gr-0.35.0-Windows-x86_64.tar.gz
│ [ 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:829
│ [3] chmod at .\file.jl:828 [inlined]
│ [4] #rm#9(::Bool, ::Bool, ::Function, ::String) at .\file.jl:250
│ [5] rm(::String) at .\file.jl:245
│ [6] top-level scope at logging.jl:320
│ [7] top-level scope at C:\Users\med.julia\packages\GR\k8wwU\deps\build.jl:91
│ [8] include at .\boot.jl:317 [inlined]
│ [9] include_relative(::Module, ::String) at .\loading.jl:1044
│ [10] include(::Module, ::String) at .\sysimg.jl:29
│ [11] include(::String) at .\client.jl:392
│ [12] top-level scope at none:0
│ in expression starting at C:\Users\med.julia\packages\GR\k8wwU\deps\build.jl:63
└ @ Pkg.Operations C:\cygwin\home\Administrator\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.0\Pkg\src\Operations.jl:1097

and the file build.log on the same folder says:

No se puede iniciar la versión 3 de Windows PowerShell. No está instalada correctamente.
No se puede iniciar la versión 3 de Windows PowerShell. No está instalada correctamente.
⁛湉潦›潄湷潬摡湩⁧牰ⵥ潣灭汩摥䜠⁒⸰㔳〮圠湩潤獷戠湩牡੹⁛湉潦›瑨灴㩳⼯牧昭慲敭潷歲漮杲搯睯汮慯獤术⵲⸰㔳〮圭湩潤獷砭㘸㙟⸴慴⹲穧嬊䤠普㩯唠楳杮椠獮捥牵⁥潣湮捥楴湯嬊䤠普㩯䌠湡潮⁴潤湷潬摡䜠⁒畲⵮楴敭䔊剒剏›潌摡牅潲㩲䤠䕏牲牯›档潭㩤渠畳档映汩⁥牯搠物捥潴祲⠠久䕏呎਩瑓捡瑫慲散਺嬠崱甠彶牥潲⁲瑡⸠汜扩癵樮㩬㔸嬠湩楬敮嵤 ㉛⁝挣浨摯ㄣ⠶㨺潂汯‬㨺畆据楴湯‬㨺瑓楲杮‬㨺䥕瑮㘱 瑡⸠晜汩⹥汪㠺㤲 ㍛⁝档潭⁤瑡⸠晜汩⹥汪㠺㠲嬠湩楬敮嵤 㑛⁝爣⍭⠹㨺潂汯‬㨺潂汯‬㨺畆据楴湯‬㨺瑓楲杮 瑡⸠晜汩⹥汪㈺〵 㕛⁝浲㨨区牴湩⥧愠⁴尮楦敬樮㩬㐲ਵ嬠崶琠灯氭癥汥猠潣数愠⁴潬杧湩⹧汪㌺〲 㝛⁝潴⵰敬敶捳灯⁥瑡䌠尺獕牥屳敭層樮汵慩灜捡慫敧屳則歜眸啷摜灥屳畢汩⹤汪㤺਱嬠崸椠据畬敤愠⁴尮潢瑯樮㩬ㄳ‷楛汮湩摥੝嬠崹椠据畬敤牟汥瑡癩⡥㨺潍畤敬‬㨺瑓楲杮 瑡⸠汜慯楤杮樮㩬〱㐴 ㅛ崰椠据畬敤㨨䴺摯汵ⱥ㨠区牴湩⥧愠⁴尮祳楳杭樮㩬㤲 ㅛ崱椠据畬敤㨨区牴湩⥧愠⁴尮汣敩瑮樮㩬㤳ਲ嬠㈱⁝潴⵰敬敶捳灯⁥瑡渠湯㩥ਰ湩攠灸敲獳潩瑳牡楴杮愠⁴㩃啜敳獲浜摥⹜番楬屡慰正条獥䝜屒㡫睷展敤獰扜極摬樮㩬㌶

The two first lines are Spanish (like my Windows) and mean

it’s not possible to start Windows PowerShell version 3. It’s not installed properly

I don’t know what are those Chinese symbols, Google Translate is not able to translate them.

I’m going to try to install Powershell 3 but anything I try it says it’s not compatible.

In this case, the commands

file = "gr-0.35.0-Windows-x86_64.tar.gz"
download("https://gr-framework.org/downloads/gr-0.35.0-Windows-x86_64.tar.gz", file)

should also not work, I guess. You said, they are working?

You could try to install PowerShell 3:
https://www.microsoft.com/en-us/download/details.aspx?id=34595

But I am only guessing here, it seems strange.

OK, I’m sorry I was wrong.
What I tried before was to download the file from a web browser, and that works.
But if I run that lines from Julia I get this error:

it’s not possible to start version 3 of Windows PowerShell. It’s not installed properly.
ERROR: Downloading files requires Windows Management Framework 3.0 or later.
Stacktrace:
[1] error(::String) at .\error.jl:33
[2] download(::String, ::String) at .\download.jl:18
[3] top-level scope at none:0

I’ve being trying for a while and finally got to install
https://www.microsoft.com/en-us/download/details.aspx?id=34595

The more I learn about computers the more complex everything seems, crosscompilations, dead libraries, missing packages… and even more problems on Linux.

Anyway, now it works.
Thank you.

That’s soooo crazy! Looks like we should even use our own (static builtin) download mechanism in GR
Anyway, thanks for finding this out.

Ref: https://github.com/JuliaLang/julia/pull/25477 and https://github.com/JuliaLang/julia/pull/26719.

1 Like

Finally I found my problem was general, not just for GR.
I’m going to change the thread title.
Isn’t it possible to install the packages precompiled?