Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to precompile in 1.0. LoadError: syntax: try without catch or finally #221

Closed
thehalfspace opened this issue Aug 16, 2018 · 3 comments

Comments

@thehalfspace
Copy link

I am unable to precompile JLD in Julia 1.0 version. It worked fine in 0.6.

I would have switched to JLD2, but JLD2 can't open JLD files, which I have a lot of.

v1.0 pkg> add JLD
  Updating registry at `~/.julia/registries/General`
  Updating git-repo `https://github.com/JuliaRegistries/General.git`
 Resolving package versions...
  Updating `~/.julia/environments/v1.0/Project.toml`
 [no changes]
  Updating `~/.julia/environments/v1.0/Manifest.toml`
 [no changes]
julia> using JLD
[ Info: Precompiling JLD [4138dd39-2aa7-5051-a626-17a0bb65d9c8]
ERROR: LoadError: syntax: try without catch or finally
Stacktrace:
 [1] include at ./boot.jl:317 [inlined]
 [2] include_relative(::Module, ::String) at ./loading.jl:1038
 [3] include(::Module, ::String) at ./sysimg.jl:29
 [4] top-level scope at none:2
 [5] eval at ./boot.jl:319 [inlined]
 [6] eval(::Expr) at ./client.jl:389
 [7] top-level scope at ./none:3
in expression starting at /Users/prithvithakur/.julia/packages/JLD/D7dpY/src/JLD.jl:999
ERROR: Failed to precompile JLD [4138dd39-2aa7-5051-a626-17a0bb65d9c8] to /Users/prithvithakur/.julia/compiled/v1.0/JLD/l8ijy.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
@rssdev10
Copy link

rssdev10 commented Aug 30, 2018

https://github.com/rssdev10/JLD.jl/tree/julia-1.0 - compilable and can be used if you need some basic functionality or stub only.
But package tests are not working.....

@rssdev10
Copy link

rssdev10 commented Sep 2, 2018

Next step: master...rssdev10:julia-1.0

ERROR: LoadError: LoadError: UndefRefError: access to undefined reference
Stacktrace:
 [1] getproperty(::Type, ::Symbol) at ./sysimg.jl:15
 [2] gen_jlconvert(::Any) at .julia/dev/JLD/src/jld_types.jl:518
 [3] #s27#8(::Any, ::Any, ::Any, ::Any, ::Any) at .julia/dev/JLD/src/jld_types.jl:559
 [4] (::Core.GeneratedFunctionStub)(::Any, ::Vararg{Any,N} where N) at ./boot.jl:506
 [5] read_scalar(::JLD.JldDataset, ::HDF5Datatype, ::Type) at .julia/dev/JLD/src/JLD.jl:404

The error in the code:

function gen_jlconvert(@nospecialize(T))
    typeinfo = JLCONVERT_INFO[T]::JldTypeInfo
    if isa(T, TupleType)
        return _gen_jlconvert_tuple(typeinfo, T)
    elseif isempty(fieldnames(T))
        if T.size == 0
            return T.instance
        else
           return :(_jlconvert_bits(T, ptr))
        end

return T.instance generates UndefRefError: access to undefined reference

Moreover, already Type{Int64}.instance generates same error. Any ideas?

@JeffBezanson
Copy link
Contributor

Fixed by #227.

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

No branches or pull requests

3 participants