Skip to content

Commit 6e2e2d8

Browse files
maleadtclaude
andauthored
Fix bitrotted local builds of the support library. (#578)
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 <noreply@anthropic.com>
1 parent 8f44c47 commit 6e2e2d8

2 files changed

Lines changed: 29 additions & 0 deletions

File tree

deps/build_ci.jl

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,16 @@
11
using Pkg
2+
3+
# Conda.jl fails to precompile when its root environment directory has been removed
4+
# (e.g., by depot clean-up) while its deps.jl still points to it. Pre-create the
5+
# directory so that precompilation succeeds; Conda lazily re-installs itself on use.
6+
let deps_jl = joinpath(first(DEPOT_PATH), "conda", "deps.jl")
7+
if isfile(deps_jl)
8+
mod = Module()
9+
Base.include(mod, deps_jl)
10+
isdefined(mod, :ROOTENV) && mkpath(mod.ROOTENV)
11+
end
12+
end
13+
214
Pkg.activate(@__DIR__)
315
Pkg.instantiate()
416

deps/build_local.jl

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,18 @@
11
# build liboneapi_support with C wrappers for C++ APIs
22

33
using Pkg
4+
5+
# Conda.jl fails to precompile when its root environment directory has been removed
6+
# (e.g., by depot clean-up) while its deps.jl still points to it. Pre-create the
7+
# directory so that precompilation succeeds; Conda lazily re-installs itself on use.
8+
let deps_jl = joinpath(first(DEPOT_PATH), "conda", "deps.jl")
9+
if isfile(deps_jl)
10+
mod = Module()
11+
Base.include(mod, deps_jl)
12+
isdefined(mod, :ROOTENV) && mkpath(mod.ROOTENV)
13+
end
14+
end
15+
416
Pkg.activate(@__DIR__)
517
Pkg.instantiate()
618

@@ -38,6 +50,11 @@ if !isdir(Conda.ROOTENV)
3850
# Same as above
3951
Pkg.build("Conda")
4052
end
53+
54+
# make sure the CA roots used by conda's Python are up-to-date, as outdated certificates
55+
# otherwise result in SSL verification errors when accessing Intel's package repository
56+
Conda.add(["ca-certificates", "certifi"], Conda.ROOTENV)
57+
4158
if !isfile(joinpath(conda_dir, "condarc-julia.yml"))
4259
Conda.create(conda_dir)
4360
# conda#8850

0 commit comments

Comments
 (0)