Downloading and building packages on Windows 7


#1

Hi everyone.

I have started using Julia only a couple of weeks ago. I understand the language is still under development and therefore everything is not expected to run smoothly. Still, I would like to report a recurring problem I stumble on when trying to add new packages. Here is the latest example while trying to install The Differential Equations package (sorry for the part of the error message in French but I guess someone will understand what this says anyway; I have uploaded a screen capture as well):


INFO: Building SymEngine
Info: Attempting to create directory C:\Users\pyl\.julia\v0.6\SymEngine\deps\downloads
Info: Downloading file https://github.com/symengine/symengine/releases/download/v0.3.0/symengine-0.3
.0-binaries-msvc-x86_64.tar.bz2
Exception lors de la définition de « SecurityProtocol » : « Impossible de convertir la valeur Null
en type « System.Net.SecurityProtocolType » en raison de valeurs d'énumération non valides. Spécifi
ez l'une des valeurs d'énumération suivantes et réessayez. Les valeurs d'énumération possibles sont
 « Ssl3, Tls ». »
Au niveau de ligne : 1 Caractère : 28
+ [Net.ServicePointManager]:: <<<< SecurityProtocol = [Net.SecurityProtocolType]::Tls12; (new-objec
t net.webclient).DownloadFile("https://github.com/symengine/symengine/releases/download/v0.3.0/syme
ngine-0.3.0-binaries-msvc-x86_64.tar.bz2", "C:\Users\pyl\.julia\v0.6\SymEngine\deps\downloads\symen
gine-0.3.0-binaries-msvc-x86_64.tar.bz2")
    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : PropertyAssignmentException

Exception lors de l'appel de « DownloadFile » avec « 2 » argument(s) : « La connexion sous-jacente
a été fermée : Une erreur inattendue s'est produite lors de l'envoi. »
Au niveau de ligne : 1 Caractère : 121
+ [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; (new-object net.
webclient).DownloadFile <<<< ("https://github.com/symengine/symengine/releases/download/v0.3.0/syme
ngine-0.3.0-binaries-msvc-x86_64.tar.bz2", "C:\Users\pyl\.julia\v0.6\SymEngine\deps\downloads\symen
gine-0.3.0-binaries-msvc-x86_64.tar.bz2")
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : DotNetMethodException

I am no computer expert, but I have kind of managed to understand that there is a problem while downloading the package.

The way I have circumvented this type of problem so far is by manually retrieving the correct package on GitHub and putting the file where it is supposed to go. Both places are given in the last few lines of the error message. Then I build the package, and it usually works fine.

It took me a while to find this out the first time. Similarly the JuliaPro installer failed, I installed Julia and Juno “manually” instead, and this is when I started getting this type of error, especially when I learned that the debugger is “on repair” for Julia 0.6. To be honest I almost dropped trying to use Julia at this point.

Ok, so my question is the following:

  • Is there anything that did not install properly at the very beginning, or is just the installer mistaken where it looks for relevant packages? I did make an update just in case a couple of times (not recently though) but this did not improve the problem.

Although I can go on the way I do, it would be nice to have the install process work by itself. Also, others may have the same problems.

For anyone willing to answer: please avoid geek speak. I browsed through some of the forum topics and more often than not answers make no sense to me. No criticism here, just stating that I am no Linux and system expert although I use the terminal often enough when on a Linux machine.

Thanks in advance


#2

Did you lose internet while it was downloading the binary? Try doing Pkg.build("DifferentialEquations") again.


#3

Try to install the latest Windows Management Framework: https://www.microsoft.com/en-us/download/details.aspx?id=54616 and then try again.


#4

Thanks for the answer. No, there was no internet connection loss. As I said (or maybe just implied) in my message, I have already completed the downloads manually and built the packages that had failed to download (SymEngine, Rmath and Sundials), as well as DifferentialEquations. No further problem to report.

By the way, your package looks really awsome — and I believe it is more than looks. It was one of the reasons I opted for Julia instead of Python for this research project (the other being speed and simplicity of the language for scientific computing — physics in this case).


#5

Thanks. Interesting suggestion. My .NET is 4.7.02x, the latest being 5.1

However, I need to try installing another package and have it fail before I can try your suggestion, as I finished DifferentialEquations by retrieving the failed package directly on GitHub. I will let you know.


#6

I don’t fully understand what the error message is saying, but since it mentions Security: are you running this in an elevated command line i.e. one which you are running as Administrator?

FWIW, I’ve been running Julia on Windows 7 for a few months, and have successfully installed several packages (though I haven’t tried to install this particular one).


#7

Thanks for your answer. No I don’t. I ran Pkg.install from the Julia console in Juno, which does not start with admin privilege.

I agree this error is strange, all the more so that it seems to occur randomly. Some packages get installed without problem but with others, the installer does not find the source on the GitHub repository.


#8

By the way, as I just mentioned to the last person who answered my query, this error appears randomly. Some packages get installed without problem, while for some others the installer fails to find the package on the GitHub repository, which is why I have to download them manually and put them at the right place in the .julia directory.


#9

Perhaps you could try starting Juno in Administrator mode (right click, Run as Administrator) and see if those packages get installed in that case? Then you’d have a better idea of where the problem is.

Also, have you installed the Windows ‘Easy Fix’ yet? Your messages don’t look like the usual errors people get for lack of that fix, but it’s worth a try if you haven’t installed that yet.


#10

I just got the same type of error while trying Pkg.update(), with ZMQ. I tried to build ZMQ and here is the Julia console error message.

Out of curiosity I looked at the build.jl file mentioned at the last line of the error message. The first 43 lines of this code are reproduced at the end of this message. Not surprisingly, considering the message in the Julia console, the error occurs while downloading the source:

Download and install binaries

    install(url, tarball_hash; prefix=prefix, force=true, verbose=verbose)

The actual download location (url) is indicated a few lines above for A 64 bit Windows machine:

on line 15
bin_prefix = “https://github.com/JuliaInterop/ZMQBuilder/releases/download/v4.2.5+5

and on line 30
Windows(:x86_64) => ("$bin_prefix/ZMQ.x86_64-w64-mingw32.tar.gz", “84f8937f65015620ec56cb1ee867217edcfb6b2aec7ea41a2b1d9c32fe616925”),

I tried the prefix above in my browser, and it returned a 404 error (page not found). So my conclusion is that the error comes from the installer program itself, not Windows.

If believe this is worth mentioning to the developers. I will do this asap.

Thanks for your help.


using BinaryProvider # requires BinaryProvider 0.3.0 or later
include(“compile.jl”)

env var to force compilation from source, for testing purposes

const forcecompile = get(ENV, “FORCE_COMPILE_ZMQ”, “no”) == “yes”

Parse some basic command-line arguments

const verbose = “–verbose” in ARGS || forcecompile
const prefix = Prefix(get([a for a in ARGS if a != “–verbose”], 1, joinpath(@DIR, “usr”)))
products = [
LibraryProduct(prefix, String[“libzmq”], :libzmq),
]

Download binaries from hosted location

bin_prefix = “https://github.com/JuliaInterop/ZMQBuilder/releases/download/v4.2.5+5

Listing of files generated by BinaryBuilder:

download_info = Dict(
Linux(:aarch64, :glibc) => ("$bin_prefix/ZMQ.aarch64-linux-gnu.tar.gz", “cca0f7ceebc5c517794af63d26b307c16b6e215eb978b95543314851747db759”),
Linux(:aarch64, :musl) => ("$bin_prefix/ZMQ.aarch64-linux-musl.tar.gz", “bb44f9e7351be07f6dffc4b5c1eef69cdfb65843f44949366c4a64aa011e5a04”),
Linux(:armv7l, :glibc, :eabihf) => ("$bin_prefix/ZMQ.arm-linux-gnueabihf.tar.gz", “9b458ebe9272fe00ba4c476aacfd63234e4cb1f1e8170f22379b98026c42d62f”),
Linux(:armv7l, :musl, :eabihf) => ("$bin_prefix/ZMQ.arm-linux-musleabihf.tar.gz", “1ebe76ccd9c5c56e938d0cca28639fa5f968a2be69e1ab82510de4a71f34d3aa”),
Linux(:i686, :glibc) => ("$bin_prefix/ZMQ.i686-linux-gnu.tar.gz", “bddf00cac999ce9d53585995570fe82213f8d75d7c459a6b0db6a388b67b4d66”),
Linux(:i686, :musl) => ("$bin_prefix/ZMQ.i686-linux-musl.tar.gz", “6172d284ca92c7e304d1ab2b234b653fcb825a02d30647021ee4841338358d96”),
Windows(:i686) => ("$bin_prefix/ZMQ.i686-w64-mingw32.tar.gz", “8e731083e8468126fc657977ea86a99fe332e2f47c2aefdf50146a838f742caa”),
Linux(:powerpc64le, :glibc) => ("$bin_prefix/ZMQ.powerpc64le-linux-gnu.tar.gz", “2a9a315706a7ddb1d0cd9e365a6bd132922749f2990e8ab04b1f67d54969e92f”),
MacOS(:x86_64) => ("$bin_prefix/ZMQ.x86_64-apple-darwin14.tar.gz", “0a649b33d609486d748f5c33c43460b089e876e88030e3293c49d17952f4c8d2”),
Linux(:x86_64, :glibc) => ("$bin_prefix/ZMQ.x86_64-linux-gnu.tar.gz", “a4ebe3d86a6f1cff715ae398a87e14aaf5058607c70be00f14e7cae6648994c9”),
Linux(:x86_64, :musl) => ("$bin_prefix/ZMQ.x86_64-linux-musl.tar.gz", “7c0d1fe70e49370ef6ed3ae8c7b70a82ada6c80c029966f4f717957604592b71”),
Windows(:x86_64) => ("$bin_prefix/ZMQ.x86_64-w64-mingw32.tar.gz", “84f8937f65015620ec56cb1ee867217edcfb6b2aec7ea41a2b1d9c32fe616925”),
)

source code tarball and hash for fallback compilation

source_url = “https://github.com/zeromq/libzmq/releases/download/v4.2.5/zeromq-4.2.5.tar.gz
source_hash = “cc9090ba35713d59bb2f7d7965f877036c49c5558ea0c290b0dcc6f2a17e489f”

Install unsatisfied or updated dependencies:

unsatisfied = any(!satisfied(p; verbose=verbose) for p in products)
if haskey(download_info, platform_key()) && !forcecompile
url, tarball_hash = download_info[platform_key()]
if !isinstalled(url, tarball_hash; prefix=prefix)
# Download and install binaries
install(url, tarball_hash; prefix=prefix, force=true, verbose=verbose)


#11

I had this “Easy Fix” problem when I started using Julia. Nothing would load. It solved this part of the problem.

I did not try to run Juno as administrator. As I mentioned in my last reply to davidandthoff (our mails got past each other), I now think the problem is in the build.jl file itself for the packages that fail to download. The download location in this file is erroneous, I get a 404 error message when I look there in my browser (look at my message on the forum website if you are interested).

Anyway, thanks for your help.


#12

Ah, thought so, without that fix no packages would be installing, not this random behaviour.

The prefix by itself gives a 404 error, but as mentioned in your post, the download location used is "$bin_prefix/ZMQ.x86_64-w64-mingw32.tar.gz", which evaluates to “https://github.com/JuliaInterop/ZMQBuilder/releases/download/v4.2.5+5/ZMQ.x86_64-w64-mingw32.tar.gz”, which is a valid URL for the file. So unless I’m misunderstanding something, the download URL seems fine, the error seems to be elsewhere.


#13

Indeed. When looking for the package manually, I progress step by step and and can find it only without the “download” part of the address, which made me think there was some kind of mistake here. But you are right, the error comes from elsewhere…