JuliaTime / TimeZones.jl

IANA time zone database access for the Julia programming language
Other
86 stars 51 forks source link

1.9.0 breaks relocatability #393

Closed dalum closed 2 years ago

dalum commented 2 years ago

After the latest release, using sysimages built on our build agents, it seems that some paths have been baked in which are not relocatable. The reference to /root/.julia-1.7.3-1.0.0/ below are from the build agent environment, and prevents the sysimage from loading on another machine. Works fine with 1.8.0, so it seems related to https://github.com/JuliaTime/TimeZones.jl/pull/384.

fatal: error thrown and no exception handler available.
InitError(mod=:TZData, error=Base.IOError(msg="stat("/root/.julia-1.7.3-1.0.0/packages/TimeZones/2oXvO/src/JuliaProject.toml"): permission denied (EACCES)", code=-13))
uv_error at ./libuv.jl:97 [inlined]
stat at ./stat.jl:152
isfile at ./stat.jl:456 [inlined]
isfile_casesensitive at ./loading.jl:9 [inlined]
current_project at ./initdefs.jl:180
find_project_file at /root/.julia-1.7.3-1.0.0/packages/Scratch/8Fv6N/src/Scratch.jl:120
track_scratch_access at /root/.julia-1.7.3-1.0.0/packages/Scratch/8Fv6N/src/Scratch.jl:139
get_scratch! at /root/.julia-1.7.3-1.0.0/packages/Scratch/8Fv6N/src/Scratch.jl:217
unknown function (ip: 0x7f3cdab520ff)
macro expansion at /root/.julia-1.7.3-1.0.0/packages/Scratch/8Fv6N/src/Scratch.jl:283 [inlined]
_scratch_dir at /root/.julia-1.7.3-1.0.0/packages/TimeZones/2oXvO/src/TimeZones.jl:34 [inlined]
__init__ at /root/.julia-1.7.3-1.0.0/packages/TimeZones/2oXvO/src/tzdata/TZData.jl:20
omus commented 2 years ago

Thanks for reporting this.

omus commented 2 years ago

I've chatted with with @staticfloat about this and this does seem to be an issue only when using a relocated sysimage and scratch spaces on versions of Julia before 1.8. The fix will be to correct the issue in Scratch.jl such that this failure can no longer occur on earlier versions of Julia.

staticfloat commented 2 years ago

@dalum can you try using the branch in https://github.com/JuliaPackaging/Scratch.jl/pull/30 and rebuild your system image to ensure that it fixes the issue?

dalum commented 2 years ago

Thanks! I'm about to head home, but running the full workflow now so will report back tomorrow.

dalum commented 2 years ago

@staticfloat Seems to be working here! :tada:

staticfloat commented 2 years ago

Great; new version of Scratch.jl getting pushed into General, so should be fixed live soon: https://github.com/JuliaRegistries/General/pull/64266