What’s wrong with this problem?
julia> versioninfo()
Julia Version 1.7.3
Commit 742b9abb4d (2022-05-06 12:58 UTC)
Platform Info:
OS: macOS (x86_64-apple-darwin21.4.0)
CPU: Apple M1
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-12.0.1 (ORCJIT, westmere)
Environment:
JULIA_NUM_THREADS = 8
julia> using CSV
[ Info: Precompiling CSV [336ed68f-0bac-5ca0-87d4-7b16caf5d00b]
ERROR: LoadError: UndefVarError: PosLen not defined
Stacktrace:
[1] top-level scope
@ ~/.julia/packages/WeakRefStrings/31nkb/src/poslenstrings.jl:6
[2] include(mod::Module, _path::String)
@ Base ./Base.jl:418
[3] include(x::String)
@ WeakRefStrings ~/.julia/packages/WeakRefStrings/31nkb/src/WeakRefStrings.jl:1
[4] top-level scope
@ ~/.julia/packages/WeakRefStrings/31nkb/src/WeakRefStrings.jl:547
[5] include
@ ./Base.jl:418 [inlined]
[6] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt64}}, source::String)
@ Base ./loading.jl:1318
[7] top-level scope
@ none:1
[8] eval
@ ./boot.jl:373 [inlined]
[9] eval(x::Expr)
@ Base.MainInclude ./client.jl:453
[10] top-level scope
@ none:1
in expression starting at /Users/zhangdeliang/.julia/packages/WeakRefStrings/31nkb/src/poslenstrings.jl:6
in expression starting at /Users/zhangdeliang/.julia/packages/WeakRefStrings/31nkb/src/WeakRefStrings.jl:1
ERROR: LoadError: Failed to precompile WeakRefStrings [ea10d353-3f73-51f8-a26c-33c1cb351aa5] to /Users/zhangdeliang/.julia/compiled/v1.7/WeakRefStrings/jl_Bd4T90.
Stacktrace:
[1] error(s::String)
@ Base ./error.jl:33
[2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::IO, internal_stdout::IO, ignore_loaded_modules::Bool)
@ Base ./loading.jl:1466
[3] compilecache(pkg::Base.PkgId, path::String)
@ Base ./loading.jl:1410
[4] _require(pkg::Base.PkgId)
@ Base ./loading.jl:1120
[5] require(uuidkey::Base.PkgId)
@ Base ./loading.jl:1013
[6] require(into::Module, mod::Symbol)
@ Base ./loading.jl:997
[7] include
@ ./Base.jl:418 [inlined]
[8] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt64}}, source::Nothing)
@ Base ./loading.jl:1318
[9] top-level scope
@ none:1
[10] eval
@ ./boot.jl:373 [inlined]
[11] eval(x::Expr)
@ Base.MainInclude ./client.jl:453
[12] top-level scope
@ none:1
in expression starting at /Users/zhangdeliang/.julia/packages/CSV/jFiCn/src/CSV.jl:1
ERROR: Failed to precompile CSV [336ed68f-0bac-5ca0-87d4-7b16caf5d00b] to /Users/zhangdeliang/.julia/compiled/v1.7/CSV/jl_VlbYFQ.
Stacktrace:
[1] error(s::String)
@ Base ./error.jl:33
[2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::IO, internal_stdout::IO, ignore_loaded_modules::Bool)
@ Base ./loading.jl:1466
[3] compilecache(pkg::Base.PkgId, path::String)
@ Base ./loading.jl:1410
[4] _require(pkg::Base.PkgId)
@ Base ./loading.jl:1120
[5] require(uuidkey::Base.PkgId)
@ Base ./loading.jl:1013
[6] require(into::Module, mod::Symbol)
@ Base ./loading.jl:997
what is the result of ] status
?
(test) pkg> st
Status `/Applications/julia/test/Project.toml`
[336ed68f] CSV v0.10.4
[a93c6f00] DataFrames v1.3.4
[1313f7d8] DataFramesMeta v0.11.0
[ce6b1742] RDatasets v0.7.7
I wonder if it is the problem of Mac M1.
1 Like
Sorry. This problem has not been solved.
julia> using CSV
[ Info: Precompiling CSV [336ed68f-0bac-5ca0-87d4-7b16caf5d00b]
ERROR: LoadError: UndefVarError: PosLen not defined
Stacktrace:
[1] top-level scope
@ ~/.julia/packages/WeakRefStrings/31nkb/src/poslenstrings.jl:6
[2] include(mod::Module, _path::String)
@ Base ./Base.jl:418
[3] include(x::String)
@ WeakRefStrings ~/.julia/packages/WeakRefStrings/31nkb/src/WeakRefStrings.jl:1
[4] top-level scope
@ ~/.julia/packages/WeakRefStrings/31nkb/src/WeakRefStrings.jl:547
[5] include
@ ./Base.jl:418 [inlined]
[6] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt64}}, source::String)
@ Base ./loading.jl:1318
[7] top-level scope
@ none:1
[8] eval
@ ./boot.jl:373 [inlined]
[9] eval(x::Expr)
@ Base.MainInclude ./client.jl:453
[10] top-level scope
@ none:1
in expression starting at /Users/zhangdeliang/.julia/packages/WeakRefStrings/31nkb/src/poslenstrings.jl:6
in expression starting at /Users/zhangdeliang/.julia/packages/WeakRefStrings/31nkb/src/WeakRefStrings.jl:1
ERROR: LoadError: Failed to precompile WeakRefStrings [ea10d353-3f73-51f8-a26c-33c1cb351aa5] to /Users/zhangdeliang/.julia/compiled/v1.7/WeakRefStrings/jl_X9fq47.
Stacktrace:
[1] error(s::String)
@ Base ./error.jl:33
[2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::IO, internal_stdout::IO, ignore_loaded_modules::Bool)
@ Base ./loading.jl:1466
[3] compilecache(pkg::Base.PkgId, path::String)
@ Base ./loading.jl:1410
[4] _require(pkg::Base.PkgId)
@ Base ./loading.jl:1120
[5] require(uuidkey::Base.PkgId)
@ Base ./loading.jl:1013
[6] require(into::Module, mod::Symbol)
@ Base ./loading.jl:997
[7] include
@ ./Base.jl:418 [inlined]
[8] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt64}}, source::Nothing)
@ Base ./loading.jl:1318
[9] top-level scope
@ none:1
[10] eval
@ ./boot.jl:373 [inlined]
[11] eval(x::Expr)
@ Base.MainInclude ./client.jl:453
[12] top-level scope
@ none:1
in expression starting at /Users/zhangdeliang/.julia/packages/CSV/jFiCn/src/CSV.jl:1
ERROR: Failed to precompile CSV [336ed68f-0bac-5ca0-87d4-7b16caf5d00b] to /Users/zhangdeliang/.julia/compiled/v1.7/CSV/jl_InlFfv.
Stacktrace:
[1] error(s::String)
@ Base ./error.jl:33
[2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::IO, internal_stdout::IO, ignore_loaded_modules::Bool)
@ Base ./loading.jl:1466
[3] compilecache(pkg::Base.PkgId, path::String)
@ Base ./loading.jl:1410
[4] _require(pkg::Base.PkgId)
@ Base ./loading.jl:1120
[5] require(uuidkey::Base.PkgId)
@ Base ./loading.jl:1013
[6] require(into::Module, mod::Symbol)
@ Base ./loading.jl:997
I find that if I run in Terminal, it works well.
julia> cd("/Applications/julia/test/")
(test) pkg> activate .
Activating project at `/Applications/julia/test`
julia> using CSV
julia> using DataFrames
But when I run in Atom REPL, it gets an error.
julia> cd("/Applications/julia/test/")
(@v1.7) pkg> activate .
Activating project at `/Applications/julia/test`
julia> using CSV
[ Info: Precompiling CSV [336ed68f-0bac-5ca0-87d4-7b16caf5d00b]
ERROR: LoadError: UndefVarError: PosLen not defined
Stacktrace:
So maybe it is the problem of Atom.
In vscode, it also works well.
Hmm, odd. Atom / Juno does somehow influence precompilation, but I’ve never quite understood how
@Raymond - do you use Atom? If yes - this is for sure Atom issue. Atom is not maintained and it is a known issue. Please switch to VS Code.
1 Like