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

Precompile fails on Julia 1.10 #201

Closed
gyansinha opened this issue Jan 2, 2024 · 5 comments
Closed

Precompile fails on Julia 1.10 #201

gyansinha opened this issue Jan 2, 2024 · 5 comments

Comments

@gyansinha
Copy link

I am getting this error:

Precompiling XGBoost
        Info Given XGBoost was explicitly requested, output will be shown live
ERROR: LoadError: InitError: could not load library "H:\.julia\artifacts\9de69a7df5f0b81262764769faecc016a035d55c\bin\xgboost.dll"
Access is denied.
Stacktrace:
  [1] dlopen(s::String, flags::UInt32; throw_error::Bool)
    @ Base.Libc.Libdl .\libdl.jl:117
  [2] dlopen(s::String, flags::UInt32)
    @ Base.Libc.Libdl .\libdl.jl:116
  [3] macro expansion
    @ H:\.julia\packages\JLLWrappers\pG9bm\src\products\library_generators.jl:63 [inlined]
  [4] __init__()
    @ XGBoost_jll H:\.julia\packages\XGBoost_jll\WE2Ec\src\wrappers\x86_64-w64-mingw32-cxx11.jl:10
....

I've checked the mode on that file in the artifacts directory and it says "ar" - haven't had issues before this version of either Julia or XGBoost.

julia> versioninfo()
Julia Version 1.10.0
Commit 3120989f39 (2023-12-25 18:01 UTC)
Build Info:
  Official https://julialang.org/ release
Platform Info:
  OS: Windows (x86_64-w64-mingw32)
  CPU: 6 × Intel(R) Xeon(R) Gold 6348 CPU @ 2.60GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-15.0.7 (ORCJIT, cascadelake)
  Threads: 1 on 6 virtual cores
Environment:
  JULIA_CONDAPKG_BACKEND = Null
  JULIA_DEPOT_PATH = H:\.julia
julia> Pkg.status("XGBoost")
Status `\\XXX$\User\XXX\.julia\environments\v1.10\Project.toml`
  [009559a3] XGBoost v2.5.1
@gyansinha
Copy link
Author

FWIW, I checked v2.5.1 on Linus with Julia 1.10 and it installs fine.

@ExpandingMan
Copy link
Collaborator

I can't reproduce on linux. Help from someone with access to windows will be needed.

In the meantime, just for the hell of it, can you try nuking your artifacts directory?

@tylerjthomas9
Copy link
Contributor

tylerjthomas9 commented Jan 2, 2024

I am unable to reproduce this on Windows. It sounds like your issue is similar to this one: https://discourse.julialang.org/t/windows-artifact-issue-access-denied-when-installing-plots-makie/103734.

Here is the relevant issue on the Julia GitHub:
JuliaLang/julia#52272

My install using a temp environment:

(@v1.10) pkg> activate --temp
  Activating new project at `C:\Users\XXXXXX\AppData\Local\Temp\jl_XFGzGj`

(jl_XFGzGj) pkg> add XGBoost
   Resolving package versions...
    Updating `C:\Users\XXXXXX\AppData\Local\Temp\jl_XFGzGj\Project.toml`
  [009559a3] + XGBoost v2.5.1
    Updating `C:\Users\XXXXXX\AppData\Local\Temp\jl_XFGzGj\Manifest.toml`
  [1520ce14] + AbstractTrees v0.4.4
  [fa961155] + CEnum v0.5.0
  [9a962f9c] + DataAPI v1.15.0
  [e2d170a0] + DataValueInterfaces v1.0.0
  [82899510] + IteratorInterfaceExtensions v1.0.0
  [692b3bcd] + JLLWrappers v1.5.0
  [0f8b85d8] + JSON3 v1.14.0
  [bac558e1] + OrderedCollections v1.6.3
  [69de0a69] + Parsers v2.8.1
  [aea7be01] + PrecompileTools v1.2.0
  [21216c6a] + Preferences v1.4.1
  [a0a7dd2c] + SparseMatricesCSR v0.6.7
  [856f2bd8] + StructTypes v1.10.0
  [3783bdb8] + TableTraits v1.0.1
  [bd369af6] + Tables v1.11.1
  [009559a3] + XGBoost v2.5.1
  [4ee394cb] + CUDA_Driver_jll v0.7.0+0
  [76a88914] + CUDA_Runtime_jll v0.11.0+0
  [1d63c593] + LLVMOpenMP_jll v15.0.7+0
  [a5c6f535] + XGBoost_jll v2.0.1+0
  [0dad84c5] + ArgTools v1.1.1
  [56f22d72] + Artifacts
  [2a0f44e3] + Base64
  [ade2ca70] + Dates
  [f43a241f] + Downloads v1.6.0
  [7b1f6079] + FileWatching
  [b77e0a4c] + InteractiveUtils
  [4af54fe1] + LazyArtifacts
  [b27032c2] + LibCURL v0.6.4
  [76f85450] + LibGit2
  [8f399da3] + Libdl
  [37e2e46d] + LinearAlgebra
  [56ddb016] + Logging
  [d6f4376e] + Markdown
  [a63ad114] + Mmap
  [ca575930] + NetworkOptions v1.2.0
  [44cfe95a] + Pkg v1.10.0
  [de0858da] + Printf
  [3fa0cd96] + REPL
  [9a3f8284] + Random
  [ea8e919c] + SHA v0.7.0
  [9e88b42a] + Serialization
  [6462fe0b] + Sockets
  [2f01184e] + SparseArrays v1.10.0
  [10745b16] + Statistics v1.10.0
  [4607b0f0] + SuiteSparse
  [fa267f1f] + TOML v1.0.3
  [a4e569a6] + Tar v1.10.0
  [cf7118a7] + UUIDs
  [4ec0a83e] + Unicode
  [e66e0078] + CompilerSupportLibraries_jll v1.0.5+1
  [deac9b47] + LibCURL_jll v8.4.0+0
  [e37daf67] + LibGit2_jll v1.6.4+0
  [29816b5a] + LibSSH2_jll v1.11.0+1
  [c8ffd9c3] + MbedTLS_jll v2.28.2+1
  [14a3606d] + MozillaCACerts_jll v2023.1.10
  [4536629a] + OpenBLAS_jll v0.3.23+2
  [bea87d4a] + SuiteSparse_jll v7.2.1+1
  [83775a58] + Zlib_jll v1.2.13+1
  [8e850b90] + libblastrampoline_jll v5.8.0+1
  [8e850ede] + nghttp2_jll v1.52.0+1
  [3f19e933] + p7zip_jll v17.4.0+2

(jl_XFGzGj) pkg> precompile

(jl_XFGzGj) pkg>

My versioninfo:

julia> versioninfo()
Julia Version 1.10.0
Commit 3120989f39 (2023-12-25 18:01 UTC)
Build Info:
  Official https://julialang.org/ release
Platform Info:
  OS: Windows (x86_64-w64-mingw32)
  CPU: 20 × 12th Gen Intel(R) Core(TM) i7-12700H
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-15.0.7 (ORCJIT, alderlake)
  Threads: 1 on 20 virtual cores

@gyansinha
Copy link
Author

I can't reproduce on linux. Help from someone with access to windows will be needed.

In the meantime, just for the hell of it, can you try nuking your artifacts directory?

How safe is it to nuke the artifacts directory?

@gyansinha
Copy link
Author

To close this out, I did get this working. To be honest, I still don't know what precisely got me there, but this is what I did:

  1. I deleted the XGBoost artifacts directory.
  2. I used the PkgCleanup.jl package to clean out the artifacts in the existing installation.
  3. Re-installed the XGBoost package.

I did get some weird errors in the pre-compiling phase, e.g, CategoricalArrays in my setup failed because somehow it got rolled back to an ancient version.

Regardless, thanks for your help and safe to say this probably is a Julia issue and nothing to do with XGBoost iteself.

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