Skip to content
This repository has been archived by the owner on Nov 14, 2018. It is now read-only.

Precompile of Requests failing in Julia 0.4.2 #338

Closed
IanButterworth opened this issue Dec 10, 2015 · 12 comments
Closed

Precompile of Requests failing in Julia 0.4.2 #338

IanButterworth opened this issue Dec 10, 2015 · 12 comments

Comments

@IanButterworth
Copy link

I'm trying to load the following but I get stuck at Requests and hit the error below. DataStructures also gives me the same error if I reorder them in the using instruction
Any ideas?

using Compat, Requests, DataStructures, JSON, PyPlot, LsqFit, HypothesisTests

error:

INFO: Precompiling module Requests...
INFO: Recompiling stale cache file /opt/julia_packages/.julia/lib/v0.4/URIParser.ji for module URIParser.
ERROR: LoadError: unlink: read-only file system (EROFS)
in unlink at fs.jl:102
in rm at file.jl:59
in create_expr_cache at loading.jl:330
in recompile_stale at loading.jl:461
in _require_from_serialized at loading.jl:83
in _require_from_serialized at ./loading.jl:109
in require at ./loading.jl:219
in include at ./boot.jl:261
in include_from_node1 at ./loading.jl:304
[inlined code] from none:2
in anonymous at no file:0
in process_options at ./client.jl:257
in _start at ./client.jl:378
while loading /home/juser/.julia/v0.4/Requests/src/Requests.jl, in expression starting on line 11

@tanmaykm
Copy link
Member

Likely not a JuliaBox issue. This is what I see:

juser@juliabox:~$ /opt/julia-0.4/bin/julia                                                                                                                                                                                                
               _
   _       _ _(_)_     |  A fresh approach to technical computing                                                                                                                                                                         
  (_)     | (_) (_)    |  Documentation: http://docs.julialang.org                                                                                                                                                                        
   _ _   _| |_  __ _   |  Type "?help" for help.                                                                                                                                                                                          
  | | | | | | |/ _` |  |                                                                                                                                                                                                                  
  | | |_| | | | (_| |  |  Version 0.4.2 (2015-12-06 21:47 UTC)                                                                                                                                                                            
 _/ |\__'_|_|_|\__'_|  |  Official http://julialang.org/ release                                                                                                                                                                          
|__/                   |  x86_64-unknown-linux-gnu                                                                                                                                                                                        

julia> using Compat, Requests, DataStructures, JSON                                                                                                                                                                                       
INFO: Precompiling module Requests...                                                                                                                                                                                                     
INFO: Precompiling module DataStructures...                                                                                                                                                                                               

julia>                                                                                                                                                                                                                                          

@IanButterworth
Copy link
Author

Copying your check approach, I get the error. Could it be some irregularity in write permissions in my juliabox session? Or perhaps a space quota has been met? (my jb folder itself has very little data in it, but I don't know about temp files)
thanks

juser@juliabox:~$ /opt/julia-0.4/bin/julia                                                                                                                                      
INFO: Recompiling stale cache file /opt/julia_packages/.julia/lib/v0.4/Compat.ji for module Compat.                                                                             
               _
   _       _ _(_)_     |  A fresh approach to technical computing
  (_)     | (_) (_)    |  Documentation: http://docs.julialang.org
   _ _   _| |_  __ _   |  Type "?help" for help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 0.4.2 (2015-12-06 21:47 UTC)
 _/ |\__'_|_|_|\__'_|  |  Official http://julialang.org/ release
|__/                   |  x86_64-unknown-linux-gnu

julia> using Compat, Requests, DataStructures, JSON                                                                                                                             
INFO: Recompiling stale cache file /opt/julia_packages/.julia/lib/v0.4/Compat.ji for module Compat.                                                                             
ERROR: unlink: read-only file system (EROFS)                                                                                                                                    
 in unlink at fs.jl:102                                                                                                                                                         
 in rm at file.jl:59                                                                                                                                                            
 in create_expr_cache at loading.jl:330                                                                                                                                         
 in recompile_stale at loading.jl:461                                                                                                                                           
 in _require_from_serialized at loading.jl:83                                                                                                                                   
 in _require_from_serialized at ./loading.jl:109                                                                                                                                
 in require at ./loading.jl:219   

julia>

@tanmaykm
Copy link
Member

I'm not sure why it's trying to update /opt/julia_packages/.julia/lib/v0.4/Compat.ji. Shouldn't it be ~/.julia/lib/v0.4/Compat.ji?

Probably there are some locally installed packages that are stale? Does it help if you remove your locally installed packages?

mv ~/.julia ~/bkup

@IanButterworth
Copy link
Author

I removed locally installed packages and the issue went away, but I've figured out it returns after I add PyPlot.

using Compat, Requests, DataStructures, JSON
INFO: Precompiling module Requests...
INFO: Precompiling module DataStructures...

Pkg.add("PyPlot")
using Compat, Requests, DataStructures, JSON
INFO: Precompiling module Requests...
INFO: Recompiling stale cache file /opt/julia_packages/.julia/lib/v0.4/URIParser.ji for module URIParser.
ERROR: LoadError: unlink: read-only file system (EROFS)
 in unlink at fs.jl:102
 in rm at file.jl:59
 in create_expr_cache at loading.jl:330
 in recompile_stale at loading.jl:461
 in _require_from_serialized at loading.jl:83
 in _require_from_serialized at ./loading.jl:109
 in require at ./loading.jl:219
 in include at ./boot.jl:261
 in include_from_node1 at ./loading.jl:304
 [inlined code] from none:2
 in anonymous at no file:0
 in process_options at ./client.jl:257
 in _start at ./client.jl:378
while loading /opt/julia_packages/.julia/v0.4/Requests/src/Requests.jl, in expression starting on line 11

Edit: I've posted this to the PyPlot github

@ghost
Copy link

ghost commented Dec 11, 2015

i have the exact same problem.

@stevengj
Copy link

The problem seems to be that JuliaBox ships some precompiled cache files in a read-only directory /opt/julia_packages/.julia/lib/v0.4. If at some point it detects that the cache is stale and tries to recompile it, it fails.

This needs to be fixed in Julia itself—it shouldn't try to delete cache files from a read-only directory when recompiling.

Update: I've filed a Julia issue, see the link below:

@stevengj
Copy link

A workaround is to add

splice!(Base.LOAD_CACHE_PATH, 3)

to your .juliarc file on JuliaBox to remove the read-only cache directory from the search path. Or just run this manually before typing using Compat etc to rebuild the cache without using the read-only search path.

@IanButterworth
Copy link
Author

Thanks. The suggested workaround works for 0.4.2 (using echo 'splice!(Base.LOAD_CACHE_PATH, 3)' > ~/.juliarc.jl to insert the line into juliarc)

But apparently LOAD_CACHE_PATH isn't defined on launching Julia 0.3.12 so this fails

@stevengj
Copy link

@ianshmean, just do VERSION >= v"0.4" && splice!(Base.LOAD_CACHE_PATH, 3)

@IanButterworth
Copy link
Author

Fantastic, that works. Thanks.

@tanmaykm
Copy link
Member

Thanks @stevengj for looking into it.

@tanmaykm
Copy link
Member

Closed via JuliaLang/julia#14368
JuliaBox will have it with the next backport

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

No branches or pull requests

3 participants