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

QuantEcon fails to precompile #323

Closed
VivMendes376 opened this issue Nov 12, 2019 · 6 comments
Closed

QuantEcon fails to precompile #323

VivMendes376 opened this issue Nov 12, 2019 · 6 comments

Comments

@VivMendes376
Copy link

I just typed "using QuantEcon" and got (Windows 10, Atom 1.41.0 x64, Julia1.2):

[ Info: Precompiling QuantEcon [fcd29c91-0bd7-5a09-975d-7ac3f643a60c]
WARNING: both FFTW and Util export "Frequencies"; uses of it in module Periodograms must be qualified
ERROR: LoadError: LoadError: UndefVarError: Frequencies not defined
Stacktrace:
[1] top-level scope at C:\Users\Utilizador.julia\packages\DSP\wwKNu\src\periodograms.jl:186
[2] include at .\boot.jl:328 [inlined]
[3] include_relative(::Module, ::String) at .\loading.jl:1094
[4] include at .\Base.jl:31 [inlined]
[5] include(::String) at C:\Users\Utilizador.julia\packages\DSP\wwKNu\src\DSP.jl:1
[6] top-level scope at C:\Users\Utilizador.julia\packages\DSP\wwKNu\src\DSP.jl:13
[7] include at .\boot.jl:328 [inlined]
[8] include_relative(::Module, ::String) at .\loading.jl:1094
[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:432
[13] top-level scope at .\none:3
in expression starting at C:\Users\Utilizador.julia\packages\DSP\wwKNu\src\periodograms.jl:186
in expression starting at C:\Users\Utilizador.julia\packages\DSP\wwKNu\src\DSP.jl:13
ERROR: LoadError: Failed to precompile DSP [717857b8-e6f2-59f4-9121-6e50c889abd2] to C:\Users\Utilizador.julia\compiled\v1.2\DSP\OtML7.ji.
Stacktrace:
[1] error(::String) at .\error.jl:33
[2] compilecache(::Base.PkgId, ::String) at .\loading.jl:1253
[3] _require(::Base.PkgId) at .\loading.jl:1013
[4] require(::Base.PkgId) at .\loading.jl:911
[5] require(::Module, ::Symbol) at .\loading.jl:906
[6] include at .\boot.jl:328 [inlined]
[7] include_relative(::Module, ::String) at .\loading.jl:1094
[8] include(::Module, ::String) at .\Base.jl:31
[9] top-level scope at none:2
[10] eval at .\boot.jl:330 [inlined]
[11] eval(::Expr) at .\client.jl:432
[12] top-level scope at .\none:3
in expression starting at C:\Users\Utilizador.julia\packages\QuantEcon\vVeHL\src\QuantEcon.jl:12

In another computer (same OS, same Atom and same Julia), it works with no problems.

Help would be appreciated.

@VivMendes376
Copy link
Author

I tried to update DSP.jl and got this error:

(v1.2) pkg> add https://github.com/JuliaDSP/DSP.jl
Cloning git-repo https://github.com/JuliaDSP/DSP.jl
Updating git-repo https://github.com/JuliaDSP/DSP.jl
Updating git-repo https://github.com/JuliaDSP/DSP.jl
Resolving package versions...
ERROR: Unsatisfiable requirements detected for package SpecialFunctions [276daf66]:
SpecialFunctions [276daf66] log:
├─possible versions are: [0.7.0-0.7.2, 0.8.0] or uninstalled
├─restricted to versions 0.8.0-0.8 by DSP [717857b8], leaving only versions 0.8.0
│ └─DSP [717857b8] log:
│ ├─possible versions are: 0.6.1 or uninstalled
│ └─DSP [717857b8] is fixed to version 0.6.1
└─restricted by compatibility requirements with Distributions [31c24e10] to versions: 0.7.0-0.7.2 — no versions left
└─Distributions [31c24e10] log:
├─possible versions are: [0.16.0-0.16.4, 0.17.0, 0.18.0, 0.19.1-0.19.2, 0.20.0, 0.21.0-0.21.3, 0.21.5-0.21.7] or uninstalled
├─restricted to versions * by DCEGM [16d46822], leaving only versions [0.16.0-0.16.4, 0.17.0, 0.18.0, 0.19.1-0.19.2, 0.20.0, 0.21.0-0.21.3, 0.21.5-0.21.7]
│ └─DCEGM [16d46822] log:
│ ├─possible versions are: 0.1.0 or uninstalled
│ └─DCEGM [16d46822] is fixed to version 0.1.0
└─restricted to versions 0.20.0 by an explicit requirement, leaving only versions 0.20.0

@VivMendes376
Copy link
Author

Well, I tried to see if the problem was related to SpecialFunctions.jl, and got this error:

(v1.2) pkg> add https://github.com/JuliaDSP/DSP.jl
Cloning git-repo https://github.com/JuliaDSP/DSP.jl
Updating git-repo https://github.com/JuliaDSP/DSP.jl
Updating git-repo https://github.com/JuliaDSP/DSP.jl
Resolving package versions...
ERROR: Unsatisfiable requirements detected for package SpecialFunctions [276daf66]:
SpecialFunctions [276daf66] log:
├─possible versions are: [0.7.0-0.7.2, 0.8.0] or uninstalled
├─restricted to versions 0.8.0-0.8 by DSP [717857b8], leaving only versions 0.8.0
│ └─DSP [717857b8] log:
│ ├─possible versions are: 0.6.1 or uninstalled
│ └─DSP [717857b8] is fixed to version 0.6.1
└─restricted by compatibility requirements with Distributions [31c24e10] to versions: 0.7.0-0.7.2 — no versions left
└─Distributions [31c24e10] log:
├─possible versions are: [0.16.0-0.16.4, 0.17.0, 0.18.0, 0.19.1-0.19.2, 0.20.0, 0.21.0-0.21.3, 0.21.5-0.21.7] or uninstalled
├─restricted to versions * by DCEGM [16d46822], leaving only versions [0.16.0-0.16.4, 0.17.0, 0.18.0, 0.19.1-0.19.2, 0.20.0, 0.21.0-0.21.3, 0.21.5-0.21.7]
│ └─DCEGM [16d46822] log:
│ ├─possible versions are: 0.1.0 or uninstalled
│ └─DCEGM [16d46822] is fixed to version 0.1.0
└─restricted to versions 0.20.0 by an explicit requirement, leaving only versions 0.20.0

@VivMendes376
Copy link
Author

The problem does not look like being related to Distributions.jl. I have the same version in both computers.

@VivMendes376
Copy link
Author

Well apparently, the problem looks like being in fact related to Distributions.jl. I tried to add Distributions.jl and got this error: (in Windows 10, Atom 1.41.0 x64, Julia1.2)

(v1.2) pkg> add https://github.com/JuliaStats/Distributions.jl
Cloning git-repo https://github.com/JuliaStats/Distributions.jl
Updating git-repo https://github.com/JuliaStats/Distributions.jl
Updating git-repo https://github.com/JuliaStats/Distributions.jl
Resolving package versions...
ERROR: Unsatisfiable requirements detected for package SpecialFunctions [276daf66]:
SpecialFunctions [276daf66] log:
├─possible versions are: [0.7.0-0.7.2, 0.8.0] or uninstalled
├─restricted to versions 0.8.0-0.8 by Distributions [31c24e10], leaving only versions 0.8.0
│ └─Distributions [31c24e10] log:
│ ├─possible versions are: 0.21.7 or uninstalled
│ └─Distributions [31c24e10] is fixed to version 0.21.7
└─restricted to versions 0.7.2 by an explicit requirement — no versions left

@danmrc
Copy link

danmrc commented Nov 22, 2019

I have the same problem on a Linux machine. I do think that the issue is this:

WARNING: both FFTW and Util export "Frequencies"; uses of it in module Periodograms must be qualified

Here is a fix: go at the periodograms.jl (if you are on atom, just click on it and it will open), find all Frequencies and replace all of them by FFTW.Frequencies

This made QuantEcon compile fine here

galenlynch added a commit to galenlynch/General that referenced this issue Nov 23, 2019
This is another attempt at JuliaRegistries#5230, which was an attempt at fixing the breakage
caused by JuliaMath/AbstractFFTs.jl#26 (e.g. JuliaDSP/DSP.jl#320,
JuliaDSP/DSP.jl#323, JuliaDSP/DSP.jl#324). The underlying problem is that
JuliaMath/AbstractFFTs.jl#26 moved functions from DSP.jl to AbstractFFTs.jl,
requiring users to have versions of both of those packages either before that
change or after it. Because FFTW reexports AbstractFFTWs, users also have to
coordinate versions of DSP.jl and FFTW.jl.

This problem was fixed for the most recent versions of DSP.jl and
FFTW.jl (v0.6.1 and v1.1, respectively) by JuliaDSP/DSP.jl#322 and
JuliaMath/FFTW.jl#124. However, because earlier versions of FFTW do not have an
upper bound for its dependency on AbstractFFTs, and neither does DSP, Pkg cannot
currently tell that some combinations of versions for AsbtractFFTs and DSP.jl
are incompatible, which is causing users to experience issues even after the
problem was fixed for the most recent versions (JuliaDSP/DSP.jl#323,
JuliaDSP/DSP.jl#324).

Fixing the problem is made slightly more complicated because DSP does not
explicitly depend on AbstractFFTs, but instead DSP implicitly depends on
AbstractFFTs through FFTW's reexport of it, and in turn DSP explicitly depends
on FFTW.

To fix this problem, I have changed the Compat.toml for FFTW to place a upper
bound on AbstractFFTs, so that packages get a consistent interface when using
FFTW. I have also changed the Compat.toml for DSP, to avoid breakage caused by
AbstractFFTs v0.5 taking some functions that were previously defined in DSP.

In addition, the Compat.toml for DSP showed versions before 0.5.1 to be
compatible with Julia 1, which was inaccurate. I have therefore changed this
TOML table to restrict the DSP versions to the range that is compatible with
Julia 1.

I have tested that these changes work for the most recent versions of DSP and
FFTW, as well as older versions.
ararslan pushed a commit to JuliaRegistries/General that referenced this issue Nov 25, 2019
This is another attempt at #5230, which was an attempt at fixing the breakage
caused by JuliaMath/AbstractFFTs.jl#26 (e.g. JuliaDSP/DSP.jl#320,
JuliaDSP/DSP.jl#323, JuliaDSP/DSP.jl#324). The underlying problem is that
JuliaMath/AbstractFFTs.jl#26 moved functions from DSP.jl to AbstractFFTs.jl,
requiring users to have versions of both of those packages either before that
change or after it. Because FFTW reexports AbstractFFTWs, users also have to
coordinate versions of DSP.jl and FFTW.jl.

This problem was fixed for the most recent versions of DSP.jl and
FFTW.jl (v0.6.1 and v1.1, respectively) by JuliaDSP/DSP.jl#322 and
JuliaMath/FFTW.jl#124. However, because earlier versions of FFTW do not have an
upper bound for its dependency on AbstractFFTs, and neither does DSP, Pkg cannot
currently tell that some combinations of versions for AsbtractFFTs and DSP.jl
are incompatible, which is causing users to experience issues even after the
problem was fixed for the most recent versions (JuliaDSP/DSP.jl#323,
JuliaDSP/DSP.jl#324).

Fixing the problem is made slightly more complicated because DSP does not
explicitly depend on AbstractFFTs, but instead DSP implicitly depends on
AbstractFFTs through FFTW's reexport of it, and in turn DSP explicitly depends
on FFTW.

To fix this problem, I have changed the Compat.toml for FFTW to place a upper
bound on AbstractFFTs, so that packages get a consistent interface when using
FFTW. I have also changed the Compat.toml for DSP, to avoid breakage caused by
AbstractFFTs v0.5 taking some functions that were previously defined in DSP.

In addition, the Compat.toml for DSP showed versions before 0.5.1 to be
compatible with Julia 1, which was inaccurate. I have therefore changed this
TOML table to restrict the DSP versions to the range that is compatible with
Julia 1.

I have tested that these changes work for the most recent versions of DSP and
FFTW, as well as older versions.
@galenlynch
Copy link
Member

This should be fixed by JuliaRegistries/General#5778, and should resolve itself if you update your julia packages. If that doesn't fix it, please reopen this issue.

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

3 participants