MbedTLS.jl
MbedTLS.jl copied to clipboard
More errors building MbedTLS in Windows.
Although I managed to build MbedTLS again, I feel like reporting this as an issue, as the messages may be helpful in making the installation more smooth for everybody. My intention here is using HTTP v0.7.0 from a clean installation.
This from a cygwin/mintty terminal in Julia 0.7 built with make -p 8. The console is opened without adminstrator rights. Prior to opening, did 'rm -rf MbedTLS'. A large number of packages was installed previously.
(v0.7) pkg> update
Updating registry at `C:\Users\F\.julia\registries\General`
Updating git-repo `https://github.com/JuliaRegistries/General.git`
Resolving package versions...
┌ Warning: failed to extract archive downloaded from https://api.github.com/repos/JuliaWeb/MbedTLS.jl/tarball/3775d205b09b624aa06d39012a8920ba99cb3b8b
└ @ Pkg.Operations C:\cygwin64\home\F\julia\usr\share\julia\stdlib\v0.7\Pkg\src\Operations.jl:452
[ Info: Installed MbedTLS ─ v0.6.3
Updating `C:\Users\F\.julia\environments\v0.7\Project.toml`
[no changes]
Updating `C:\Users\F\.julia\environments\v0.7\Manifest.toml`
[no changes]
Building MbedTLS → `C:\Users\F\.julia\packages\MbedTLS\mkHpa\deps\build.log`
┌ Error: Error building `MbedTLS`:
│ ┌ Warning: On Windows, creating file symlinks requires Administrator privileges
│ └ @ Base.Filesystem file.jl:810
│ ┌ Warning: platform_key() is deprecated, use platform_key_abi() from now on
│ │ caller = ip:0x0
│ └ @ Core :-1
│ [ Info: Downloading https://github.com/JuliaWeb/MbedTLSBuilder/releases/download/v0.16.0/MbedTLS.v2.13.1.x86_64-w64-mingw32.tar.gz to C:\Users\F\.julia\packages\MbedTLS\mkHpa\deps\usr\downloads\MbedTLS.v2.13.1.x86_64-w64-mingw32.tar.gz...
│ ERROR: LoadError: Could not list contents of tarball C:\Users\F\.julia\packages\MbedTLS\mkHpa\deps\usr\downloads\MbedTLS.v2.13.1.x86_64-w64-mingw32.tar.gz
│ Stacktrace:
│ [1] error(::String) at .\error.jl:33
│ [2] #list_tarball_files#142(::Bool, ::Function, ::String) at C:\Users\F\.julia\packages\BinaryProvider\zp4zb\src\Prefix.jl:468
│ [3] list_tarball_files at C:\Users\F\.julia\packages\BinaryProvider\zp4zb\src\Prefix.jl:457 [inlined]
│ [4] macro expansion at .\logging.jl:309 [inlined]
│ [5] #install#132(::Prefix, ::String, ::Bool, ::Bool, ::Bool, ::Function, ::String, ::String) at C:\Users\F\.julia\packages\BinaryProvider\zp4zb\src\Prefix.jl:319
│ [6] (::getfield(BinaryProvider, Symbol("#kw##install")))(::NamedTuple{(:prefix, :force, :verbose),Tuple{Prefix,Bool,Bool}}, ::typeof(install), ::String, ::String) at .\none:0
│ [7] top-level scope at C:\Users\F\.julia\packages\MbedTLS\mkHpa\deps\build.jl:48
│ [8] include at .\boot.jl:317 [inlined]
│ [9] include_relative(::Module, ::String) at .\loading.jl:1038
│ [10] include(::Module, ::String) at .\sysimg.jl:29
│ [11] include(::String) at .\client.jl:398
│ [12] top-level scope at none:0
│ in expression starting at C:\Users\F\.julia\packages\MbedTLS\mkHpa\deps\build.jl:44
│ tar (child): Klarte ikke å koble til C. Navnoppslag mislyktes
│
│ gzip: stdin: unexpected end of file
│ tar: Child returned status 128
│ tar: Error is not recoverable: exiting now
It seems the problem is extracting the tarball, not the missing administrator rights. Anyway, after removing the MbedTLS folder again, I tried this:
Downloaded Julia binary 0.7.0 is opened from Explorer with administration privileges:
┌ Error: Error building `MbedTLS`:
│ ┌ Warning: platform_key() is deprecated, use platform_key_abi() from now on
│ │ caller = ip:0x0
│ └ @ Core :-1
│ ERROR: LoadError: IOError: stat: invalid argument (EINVAL)
│ Stacktrace:
│ [1] stat(::String) at .\stat.jl:68
│ [2] isfile at .\stat.jl:303 [inlined]
│ [3] macro expansion at .\logging.jl:311 [inlined]
│ [4] #install#132(::Prefix, ::String, ::Bool, ::Bool, ::Bool, ::Function, ::String, ::String) at C:\Users\F\.julia\packages\BinaryProvider\zp4zb\src\Prefix.jl:319
│ [5] (::getfield(BinaryProvider, Symbol("#kw##install")))(::NamedTuple{(:prefix, :force, :verbose),Tuple{Prefix,Bool,Bool}}, ::typeof(install), ::String, ::String) at .\none:0
│ [6] top-level scope at C:\Users\F\.julia\packages\MbedTLS\mkHpa\deps\build.jl:48
│ [7] include at .\boot.jl:317 [inlined]
│ [8] include_relative(::Module, ::String) at .\loading.jl:1038
│ [9] include(::Module, ::String) at .\sysimg.jl:29
│ [10] include(::String) at .\client.jl:398
│ [11] top-level scope at none:0
│ in expression starting at C:\Users\F\.julia\packages\MbedTLS\mkHpa\deps\build.jl:44
└ @ Pkg.Operations C:\cygwin64\home\F\julia\usr\share\julia\stdlib\v0.7\Pkg\src\Operations.jl:1068
Next try, in Julia 1.0. Downloaded binary started from Explorer with administrator rights. Folder MbedTLS is again removed manually first. Thereafter
(v1.0) pkg> gc
(this removes all packages, but fails to remove NodeJS due to a known bug with stdlib package paths for windows downloaded binaries). Dirty fix again:
rm -rf NodeJS
And, with administrator rights in Julia 1.0, downloaded binary version launched from Windows Explorer:
(v1.0) pkg> add MbedTLS
---> success
(v1.0) pkg> test MbedTLS
---> success
(v1.0) pkg> add HTTP
---> success
(v1.0) pkg> test HTTP
---> success
After this, MbedTLS also works in Julia 0.7, no rebuilding was necessary.
Please provide more details: version of julia, mbedtls version, backtraces, what you tried, etc.; as is, there's not much we can do here.
Oh, sorry, I posted an empty issue by mistake :). Well, there is plenty to read now!
Thanks for the detailed report @hustf; @staticfloat, just wanted to point this report out to you. Not sure if anything could be simplified/made more convenient here on windows.