From 5a0c973fa38c8e525bd7400b0f420fdee04b4b97 Mon Sep 17 00:00:00 2001 From: Tim Besard Date: Wed, 10 Jun 2026 17:02:10 +0200 Subject: [PATCH] Fix bitrotted local builds of the support library. Two issues prevented deps/build_ci.jl from building liboneapi_support: - Conda.jl fails to precompile when its root environment directory has been removed (e.g., by depot clean-up) while its deps.jl still points to it. Pre-create the directory before instantiating so that precompilation succeeds. - The CA roots bundled with old Conda root environments (certifi from 2022) do not validate the certificate chain currently used by Intel's package repository, making every package installation fail with CERTIFICATE_VERIFY_FAILED. Update ca-certificates/certifi first. Co-Authored-By: Claude Fable 5 --- deps/build_ci.jl | 12 ++++++++++++ deps/build_local.jl | 17 +++++++++++++++++ 2 files changed, 29 insertions(+) diff --git a/deps/build_ci.jl b/deps/build_ci.jl index 831872c8..fe48f222 100644 --- a/deps/build_ci.jl +++ b/deps/build_ci.jl @@ -1,4 +1,16 @@ using Pkg + +# Conda.jl fails to precompile when its root environment directory has been removed +# (e.g., by depot clean-up) while its deps.jl still points to it. Pre-create the +# directory so that precompilation succeeds; Conda lazily re-installs itself on use. +let deps_jl = joinpath(first(DEPOT_PATH), "conda", "deps.jl") + if isfile(deps_jl) + mod = Module() + Base.include(mod, deps_jl) + isdefined(mod, :ROOTENV) && mkpath(mod.ROOTENV) + end +end + Pkg.activate(@__DIR__) Pkg.instantiate() diff --git a/deps/build_local.jl b/deps/build_local.jl index c8ae4e33..f2d620e0 100644 --- a/deps/build_local.jl +++ b/deps/build_local.jl @@ -1,6 +1,18 @@ # build liboneapi_support with C wrappers for C++ APIs using Pkg + +# Conda.jl fails to precompile when its root environment directory has been removed +# (e.g., by depot clean-up) while its deps.jl still points to it. Pre-create the +# directory so that precompilation succeeds; Conda lazily re-installs itself on use. +let deps_jl = joinpath(first(DEPOT_PATH), "conda", "deps.jl") + if isfile(deps_jl) + mod = Module() + Base.include(mod, deps_jl) + isdefined(mod, :ROOTENV) && mkpath(mod.ROOTENV) + end +end + Pkg.activate(@__DIR__) Pkg.instantiate() @@ -38,6 +50,11 @@ if !isdir(Conda.ROOTENV) # Same as above Pkg.build("Conda") end + +# make sure the CA roots used by conda's Python are up-to-date, as outdated certificates +# otherwise result in SSL verification errors when accessing Intel's package repository +Conda.add(["ca-certificates", "certifi"], Conda.ROOTENV) + if !isfile(joinpath(conda_dir, "condarc-julia.yml")) Conda.create(conda_dir) # conda#8850