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

Pkg.build failing on 0.7 and Windows 7 #135

Open
tbeason opened this issue Feb 1, 2018 · 12 comments
Open

Pkg.build failing on 0.7 and Windows 7 #135

tbeason opened this issue Feb 1, 2018 · 12 comments

Comments

@tbeason
Copy link
Contributor

tbeason commented Feb 1, 2018

Maybe this has already been documented, but I didn't see it anywhere. I'm on Julia 0.7 master branch and Windows 7.

julia> Pkg.build("WinRPM")
WARNING: Base.Pkg is deprecated, run `using Pkg` instead.
 in module Main
[ Info: Building WinRPM
┌ Warning: Deprecated syntax `type` at C:\Users\tbeason\.julia\v0.7\BufferedStreams\src\bufferedinputstream.jl:15.
│ Use `mutable struct` instead.
└ @ nothing bufferedinputstream.jl:15
┌ Warning: Deprecated syntax `parametric method syntax BufferedInputStream{T}(source::T, bufsize::Integer = default_buffer_size)` around C:\Users\tbeason\.julia\v0.7\BufferedStreams\src\bufferedinputstream.jl:36.
│ Use `BufferedInputStream(source::T, bufsize::Integer = default_buffer_size) where T` instead.
└ @ nothing bufferedinputstream.jl:36
┌ Warning: Deprecated syntax `parametric method syntax Base.show{T}(io::IO, stream::BufferedInputStream{T})` around C:\Users\tbeason\.julia\v0.7\BufferedStreams\src\bufferedinputstream.jl:43.
│ Use `Base.show(io::IO, stream::BufferedInputStream{T}) where T` instead.
└ @ nothing bufferedinputstream.jl:43
WARNING: importing deprecated binding Base.Void into BufferedStreams.
WARNING: Base.Void is deprecated, use Nothing instead.
  likely near C:\Users\tbeason\.julia\v0.7\BufferedStreams\src\bufferedinputstream.jl:207
WARNING: Base.Void is deprecated, use Nothing instead.
  likely near C:\Users\tbeason\.julia\v0.7\BufferedStreams\src\bufferedinputstream.jl:207
WARNING: Base.Void is deprecated, use Nothing instead.
  likely near C:\Users\tbeason\.julia\v0.7\BufferedStreams\src\bufferedinputstream.jl:207
┌ Warning: Deprecated syntax `parametric method syntax Base.seek{T}(stream::BufferedInputStream{T}, pos::Integer)` around C:\Users\tbeason\.julia\v0.7\BufferedStreams\src\bufferedinputstream.jl:337.
│ Use `Base.seek(stream::BufferedInputStream{T}, pos::Integer) where T` instead.
└ @ nothing bufferedinputstream.jl:337
┌ Warning: Deprecated syntax `type` at C:\Users\tbeason\.julia\v0.7\BufferedStreams\src\bufferedoutputstream.jl:21.
│ Use `mutable struct` instead.
└ @ nothing bufferedoutputstream.jl:21
┌ Warning: Deprecated syntax `parametric method syntax BufferedOutputStream{T}(sink::T, bufsize::Integer = default_buffer_size)` around C:\Users\tbeason\.julia\v0.7\BufferedStreams\src\bufferedoutputstream.jl:31.
│ Use `BufferedOutputStream(sink::T, bufsize::Integer = default_buffer_size) where T` instead.
└ @ nothing bufferedoutputstream.jl:31
┌ Warning: Deprecated syntax `parametric method syntax Base.show{T}(io::IO, stream::BufferedOutputStream{T})` around C:\Users\tbeason\.julia\v0.7\BufferedStreams\src\bufferedoutputstream.jl:38.
│ Use `Base.show(io::IO, stream::BufferedOutputStream{T}) where T` instead.
└ @ nothing bufferedoutputstream.jl:38
┌ Warning: Deprecated syntax `immutable` at C:\Users\tbeason\.julia\v0.7\BufferedStreams\src\emptystream.jl:8.
│ Use `struct` instead.
└ @ nothing emptystream.jl:8
WARNING: Base.Void is deprecated, use Nothing instead.
  likely near C:\Users\tbeason\.julia\v0.7\BufferedStreams\src\emptystream.jl:121
WARNING: Base.Void is deprecated, use Nothing instead.
  likely near C:\Users\tbeason\.julia\v0.7\BufferedStreams\src\emptystream.jl:121
WARNING: Base.Void is deprecated, use Nothing instead.
  likely near C:\Users\tbeason\.julia\v0.7\BufferedStreams\src\io.jl:16
WARNING: Base.Void is deprecated, use Nothing instead.
  likely near C:\Users\tbeason\.julia\v0.7\BufferedStreams\src\io.jl:16
┌ Warning: Deprecated syntax `type` at C:\Users\tbeason\.julia\v0.7\Libz\src\lowlevel.jl:62.
│ Use `mutable struct` instead.
└ @ nothing lowlevel.jl:62
┌ Warning: `is_windows` is deprecated, use `Sys.iswindows` instead.
│   caller = top-level scope
└ @ Core :0
WARNING: importing deprecated binding Base.Void into Libz.
WARNING: Base.Void is deprecated, use Nothing instead.
  likely near C:\Users\tbeason\.julia\v0.7\Libz\src\lowlevel.jl:62
WARNING: Base.Void is deprecated, use Nothing instead.
  likely near C:\Users\tbeason\.julia\v0.7\Libz\src\lowlevel.jl:62
WARNING: Base.Void is deprecated, use Nothing instead.
  likely near C:\Users\tbeason\.julia\v0.7\Libz\src\lowlevel.jl:62
WARNING: Base.Void is deprecated, use Nothing instead.
  likely near C:\Users\tbeason\.julia\v0.7\Libz\src\lowlevel.jl:62
ERROR: LoadError: LoadError: error compiling version: could not load library "zlib1"
The specified module could not be found.

Stacktrace:
 [1] top-level scope
 [2] include(::Module, ::String) at .\boot.jl:292
 [3] include_relative(::Module, ::String) at .\loading.jl:1012
 [4] include at .\sysimg.jl:26 [inlined]
 [5] include(::String) at C:\Users\tbeason\.julia\v0.7\Libz\src\Libz.jl:3
 [6] top-level scope
 [7] include(::Module, ::String) at .\boot.jl:292
 [8] include_relative(::Module, ::String) at .\loading.jl:1012
 [9] include(::Module, ::String) at .\sysimg.jl:26
 [10] top-level scope
 [11] eval at .\boot.jl:295 [inlined]
 [12] top-level scope at .\<missing>:3
in expression starting at C:\Users\tbeason\.julia\v0.7\Libz\src\lowlevel.jl:110
in expression starting at C:\Users\tbeason\.julia\v0.7\Libz\src\Libz.jl:11
ERROR: LoadError: Failed to precompile Libz to C:\Users\tbeason\.julia\lib\v0.7\Libz.ji.
Stacktrace:
 [1] error at .\error.jl:33 [inlined]
 [2] compilecache(::Base.PkgId) at .\loading.jl:1157
 [3] _require(::Base.PkgId) at .\loading.jl:920
 [4] require(::Module, ::Symbol) at .\loading.jl:820
 [5] include(::Module, ::String) at .\boot.jl:292
 [6] include_relative(::Module, ::String) at .\loading.jl:1012
 [7] include(::Module, ::String) at .\sysimg.jl:26
 [8] top-level scope
 [9] eval at .\boot.jl:295 [inlined]
 [10] top-level scope at .\<missing>:3
in expression starting at C:\Users\tbeason\.julia\v0.7\WinRPM\src\WinRPM.jl:12
┌ Error: ------------------------------------------------------------# Build failed for WinRPM
│   exception =
│    LoadError: Failed to precompile WinRPM to C:\Users\tbeason\.julia\lib\v0.7\WinRPM.ji.
│    Stacktrace:
│     [1] error at .\error.jl:33 [inlined]
│     [2] compilecache(::Base.PkgId) at .\loading.jl:1157
│     [3] _require(::Base.PkgId) at .\loading.jl:949
│     [4] require(::Module, ::Symbol) at .\loading.jl:820
│     [5] include(::Module, ::String) at .\boot.jl:292
│     [6] include_relative(::Module, ::String) at .\loading.jl:1012
│     [7] include at .\sysimg.jl:26 [inlined]
│     [8] include(::String) at .\loading.jl:1046
│     [9] top-level scope
│     [10] eval at .\boot.jl:295 [inlined]
│     [11] eval at .\sysimg.jl:71 [inlined]
│     [12] evalfile(::String, ::Array{String,1}) at .\loading.jl:1041 (repeats 2 times)
│     [13] #2 at .\none:15 [inlined]
│     [14] cd(::getfield(, Symbol("##2#5")){String}, ::String) at .\file.jl:59
│     [15] (::getfield(, Symbol("##1#3")))(::IOStream) at .\none:14
│     [16] #open#318(::Base.Iterators.IndexValue{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}, ::Function, ::getfield(, Symbol("##1#3")), ::String, ::Vararg{String,N} where N) at .\iostream.jl:369
│     [17] open(::Function, ::String, ::String) at .\iostream.jl:367
│     [18] top-level scope
│     [19] eval at .\boot.jl:295 [inlined]
│     [20] eval(::Module, ::Expr) at .\sysimg.jl:71
│     [21] exec_options(::Base.JLOptions) at .\client.jl:309
│     [22] _start() at .\client.jl:447in expression starting at C:\Users\tbeason\.julia\v0.7\WinRPM\deps\build.jl:1
└ @ Main none:18
┌ Warning: ------------------------------------------------------------# Build error summary
│
│ WinRPM had build errors.
│
│  - packages with build errors remain installed in C:\Users\tbeason\.julia\v0.7- build the package(s) and all dependencies with `Pkg.build("WinRPM")`- build a single package by running its `deps/build.jl` script
└ @ Pkg.Entry entry.jl:651
@tkelman
Copy link
Contributor

tkelman commented Feb 1, 2018

source build of julia or did you install from a nightly binary?

@tbeason
Copy link
Contributor Author

tbeason commented Feb 1, 2018

Both, actually. I tried a nightly build last week and had this problem, built from source last night and still have the issue.

@tkelman
Copy link
Contributor

tkelman commented Feb 1, 2018

nightly binaries should have a bundled zlib. for a source build you need to do make win-extras binary-dist and use that installer for packages like this one to work

@tbeason
Copy link
Contributor Author

tbeason commented Feb 1, 2018

Alright, did that. Still have an error, but a new one this time. JULIA_HOME not defined.

julia> Pkg.build("WinRPM")
WARNING: Base.Pkg is deprecated, run `using Pkg` instead.
 in module Main
[ Info: Building WinRPM
WARNING: importing deprecated binding Base.Void into WinRPM.
WARNING: Base.Void is deprecated, use Nothing instead.
  likely near C:\Users\tbeason\.julia\v0.7\WinRPM\src\WinRPM.jl:55
WARNING: Base.Void is deprecated, use Nothing instead.
  likely near C:\Users\tbeason\.julia\v0.7\WinRPM\src\WinRPM.jl:55
WARNING: Base.Void is deprecated, use Nothing instead.
  likely near C:\Users\tbeason\.julia\v0.7\WinRPM\src\WinRPM.jl:128
WARNING: Base.Void is deprecated, use Nothing instead.
  likely near C:\Users\tbeason\.julia\v0.7\WinRPM\src\WinRPM.jl:128
WARNING: Base.Void is deprecated, use Nothing instead.
  likely near C:\Users\tbeason\.julia\v0.7\WinRPM\src\WinRPM.jl:128
in consume_function at C:\Users\tbeason\.julia\v0.7\LibExpat\src\xpath.jl
┌ Warning: `nb_available` is deprecated, use `bytesavailable` instead.
│   caller = xpath_parse_expr(::String, ::Int64, ::Int64, ::Bool) at xpath.jl:473
└ @ LibExpat xpath.jl:473
┌ Warning: `nb_available` is deprecated, use `bytesavailable` instead.
│   caller = xpath_parse_expr(::String, ::Int64, ::Int64, ::Bool) at xpath.jl:463
└ @ LibExpat xpath.jl:463
┌ Warning: `nb_available` is deprecated, use `bytesavailable` instead.
│   caller = xpath_parse_expr(::String, ::Int64, ::Int64, ::Bool) at xpath.jl:428
└ @ LibExpat xpath.jl:428
┌ Warning: `isalnum(c::Char)` is deprecated, use `isalpha(c) || isnumeric(c)` instead.
│   caller = xpath_parse_expr(::String, ::Int64, ::Int64, ::Bool) at xpath.jl:438
└ @ LibExpat xpath.jl:438
WARNING: Base.Void is deprecated, use Nothing instead.
  likely near C:\Users\tbeason\.julia\v0.7\WinRPM\src\WinRPM.jl:330
WARNING: Base.Void is deprecated, use Nothing instead.
  likely near C:\Users\tbeason\.julia\v0.7\WinRPM\src\WinRPM.jl:330
WARNING: Base.Void is deprecated, use Nothing instead.
  likely near C:\Users\tbeason\.julia\v0.7\WinRPM\src\WinRPM.jl:330
in consume_function at C:\Users\tbeason\.julia\v0.7\LibExpat\src\xpath.jl
┌ Warning: Loop variable `installed` around C:\Users\tbeason\.julia\v0.7\WinRPM\src\WinRPM.jl:424 overwrites a variable in an enclosing scope. In the future the variable will be local to the loop instead.
└ @ nothing WinRPM.jl:424
ERROR: LoadError: UndefVarError: JULIA_HOME not defined
Stacktrace:
 [1] top-level scope
 [2] include(::Module, ::String) at .\boot.jl:292
 [3] include_relative(::Module, ::String) at .\loading.jl:1012
 [4] include(::Module, ::String) at .\sysimg.jl:26
 [5] top-level scope
 [6] eval at .\boot.jl:295 [inlined]
 [7] top-level scope at .\<missing>:3
in expression starting at C:\Users\tbeason\.julia\v0.7\WinRPM\src\WinRPM.jl:449
┌ Error: ------------------------------------------------------------# Build failed for WinRPM
│   exception =
│    LoadError: Failed to precompile WinRPM to C:\Users\tbeason\.julia\lib\v0.7\WinRPM.ji.
│    Stacktrace:
│     [1] error at .\error.jl:33 [inlined]
│     [2] compilecache(::Base.PkgId) at .\loading.jl:1157
│     [3] _require(::Base.PkgId) at .\loading.jl:949
│     [4] require(::Module, ::Symbol) at .\loading.jl:820
│     [5] include(::Module, ::String) at .\boot.jl:292
│     [6] include_relative(::Module, ::String) at .\loading.jl:1012
│     [7] include at .\sysimg.jl:26 [inlined]
│     [8] include(::String) at .\loading.jl:1046
│     [9] top-level scope
│     [10] eval at .\boot.jl:295 [inlined]
│     [11] eval at .\sysimg.jl:71 [inlined]
│     [12] evalfile(::String, ::Array{String,1}) at .\loading.jl:1041 (repeats 2 times)
│     [13] #2 at .\none:15 [inlined]
│     [14] cd(::getfield(, Symbol("##2#5")){String}, ::String) at .\file.jl:59
│     [15] (::getfield(, Symbol("##1#3")))(::IOStream) at .\none:14
│     [16] #open#318(::Base.Iterators.IndexValue{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}, ::Function, ::getfield(, Symbol("##1#3")), ::String, ::Vararg{String,N} where N) at .\iostream.jl:369
│     [17] open(::Function, ::String, ::String) at .\iostream.jl:367
│     [18] top-level scope
│     [19] eval at .\boot.jl:295 [inlined]
│     [20] eval(::Module, ::Expr) at .\sysimg.jl:71
│     [21] exec_options(::Base.JLOptions) at .\client.jl:309
│     [22] _start() at .\client.jl:447in expression starting at C:\Users\tbeason\.julia\v0.7\WinRPM\deps\build.jl:1
└ @ Main none:18
┌ Warning: ------------------------------------------------------------# Build error summary
│
│ WinRPM had build errors.
│
│  - packages with build errors remain installed in C:\Users\tbeason\.julia\v0.7- build the package(s) and all dependencies with `Pkg.build("WinRPM")`- build a single package by running its `deps/build.jl` script
└ @ Pkg.Entry entry.jl:651

@tkelman
Copy link
Contributor

tkelman commented Feb 1, 2018

That really should have had a deprecation warning instead of being a hard break, but there's a new name for that variable that is probably available in Compat by now

@tbeason
Copy link
Contributor Author

tbeason commented Feb 1, 2018

You're right! I went on a limb and locally modified the WinRPM.jl to import BINDIR from Compat.Sys and replaced the line that used JULIA_HOME with BINDIR and the build succeeded.

@nalimilan
Copy link
Member

Would you make a pull request?

@tbeason
Copy link
Contributor Author

tbeason commented Feb 2, 2018

#136 created. First PR ever. 🥇

@RandomString123
Copy link
Contributor

Sweet! I was just running into this problem now also. I'll make the local change, but glad to know it is being fixed.

@kafisatz
Copy link

kafisatz commented Mar 13, 2018

I note that even when JULIA_HOME is defined, I get an error that it is not defined. See also here https://discourse.julialang.org/t/tips-for-updating-code-for-0-7/9427/9

Notably, I have not modified any of the code (as suggested by tbeason).

If the above PR 136 was merged, why do I still get this error (see discourse)?
I note that the nightly I am using is a few days old (it is from March 7 I think).

@nalimilan
Copy link
Member

That's because no WinRPM version has been tagged since the PR was merged. Use Pkg.checkout("WinRPM") to use git master.

@kafisatz
Copy link

Thanks. This does indeed solve my problem.
And thanks for teaching me something new. I can see that the most recent tag 0.3.1. had the latest commit on Dec 7 last year.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants