Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

installing/building on 0.7-beta2, Win64 user account #24

Closed
PaulSoderlind opened this issue Jul 17, 2018 · 17 comments · Fixed by #30
Closed

installing/building on 0.7-beta2, Win64 user account #24

PaulSoderlind opened this issue Jul 17, 2018 · 17 comments · Fixed by #30

Comments

@PaulSoderlind
Copy link

PaulSoderlind commented Jul 17, 2018

At build CodecZlib (after doing add CodecZlib#master) , I get the following error message (if I am logged in as a User)

ERROR: Can not create symbolic link : Access is denied. : C:\Users\Me\.julia\packages\CodecZlib\POfe\deps\usr\bin\libz.dll

ERROR: Can not create symbolic link : Access is denied. : C:\Users\Me\.julia\packages\CodecZlib\POfe\deps\usr\bin\libz-1.dll

Instead, when logged in as an Admin, then it works.

@PaulSoderlind PaulSoderlind changed the title installing/building on 0.7-beta2, Win64 use account installing/building on 0.7-beta2, Win64 user account Jul 17, 2018
@bicycle1885
Copy link
Member

I've never seen this error. Is that reproducible even after removing CodecZlib (or all packages) and then installing it again?

@staticfloat
Copy link
Contributor

This is happening because Windows can't deal with symlinks, and so when 7zip tries to extract a tarball that contains them, it freaks out. The solution is to, when building a tarball for windows in your builder repository, copy all files and not preserve symlinks. SundialsBuilder recently added a piece of code to do this, you can do something similar here. Eventually, BinaryBuilder will do this for you automatically.

@PaulSoderlind
Copy link
Author

This problem remains also after the update earlier today (4 Aug)

@s-celles
Copy link

I confirm I faced same issue.
I had to run Julia 1.0.0 as Administrator with Windows 10 to be able to run Pkg.build("CodecZlib")

(I was simply trying to install DataFrames.jl)

@aalexandersson
Copy link

I had the same issue on Julia 1.0.0. under Windows 7. I was simply trying to install LightGraphs v1.0.0.

Like @scls19fr did, my solution was to run Julia 1.0.0 as Administrator.

@bicycle1885
Copy link
Member

Could anyone try this release https://github.com/bicycle1885/ZlibBuilder/releases/tag/v1.0.2? I cannot reproduce the problem on my Windows 10. So I have no idea what is happening exactly.

@krcools
Copy link

krcools commented Aug 13, 2018

You cannot reproduce it on an up-to-date install of Windows 10 because the admin requirement on using mklink has been removed recently. Users on older Win10s and Win7s will still have issues.

@krcools
Copy link

krcools commented Aug 13, 2018

Some diagnostics:

  • Even though symlink creation fails because of lack of permissions, two zero size files libz.dll and libz-1.dll are created in the bin subdirectory. The tragedy is that these files are not even referred to by the created deps.jl.
  • Because these placeholders are there, build CodecZlib succeeds on the second attempt. Unfortunately when CodeZlib is pulled in as a dependency of other packages, no second attempt is undertaken.

I agree with @staticfloat that avoiding symlinks altogether would solve this issue.

@staticfloat
Copy link
Contributor

The next version of BinaryBuilder (being worked on under the sf/bb8 branch) automatically collapses symlinks on Windows so that you get independent copies of any files that would instead be symlinks.

@bicycle1885
Copy link
Member

I thought materializing symlinks would solve the problem because there are no symlinks in the distributed archive. v1.0.2 I posted above does that. Isn't that enough?

~/w/T/tmp (master|✚1…) $ ls
Zlib.v1.2.11.x86_64-w64-mingw32.tar.gz include                                logs
bin                                    lib                                    share
~/w/T/tmp (master|✚1…) $ ls -ila bin/
total 2640
60166774 drwxr-xr-x  5 kenta  staff     170 Aug 13 14:47 .
60166734 drwxr-xr-x  8 kenta  staff     272 Aug 13 19:03 ..
60166777 -rwxr-xr-x  1 kenta  staff  447596 Aug 13 14:47 libz-1.2.11.dll
60166776 -rwxr-xr-x  1 kenta  staff  447596 Aug 13 14:47 libz-1.dll
60166775 -rwxr-xr-x  1 kenta  staff  447596 Aug 13 14:47 libz.dll

I don't know how BinaryBuilder.jl and BinaryProvider.jl use these DLL files. So, I kept three equivalent files in the archive, but it may be redundant (in that case, which one should I retain? libz.dll? libz-1.2.11.dll?, or any one?).

@bicycle1885
Copy link
Member

I see. So, I'll wait for the next BB release.

@staticfloat
Copy link
Contributor

Isn't that enough?

Yes, that should be enough. So all I'm saying is that BB will do that for you, so you don't have to worry about it in the future.

@bicycle1885
Copy link
Member

Please try CodecZlib.jl v0.4.4 (Julia 0.6 compatible) or v0.5.0 (for Julia 0.7/1.0) to check if this has been fixed in your environment. I'd like to get feedbacks.

@krcools
Copy link

krcools commented Aug 14, 2018

On Julia-1.0, dev https://github.com/bicycle1885/CodecZlib.jl@v0.5.0 seems to work for me. Thanks for looking into this so promptly.

@PaulSoderlind
Copy link
Author

PaulSoderlind commented Aug 14, 2018 via email

@simonbyrne
Copy link

I'm seeing this issue on the current release:

(v1.0) pkg> st

    Status `C:\Users\sbyrne\.julia\environments\v1.0\Project.toml`

  [944b1d66] CodecZlib v0.5.0

  [a93c6f00] DataFrames v0.14.1

  [e7dc6d0d] DataValues v0.4.5

  [6deec6e2] IndexedTables v0.8.0

  [438e738f] PyCall v1.18.4

 

(v1.0) pkg> build CodecZlib

  Building CodecZlib → `C:\Users\sbyrne\.julia\packages\CodecZlib\wwgbh\deps\build.log`

┌ Error: Error building `CodecZlib`:

│ ┌ Warning: On Windows, creating file symlinks requires Administrator privileges

│ └ @ Base.Filesystem file.jl:789

│ ┌ Warning: platform_key() is deprecated, use platform_key_abi() from now on

│ │   caller = ip:0x0

│ └ @ Core :-1

│ [ Info: Downloading https://github.com/bicycle1885/ZlibBuilder/releases/download/v1.0.2/Zlib.v1.2.11.x86_64-w64-mingw3

2.tar.gz to C:\Users\sbyrne\.julia\packages\CodecZlib\wwgbh\deps\usr\downloads\Zlib.v1.2.11.x86_64-w64-mingw32.tar.gz...

 

│ ERROR: LoadError: Could not download https://github.com/bicycle1885/ZlibBuilder/releases/download/v1.0.2/Zlib.v1.2.11.

x86_64-w64-mingw32.tar.gz to C:\Users\sbyrne\.julia\packages\CodecZlib\wwgbh\deps\usr\downloads\Zlib.v1.2.11.x86_64-w64-

mingw32.tar.gz:

│ ErrorException("")

│ Stacktrace:

│  [1] error(::String) at .\error.jl:33

│  [2] macro expansion at .\logging.jl:313 [inlined]

│  [3] #download#93(::Bool, ::Function, ::String, ::String) at C:\Users\sbyrne\.julia\packages\BinaryProvider\cVlaj\src\

PlatformEngines.jl:487

│  [4] #download at .\none:0 [inlined]

│  [5] #download_verify#94(::Bool, ::Bool, ::Bool, ::Function, ::String, ::String, ::String) at C:\Users\sbyrne\.julia\p

ackages\BinaryProvider\cVlaj\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\sbyrne\.juli

a\packages\BinaryProvider\cVlaj\src\Prefix.jl:314

│  [8] (::getfield(BinaryProvider, Symbol("#kw##install")))(::NamedTuple{(:prefix, :force, :verbose),Tuple{Prefix,Bool,B

ool}}, ::typeof(install), ::String, ::String) at .\none:0

│  [9] top-level scope at C:\Users\sbyrne\.julia\packages\CodecZlib\wwgbh\deps\build.jl:88

│  [10] include at .\boot.jl:317 [inlined]

│  [11] include_relative(::Module, ::String) at .\loading.jl:1038

│  [12] include(::Module, ::String) at .\sysimg.jl:29

│  [13] include(::String) at .\client.jl:388

│  [14] top-level scope at none:0

│ in expression starting at C:\Users\sbyrne\.julia\packages\CodecZlib\wwgbh\deps\build.jl:81

│ Exception setting "SecurityProtocol": "Cannot convert null to type "System.Net.SecurityProtocolType" due to invalid en

u

│ meration values. Specify one of the following enumeration values and try again. The possible enumeration values are "S

s

│ l3, Tls"."

│ At line:1 char:35

│ + [System.Net.ServicePointManager]:: <<<< SecurityProtocol =

│     + CategoryInfo          : InvalidOperation: (:) [], RuntimeException

│     + FullyQualifiedErrorId : PropertyAssignmentException

│

│ Exception calling "DownloadFile" with "2" argument(s): "The underlying connection was closed: An unexpected error occu

r

│ red on a send."

│ At line:5 char:24

│ + $webclient.DownloadFile <<<< ("https://github.com/bicycle1885/ZlibBuilder/releases/download/v1.0.2/Zlib.v1.2.11.x86_

6

│ 4-w64-mingw32.tar.gz", "C:\Users\sbyrne\.julia\packages\CodecZlib\wwgbh\deps\usr\downloads\Zlib.v1.2.11.x86_64-w64-min

g

│ w32.tar.gz")

│     + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException

│     + FullyQualifiedErrorId : DotNetMethodException

│

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

Operations.jl:1068

@simonbyrne
Copy link

ah, nevermind this is a BinaryProvider issue.

bicycle1885 added a commit to bicycle1885/ZlibBuilder that referenced this issue Oct 28, 2018
Now this should be supported by BinaryBuilder.jl:
JuliaIO/CodecZlib.jl#24 (comment)
bicycle1885 added a commit to bicycle1885/ZlibBuilder that referenced this issue Oct 28, 2018
Now this should be supported by BinaryBuilder.jl:
JuliaIO/CodecZlib.jl#24 (comment)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
7 participants