I’m using Julia 1.8.4 on Github Codespaces. I’ve tried to install a couple of packages that I will need for my project, but some of them just won’t precompile.
I’ve done it in a macOS Mojave (10.14.3) and It wouldn’t work, and then on a Windows 11 and I can’t replicate the error message. However, I’m confused since I believe that Github Codespace is a sandbox and the OS should not make a difference.
Also, I’ve tried yesterday with the package
Continuum Arrays and it wouldn’t precompile, but today morning it precompiled just fine, but instead couldn’t precompile another package:
[ Info: Precompiling InfiniteLinearAlgebra [cde9dba0-b1de-11e9-2c62-0bab9446c55c]
ERROR: Failed to precompile InfiniteLinearAlgebra [cde9dba0-b1de-11e9-2c62-0bab9446c55c] to /home/vscode/.julia/compiled/v1.8/InfiniteLinearAlgebra/jl_dVfunj.
@ Base ./error.jl:35
 compilecache(pkg::Base.PkgId, path::String, internal_stderr::IO, internal_stdout::IO, keep_loaded_modules::Bool)
@ Base ./loading.jl:1707
@ ./loading.jl:1651 [inlined]
@ Base ./loading.jl:1337
@ Base ./loading.jl:1200
 macro expansion
@ ./loading.jl:1180 [inlined]
 macro expansion
@ ./lock.jl:223 [inlined]
 require(into::Module, mod::Symbol)
@ Base ./loading.jl:1144
There was an issue with pre-compilation of some packages on Windows in 1.8.4 which is fixed in 1.8.5 …
Just a guess, but could you potentially run out of memory in the container?
As I mentioned I’m having trouble on the macOS. But I will try to update Julia anyways
EDIT: I tried to update julia on the codespace, with no success. I would appreciate some help
Can you share your Projects.toml file and the number of cores and RAM you are using such that others can try to reproduce your problem? And are you using an Intel or ARM based MAC?
MacOS Mojave with processor 3.2 GHz Intel Core i7.
The github codespace is a 2-core 4GB RAM, 32GB of memory.
Try adding the package
ClassicalOrthogonalPolynomials, it apparently needs lots of packages and the probability of one of them not precompiling is closer to one.
I was able to get around this error by manually doing
Pkg.rm and then
Pkg.add on every package, but the solution is really annoying.
I’m not sure how to get the
Projects.toml file on Github Codespaces.
The packages are a bit memory crazy… 4GB may not be enohh
On Linux I would use zRAM in this case: Swapping with zRAM » Linux Magazine Not sure if that is available for MacOS…
Alternatively you could launch Julia with an option to use only one thread for pre-compilation: There is always
ENV["JULIA_NUM_PRECOMPILE_TASKS"] which can be set.
Btw is there a guide for getting Julia working on Codespaces?