Skip to content
This repository was archived by the owner on Aug 16, 2023. It is now read-only.
This repository was archived by the owner on Aug 16, 2023. It is now read-only.

Relocatablility with PackageCompiler on Windows #206

Description

@MichaelHatherly

When relocating a binary build with PackageCompiler we're hitting the following error due to the prefix_path path not being writable (presumably?) caused by the use of @__DIR__ in

global_prefix = Prefix(joinpath(@__DIR__, "..", "global_prefix"))
.

PS C:\Users\non admin\AppData\Local\Pumas-v2.0.0-1\Julia-1.6.3\bin> pumas.exe
fatal: error thrown and no exception handler available.
InitError(mod=:BinaryProvider, error=Base.IOError(msg="mkdir("C:\\Users\\julia"; mode=0o777): permission denied (EACCES)", code=-4092))
uv_error at .\libuv.jl:97 [inlined]
#mkdir#7 at .\file.jl:179
mkdir##kw at .\file.jl:172 [inlined]
#mkpath#8 at .\file.jl:230
mkpath##kw at .\file.jl:225
#mkpath#8 at .\file.jl:228
mkpath##kw at .\file.jl:225
#mkpath#8 at .\file.jl:228
mkpath##kw at .\file.jl:225
#mkpath#8 at .\file.jl:228
mkpath##kw at .\file.jl:225
#mkpath#8 at .\file.jl:228
mkpath##kw at .\file.jl:225
#mkpath#8 at .\file.jl:228
mkpath at .\file.jl:225 [inlined]
Prefix at C:\Users\julia\.julia\packages\BinaryProvider\U2dKK\src\Prefix.jl:82 [inlined]
__init__ at C:\Users\julia\.julia\packages\BinaryProvider\U2dKK\src\BinaryProvider.jl:25
jfptr___init___172992.clone_1 at C:\Users\non admin\AppData\Local\Pumas-v2.0.0-1\Julia-1.6.3\lib\julia\sys.dll (unknown line)
jl_apply at /cygdrive/c/buildbot/worker/package_win64/build/src\julia.h:1703 [inlined]
jl_module_run_initializer at /cygdrive/c/buildbot/worker/package_win64/build/src\toplevel.c:72
_julia_init at /cygdrive/c/buildbot/worker/package_win64/build/src\init.c:794
repl_entrypoint at /cygdrive/c/buildbot/worker/package_win64/build/src\jlapi.c:696
mainCRTStartup at /cygdrive/c/buildbot/worker/package_win64/build/cli\loader_exe.c:51
BaseThreadInitThunk at C:\WINDOWS\System32\KERNEL32.DLL (unknown line)
RtlUserThreadStart at C:\WINDOWS\SYSTEM32\ntdll.dll (unknown line)
PS C:\Users\non admin\AppData\Local\Pumas-v2.0.0-1\Julia-1.6.3\bin>

Possible solution may be to use @get_scratch!("global_prefix") in place of joinpath(@__DIR__, "..", "global_prefix"), though I'm not 100% sure on whether there'd be non-obvious implications to doing that.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions