Skip to content

Commit 4d289ba

Browse files
authored
rework libstdcxx bounds
1 parent 9162abe commit 4d289ba

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

ci/matplotlib.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,13 @@ _compatible_libstdcxx_ng_versions = [
2525
(v"3.4.20", (">=4.9", "<5.1")),
2626
(v"3.4.19", (">=4.8.3", "<4.9")),
2727
]
28-
2928
libgcc = if Sys.islinux()
3029
# see discourse.julialang.org/t/glibcxx-version-not-found/82209/8
3130
# julia 1.8.3 is built with libstdc++.so.6.0.29, so we must restrict to this version (gcc 11.3.0, not gcc 12.2.0)
32-
max_minor_version = maximum(t -> Int(t[1].patch), _compatible_libstdcxx_ng_versions)
33-
_, hi = Dict(_compatible_libstdcxx_ng_versions)[Base.BinaryPlatforms.detect_libstdcxx_version(max_minor_version)]
34-
specs = ">=3.4,$hi" # NOTE: ignore lower bound for compatibility
31+
versions = Dict(_compatible_libstdcxx_ng_versions)
32+
lo, hi = extrema(keys(versions))
33+
_, ub = versions[Base.BinaryPlatforms.detect_libstdcxx_version(Int(hi.patch))]
34+
specs = ">=$(VersionNumber(lo.major, lo.minor)),$ub"
3535
("libgcc-ng$specs", "libstdcxx-ng$specs")
3636
else
3737
()

0 commit comments

Comments
 (0)