CSV compile error in Julia-1.0

I am trying to compile CSV on julia-1.0 on win 10 and the following error gets thrown. Am I doing something wrong?

┌ Info: Precompiling CSV [336ed68f-0bac-5ca0-87d4-7b16caf5d00b]
└ @ Base loading.jl:1186
ERROR: LoadError: LoadError: UndefVarError: T not defined
Stacktrace:
 [1] top-level scope at none:0
 [2] include at .\boot.jl:317 [inlined]
 [3] include_relative(::Module, ::String) at .\loading.jl:1038
 [4] include at .\sysimg.jl:29 [inlined]
 [5] include(::String) at C:\Users\chatura\.julia\packages\DataArrays\XA0R7\src\DataArrays.jl:3
 [6] top-level scope at none:0
 [7] include at .\boot.jl:317 [inlined]
 [8] include_relative(::Module, ::String) at .\loading.jl:1038
 [9] include(::Module, ::String) at .\sysimg.jl:29
 [10] top-level scope at none:2
 [11] eval at .\boot.jl:319 [inlined]
 [12] eval(::Expr) at .\client.jl:389
 [13] top-level scope at .\none:3
in expression starting at C:\Users\chatura\.julia\packages\DataArrays\XA0R7\src\natype.jl:64
in expression starting at C:\Users\chatura\.julia\packages\DataArrays\XA0R7\src\DataArrays.jl:58
ERROR: LoadError: Failed to precompile DataArrays [0fe7c1db-08c2-54a3-a222-6d1d3b7a471a] to C:\Users\chatura\.julia\compiled\v1.0\DataArrays\ZAWTY.ji.
Stacktrace:
 [1] error(::String) at .\error.jl:33
 [2] macro expansion at .\logging.jl:313 [inlined]
 [3] compilecache(::Base.PkgId, ::String) at .\loading.jl:1184
 [4] _require(::Base.PkgId) at .\logging.jl:311
 [5] require(::Base.PkgId) at .\loading.jl:852
 [6] macro expansion at .\logging.jl:311 [inlined]
 [7] require(::Module, ::Symbol) at .\loading.jl:834
 [8] include at .\boot.jl:317 [inlined]
 [9] include_relative(::Module, ::String) at .\loading.jl:1038
 [10] include(::Module, ::String) at .\sysimg.jl:29
 [11] top-level scope at none:2
 [12] eval at .\boot.jl:319 [inlined]
 [13] eval(::Expr) at .\client.jl:389
 [14] top-level scope at .\none:3
in expression starting at C:\Users\chatura\.julia\packages\DataFrames\sIu4Q\src\DataFrames.jl:14
ERROR: LoadError: LoadError: Failed to precompile DataFrames [a93c6f00-e57d-5684-b7b6-d8193f3e46c0] to C:\Users\chatura\.julia\compiled\v1.0\DataFrames\AR9oZ.ji.
Stacktrace:
 [1] error(::String) at .\error.jl:33
 [2] macro expansion at .\logging.jl:313 [inlined]
 [3] compilecache(::Base.PkgId, ::String) at .\loading.jl:1184
 [4] _require(::Base.PkgId) at .\logging.jl:311
 [5] require(::Base.PkgId) at .\loading.jl:852
 [6] macro expansion at .\logging.jl:311 [inlined]
 [7] require(::Module, ::Symbol) at .\loading.jl:834
 [8] include at .\boot.jl:317 [inlined]
 [9] include_relative(::Module, ::String) at .\loading.jl:1038
 [10] include at .\sysimg.jl:29 [inlined]
 [11] include(::String) at C:\Users\chatura\.julia\packages\CSV\nbNiU\src\CSV.jl:1
 [12] top-level scope at none:0
 [13] include at .\boot.jl:317 [inlined]
 [14] include_relative(::Module, ::String) at .\loading.jl:1038
 [15] include(::Module, ::String) at .\sysimg.jl:29
 [16] top-level scope at none:2
 [17] eval at .\boot.jl:319 [inlined]
 [18] eval(::Expr) at .\client.jl:389
 [19] top-level scope at .\none:3
in expression starting at C:\Users\chatura\.julia\packages\CSV\nbNiU\src\deprecated.jl:1
in expression starting at C:\Users\chatura\.julia\packages\CSV\nbNiU\src\CSV.jl:353
Failed to precompile CSV [336ed68f-0bac-5ca0-87d4-7b16caf5d00b] to C:\Users\chatura\.julia\compiled\v1.0\CSV\HHBkp.ji.

Stacktrace:
 [1] error(::String) at .\error.jl:33
 [2] macro expansion at .\logging.jl:313 [inlined]
 [3] compilecache(::Base.PkgId, ::String) at .\loading.jl:1184
 [4] macro expansion at .\logging.jl:311 [inlined]
 [5] _require(::Base.PkgId) at .\loading.jl:941
 [6] require(::Base.PkgId) at .\loading.jl:852
 [7] macro expansion at .\logging.jl:311 [inlined]
 [8] require(::Module, ::Symbol) at .\loading.jl:834
 [9] top-level scope at In[4]:1

It looks like you have a quite old version of CSV or DataFrames, since the new versions don’t depend on DataArrays. Can you post the output of ]status? You can also try updating them.

thanks
here in the status

(v1.0) pkg> status
Status C:\Users\chatura\.julia\environments\v1.0\Project.toml
[6e4b80f9] BenchmarkTools v0.4.1
[eaca7b4f] BuildExecutable v0.1.2
[336ed68f] CSV v0.4.0 #master (https://github.com/JuliaData/CSV.jl.git)
[5ae59095] Colors v0.9.4
[a93c6f00] DataFrames v0.10.1
[7806a523] DecisionTree v0.8.1
[7876af07] Example v0.5.1
[5789e2e9] FileIO v1.0.1
[f67ccb44] HDF5 v0.10.2
[7073ff75] IJulia v1.11.1
[4138dd39] JLD v0.8.3+ [C:\Users\chatura\.julia\dev\JLD]
[033835bb] JLD2 v0.1.2
[850e97f4] MachineLearning v0.0.3
[eadc2687] Pandas v1.0.1
[b98c9c47] Pipe v1.0.0
[91a5bcdd] Plots v0.20.2
[27ebfcd6] Primes v0.4.0
[438e738f] PyCall v1.18.4
[d330b81b] PyPlot v2.6.3
[d9b503ff] Regression v0.3.0
[3646fa90] ScikitLearn v0.3.0
[6e75b9c4] ScikitLearnBase v0.4.1
[9a3f8284] Random
[10745b16] Statistics

Subsequently i did this and the same error get thrown

(v1.0) pkg> build CSV
Building SpecialFunctions → C:\Users\chatura\.julia\packages\SpecialFunctions\KvXoO\deps\build.log

julia> using CSV
[ Info: Precompiling CSV [336ed68f-0bac-5ca0-87d4-7b16caf5d00b]
ERROR: LoadError: LoadError: UndefVarError: T not defined
Stacktrace:
[1] top-level scope at none:0
[2] include at .\boot.jl:317 [inlined] …

Your package directory seems to be weirdly out of date. I would recommend removing all packages and starting fresh, which will ensure only 1.0-compatible package versions get installed.

1 Like

Thanks quinnj. I will do as suggested and inform the outcome.

Thanks quinnj. CSV is now compiling.

CSV@0.3.1 is working fine on my Win 10 PC with Julia 1.0. When I do package update it move to CSV@0.4.0 and removes InternedStrings package. However CSV fails to compile. I then revert back to CSV@0.3.1 (with InternedStrings package reinstalled) and its works fine.