I cannot precompile Approxfun because of StackOverflowError

Hi everyone,

I am completely new to Julia. I have tried to use the package Approxfun. I have no problem with its installation:

input:
import Pkg;
Pkg.add(“ApproxFun”)
Pkg.status()

output:
Resolving package versions…
Updating C:\Users\charlierch\.julia\environments\v1.0\Project.toml
[28f2ccd6] + ApproxFun v0.11.1
Updating C:\Users\charlierch\.julia\environments\v1.0\Manifest.toml
[621f4979] + AbstractFFTs v0.4.1
[28f2ccd6] + ApproxFun v0.11.1
[fbd15aa5] + ApproxFunBase v0.1.3
[59844689] + ApproxFunFourier v0.1.2
[b70543e2] + ApproxFunOrthogonalPolynomials v0.2.0
[f8fcb915] + ApproxFunSingularities v0.1.0
[aae01518] + BandedMatrices v0.9.3
[8e7c35d0] + BlockArrays v0.9.1
[ffab5731] + BlockBandedMatrices v0.4.4
[00ebfdb7] + CSTParser v0.6.1
[49dc2e85] + Calculus v0.5.0
[717857b8] + DSP v0.5.2
[5b8099bc] + DomainSets v0.1.0
[fa6b7ba4] + DualNumbers v0.6.2
[7a1cc6ca] + FFTW v0.2.4
[442a2c76] + FastGaussQuadrature v0.3.3
[057dd010] + FastTransforms v0.5.0
[1a297f60] + FillArrays v0.6.3
[7c893195] + HierarchicalMatrices v0.1.4
[4858937d] + InfiniteArrays v0.1.1
[8197267c] + IntervalSets v0.3.1
[5078a376] + LazyArrays v0.9.0
[898213cb] + LowRankApprox v0.2.3
[1914dd2f] + MacroTools v0.5.1
[a3b82374] + MatrixFactorizations v0.0.4
[4d1e1d77] + Nullables v0.0.8
[f27b6e38] + Polynomials v0.5.2
[92933f4c] + ProgressMeter v1.0.0
[c751599d] + ToeplitzMatrices v0.5.0
[0796e94c] + Tokenize v0.5.5
[9abbd945] + Profile
Status C:\Users\charlierch\.julia\environments\v1.0\Project.toml
[28f2ccd6] ApproxFun v0.11.1
[7073ff75] IJulia v1.14.1
[91a5bcdd] Plots v0.26.0
[276daf66] SpecialFunctions v0.7.2
[37e2e46d] LinearAlgebra

However I have a problem with “using ApproxFun”

input:
using ApproxFun

output:
┌ Info: Precompiling ApproxFun [28f2ccd6-bb30-5033-b560-165f7b14dc2f]
└ @ Base loading.jl:1192
ERROR: LoadError: LoadError: StackOverflowError:
in expression starting at C:\Users\charlierch.julia\packages\DomainSets\D8lcW\src\spaces\productspace.jl:107
in expression starting at C:\Users\charlierch.julia\packages\DomainSets\D8lcW\src\DomainSets.jl:152
ERROR: LoadError: Failed to precompile DomainSets [5b8099bc-c8ec-5219-889f-1d9e522a28bf] to C:\Users\charlierch.julia\compiled\v1.0\DomainSets\ksPnB.ji.
Stacktrace:
[1] error(::String) at .\error.jl:33
[2] macro expansion at .\logging.jl:311 [inlined]
[3] compilecache(::Base.PkgId, ::String) at .\loading.jl:1190
[4] macro expansion at .\logging.jl:309 [inlined]
[5] _require(::Base.PkgId) at .\loading.jl:947
[6] require(::Base.PkgId) at .\loading.jl:858
[7] macro expansion at .\logging.jl:309 [inlined]
[8] require(::Module, ::Symbol) at .\loading.jl:840
[9] include at .\boot.jl:317 [inlined]
[10] include_relative(::Module, ::String) at .\loading.jl:1044
[11] include(::Module, ::String) at .\sysimg.jl:29
[12] top-level scope at none:2
[13] eval at .\boot.jl:319 [inlined]
[14] eval(::Expr) at .\client.jl:393
[15] top-level scope at .\none:3
in expression starting at C:\Users\charlierch.julia\packages\ApproxFun\f2ab0\src\ApproxFun.jl:4

Failed to precompile ApproxFun [28f2ccd6-bb30-5033-b560-165f7b14dc2f] to C:\Users\charlierch.julia\compiled\v1.0\ApproxFun\jGqLz.ji.

Stacktrace:
[1] error(::String) at .\error.jl:33
[2] macro expansion at .\logging.jl:311 [inlined]
[3] compilecache(::Base.PkgId, ::String) at .\loading.jl:1190
[4] macro expansion at .\logging.jl:309 [inlined]
[5] _require(::Base.PkgId) at .\loading.jl:947
[6] require(::Base.PkgId) at .\loading.jl:858
[7] macro expansion at .\logging.jl:309 [inlined]
[8] require(::Module, ::Symbol) at .\loading.jl:840
[9] top-level scope at In[37]:1

It seems the StackOverflowError is related to DomainSets. I have no problem with the installation of this package separately:

input:
Pkg.add(“DomainSets”)
Pkg.status()

output:
Resolving package versions…
Updating C:\Users\charlierch\.julia\environments\v1.0\Project.toml
[5b8099bc] + DomainSets v0.1.0
Updating C:\Users\charlierch\.julia\environments\v1.0\Manifest.toml
[no changes]
Status C:\Users\charlierch\.julia\environments\v1.0\Project.toml
[28f2ccd6] ApproxFun v0.11.1
[5b8099bc] DomainSets v0.1.0
[7073ff75] IJulia v1.14.1
[91a5bcdd] Plots v0.26.0
[276daf66] SpecialFunctions v0.7.2
[37e2e46d] LinearAlgebra

But again I face the problem with “using DomainSets”

input:
using DomainSets

output:
┌ Info: Precompiling DomainSets [5b8099bc-c8ec-5219-889f-1d9e522a28bf]
└ @ Base loading.jl:1192
ERROR: LoadError: LoadError: StackOverflowError:
in expression starting at C:\Users\charlierch.julia\packages\DomainSets\D8lcW\src\spaces\productspace.jl:107
in expression starting at C:\Users\charlierch.julia\packages\DomainSets\D8lcW\src\DomainSets.jl:152

Failed to precompile DomainSets [5b8099bc-c8ec-5219-889f-1d9e522a28bf] to C:\Users\charlierch.julia\compiled\v1.0\DomainSets\ksPnB.ji.

Stacktrace:
[1] error(::String) at .\error.jl:33
[2] macro expansion at .\logging.jl:311 [inlined]
[3] compilecache(::Base.PkgId, ::String) at .\loading.jl:1190
[4] macro expansion at .\logging.jl:309 [inlined]
[5] _require(::Base.PkgId) at .\loading.jl:947
[6] require(::Base.PkgId) at .\loading.jl:858
[7] macro expansion at .\logging.jl:309 [inlined]
[8] require(::Module, ::Symbol) at .\loading.jl:840
[9] top-level scope at In[39]:1

Many thanks in advance for your help !

Questions:

  • which Julia version do you use?
  • how much RAM has your computer?
  • which operation system do you use?

No problems on my laptop, max. memory usage 3.7 GB, precompilation took quite some time (perhaps 5 min). I am using Ubuntu 18.04.

Thanks for the answer.

I am using Julia 1.0.2
My computer has 8,00 RAM
My operating system is Windows 7

It takes around 40 secondes to precompile ApproxFun (with an error though).

In the error messages I have written above, there is also
ERROR: LoadError: Failed to precompile DomainSets [5b8099bc-c8ec-5219-889f-1d9e522a28bf] to C:\Users\charlierch.julia\compiled\v1.0\DomainSets\ksPnB.ji.

But when I go in the folder Users\charlierch.julia\compiled\v1.0\DomainSets, there is no file at all. I guess I should have ksPnB.ji but there is nothing.

So if you remove ApproxFun:

]
rm ApproxFun

then add only DomainSets:

add DomainSets

and precompile it:

precompile

If you still get the same error message, create an issue for DomainSets.
https://github.com/JuliaApproximation/DomainSets.jl/issues

The author might be the one who can help best.

Yes I have already tried that, but the problem persists.

Ok I ll do that then, thanks for your help !