pszufe / OpenStreetMapX.jl

OpenStreetMap (*.osm) support for Julia 1.0 and up
MIT License
123 stars 24 forks source link

Cannot precompile package using latest Julia version. #35

Closed david-vicente closed 4 years ago

david-vicente commented 4 years ago

I'm trying to use this package in Julia Version 1.5.1 but I'm getting compile errors.

julia> using OpenStreetMapX
[ Info: Precompiling OpenStreetMapX [86cd37e6-c0ff-550b-95fe-21d72c8d4fc9]
ERROR: LoadError: ArgumentError: Package OpenStreetMapX does not have DataStructures in its dependencies:
- If you have OpenStreetMapX checked out for development and have
  added DataStructures as a dependency but haven't updated your primary
  environment's manifest file, try `Pkg.resolve()`.
- Otherwise you may need to report an issue with OpenStreetMapX
Stacktrace:
 [1] require(::Module, ::Symbol) at ./loading.jl:906
 [2] include(::Function, ::Module, ::String) at ./Base.jl:380
 [3] include(::Module, ::String) at ./Base.jl:368
 [4] top-level scope at none:2
 [5] eval at ./boot.jl:331 [inlined]
 [6] eval(::Expr) at ./client.jl:467
 [7] top-level scope at ./none:3
in expression starting at /home/myuser/.julia/packages/OpenStreetMapX/aDvLe/src/OpenStreetMapX.jl:6
ERROR: Failed to precompile OpenStreetMapX [86cd37e6-c0ff-550b-95fe-21d72c8d4fc9] to /home/myuser/.julia/compiled/v1.5/OpenStreetMapX/3fbUy_OwQ1q.ji.
Stacktrace:
 [1] error(::String) at ./error.jl:33
 [2] compilecache(::Base.PkgId, ::String) at ./loading.jl:1305
 [3] _require(::Base.PkgId) at ./loading.jl:1030
 [4] require(::Base.PkgId) at ./loading.jl:928
 [5] require(::Module, ::Symbol) at ./loading.jl:923

With Julia Version 1.4.2 this does not happen though.

pszufe commented 4 years ago

what version of OpenStreetMapX and DataStructures you have. This can be checked via the st package manager command:

julia> using Pkg;pkg"st OpenStreetMapX"
Status `C:\JuliaPkg\Julia1.5.1\environments\v1.5\Project.toml`
  [86cd37e6] OpenStreetMapX v0.2.1
julia> using Pkg;pkg"st DataStructures"
Status `C:\JuliaPkg\Julia1.5.1\environments\v1.5\Project.toml`
  [864edb3b] DataStructures v0.17.20

I can see that there is a newer release of DataStructures. I will make a new release of OpenStreetMapX, but it should work with the current version too.

pszufe commented 4 years ago

It looks like LightGraphs which is the core library to represent maps in OpenStreetMapX has hard coded that it works only with DataStructures v0.17.20. So you need to have exactly that version of the package.

pszufe commented 4 years ago

Finally, I just have added unit tests for and you can see them here 1.5.1 https://travis-ci.org/github/pszufe/OpenStreetMapX.jl. Since they all pass on plain vanilla Julia it must be something specific to your conf. Maybe your Julia 1.5.1 uses the same JULIA_DEPOT_PATH as 1.4.2 and since they overlap it all crashes?

What would happen if you do export JULIA_DEPOT_PATH=/some/other/folder (or Windows set JULIA_DEPOT_PATH=c:\some\other\folder and than start 1.5.1 and try to install OpenStreetMapX?

david-vicente commented 4 years ago

I think I managed to fix it by

1) manually adding DataStructures, which installed version v0.18.6 2) running the update package manager command, which downgraded DataStructures to v0.17.20

pszufe commented 4 years ago

@4aHxKzD perhaps you could try to open an issue on LightGraphs to update DataStructures dependency.