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

Shards regression in 0.18 #486

Closed
Octogonapus opened this issue Apr 22, 2024 · 1 comment · Fixed by #487
Closed

Shards regression in 0.18 #486

Octogonapus opened this issue Apr 22, 2024 · 1 comment · Fixed by #487

Comments

@Octogonapus
Copy link
Contributor

It looks like there was a shards regression introduced in v0.18. MWE:

julia> Clang.JLLEnvs.get_environment_info("armv7l-linux-gnueabihf")
ERROR: KeyError: key "GCCBootstrap-armv7l-linux-gnu.v4.8.5.x86_64-linux-musl.unpacked" not found
Stacktrace:
 [1] getindex
   @ ./dict.jl:498 [inlined]
 [2] get_environment_info(p::Base.BinaryPlatforms.Platform, version::VersionNumber)
   @ Clang.JLLEnvs ~/Documents/code/Clang.jl/src/platform/env.jl:42
 [3] get_environment_info
   @ ~/Documents/code/Clang.jl/src/platform/env.jl:46 [inlined]
 [4] get_environment_info(triple::String)
   @ Clang.JLLEnvs ~/Documents/code/Clang.jl/src/platform/env.jl:46
 [5] top-level scope
   @ REPL[8]:1

but on v0.17:

julia> Clang.JLLEnvs.get_environment_info("armv7l-linux-gnueabihf")
2-element Vector{@NamedTuple{id::String, url::String, chk::String}}:
 (id = "8829cc041d600db0e8623c301d4ae8906fa1f060", url = "https://github.com/JuliaPackaging/Yggdrasil/releases/download/GCCBootstrap-v4.8.5+3/GCCBootstrap-armv7l-linux-gnueabihf.v4.8.5.x86_64-linux-musl.unpacked.tar.gz", chk = "2e4b2d29bd1b608ad54d664f16b6d35003f1f29eca3242ccdcc096baf186b9b0")
 (id = "347b47a165098e5e8cbbe03f518757629137c006", url = "https://github.com/JuliaPackaging/Yggdrasil/releases/download/PlatformSupport-v2021.8.10/PlatformSupport-armv7l-linux-gnueabihf.v2021.8.10.x86_64-linux-musl.unpacked.tar.gz", chk = "093d3930e2b3c10775cc854fdda49aabfdd22afb60cb50dc08293a283dbefaf0")

Maybe a good test to add (based on my use case) is :

Clang.get_default_args.(Clang.JLLEnvs.JLL_ENV_TRIPLES)

just to make sure that doesn't error

@Gnimuc
Copy link
Member

Gnimuc commented Apr 23, 2024

function __triplet(p::Platform)
for k in keys(p.tags)
if k != "arch" && k != "os" && k != "libc"
delete!(p.tags, k)
end
end
t = triplet(p)
if os(p) == "macos" && arch(p) == "x86_64"
t *= "14"
elseif os(p) == "macos" && arch(p) == "aarch64"
t *= "20"
end
return t
end

The code base is a bit messy after merging with ClangCompiler.jl's shards implementation...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants