BioJulia / Libz.jl

Fast, flexible zlib bindings.
Other
27 stars 17 forks source link

Error using Libz on Windows, no zlib1 found #67

Open kool7d opened 4 years ago

kool7d commented 4 years ago

This template is rather extensive. Fill out all that you can, if are a new contributor or you're unsure about any section, leave it unchanged and a reviewer will help you :smile:. This template is simply a tool to help everyone remember the BioJulia guidelines, if you feel anything in this template is not relevant, simply delete it.

Expected Behavior

Current Behavior

I am getting an error when trying to using Libz since it is needed for BioStructures.

Possible Solution / Implementation

I copied the zlib1.dll from the bin folder for Julia 1.2 to the bin folder for Julia 1.3 which was missing it and now it appears to be working. Seems to be an issue with changing to Julia 1.3

Steps to Reproduce (for bugs)

1. 2. 3. 4.

Context

Your Environment

jnoynaert commented 4 years ago

Same for me Windows 10 Pro build 1903, with a fresh install of Julia 1.3:

(v1.3) pkg> add Libz
 Resolving package versions...
  Updating `C:\Users\jnoynaert\.julia\environments\v1.3\Project.toml`
  [2ec943e9] + Libz v1.0.0
  Updating `C:\Users\jnoynaert\.julia\environments\v1.3\Manifest.toml`
 [no changes]

julia> using Libz
[ Info: Precompiling Libz [2ec943e9-cfe8-584d-b93d-64dcb6d567b7]
ERROR: LoadError: LoadError: error compiling version: could not load library "zlib1"
The specified module could not be found.

Stacktrace:
 [1] top-level scope at C:\Users\jnoynaert\.julia\packages\Libz\zMAun\src\lowlevel.jl:110
 [2] include at .\boot.jl:328 [inlined]
 [3] include_relative(::Module, ::String) at .\loading.jl:1105
 [4] include at .\Base.jl:31 [inlined]
 [5] include(::String) at C:\Users\jnoynaert\.julia\packages\Libz\zMAun\src\Libz.jl:3
 [6] top-level scope at C:\Users\jnoynaert\.julia\packages\Libz\zMAun\src\Libz.jl:11
 [7] include at .\boot.jl:328 [inlined]
 [8] include_relative(::Module, ::String) at .\loading.jl:1105
 [9] include(::Module, ::String) at .\Base.jl:31
 [10] top-level scope at none:2
 [11] eval at .\boot.jl:330 [inlined]
 [12] eval(::Expr) at .\client.jl:425
 [13] top-level scope at .\none:3
in expression starting at C:\Users\jnoynaert\.julia\packages\Libz\zMAun\src\lowlevel.jl:110
in expression starting at C:\Users\jnoynaert\.julia\packages\Libz\zMAun\src\Libz.jl:11
caused by [exception 1]
could not load library "zlib1"
The specified module could not be found.

Stacktrace:
 [1] top-level scope at C:\Users\jnoynaert\.julia\packages\Libz\zMAun\src\lowlevel.jl:110
 [2] include at .\boot.jl:328 [inlined]
 [3] include_relative(::Module, ::String) at .\loading.jl:1105
 [4] include at .\Base.jl:31 [inlined]
 [5] include(::String) at C:\Users\jnoynaert\.julia\packages\Libz\zMAun\src\Libz.jl:3
 [6] top-level scope at C:\Users\jnoynaert\.julia\packages\Libz\zMAun\src\Libz.jl:11
 [7] include at .\boot.jl:328 [inlined]
 [8] include_relative(::Module, ::String) at .\loading.jl:1105
 [9] include(::Module, ::String) at .\Base.jl:31
 [10] top-level scope at none:2
 [11] eval at .\boot.jl:330 [inlined]
 [12] eval(::Expr) at .\client.jl:425
 [13] top-level scope at .\none:3
ERROR: Failed to precompile Libz [2ec943e9-cfe8-584d-b93d-64dcb6d567b7] to C:\Users\jnoynaert\.julia\compiled\v1.3\Libz\0KnGZ_UWRgs.ji.
Stacktrace:
 [1] error(::String) at .\error.jl:33
 [2] compilecache(::Base.PkgId, ::String) at .\loading.jl:1283
 [3] _require(::Base.PkgId) at .\loading.jl:1024
 [4] require(::Base.PkgId) at .\loading.jl:922
 [5] require(::Module, ::Symbol) at .\loading.jl:917

Possibly related to JuliaIO/GZip.jl#84

jnoynaert commented 4 years ago

@kool7d if you are having this issue because you are on Windows like me, the issue is fixed on master, but not yet registered. In a new Julia session you can Pkg.develop(PackageSpec(url="https://github.com/BioJulia/Libz.jl")) and then using Libz should work as normal.

kool7d commented 4 years ago

Still doesn't work for me. I think upgrading to Julia 1.3 broke it so I'm going back to 1.2

OK, so zlib1.dll is not in the bin folder for 1.3, so I copied it from 1.2 and it seems to be working