From 19466af8146a6890bb859acb03c2bb3752480138 Mon Sep 17 00:00:00 2001 From: Ludovic Raess Date: Fri, 19 Jun 2026 09:43:50 +0200 Subject: [PATCH 1/2] Fix discovery on Ubuntu 26 --- src/discovery/utils.jl | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/discovery/utils.jl b/src/discovery/utils.jl index cd85d0bc3..f8a9041b5 100644 --- a/src/discovery/utils.jl +++ b/src/discovery/utils.jl @@ -9,6 +9,13 @@ function check_rocm_path(path::String) isfile(joinpath(path2, libname)) && @goto success path2 = joinpath(path, "lib64") isfile(joinpath(path2, libname)) && @goto success + # Check Debian/Ubuntu multiarch lib paths (e.g. /usr/lib/x86_64-linux-gnu) + if Sys.islinux() + for triplet in ("x86_64-linux-gnu", "aarch64-linux-gnu", "i386-linux-gnu") + path2 = joinpath(path, "lib", triplet) + isfile(joinpath(path2, libname)) && @goto success + end + end return "" @label success @@ -137,9 +144,10 @@ function find_ld_lld(rocm_path::String)::String run(pipeline(`$exp_ld_path -v`; stdout=tmpfile)) vstr = read(tmpfile, String) rm(tmpfile) - vstr = replace(vstr, "AMD " => "") - vstr_splits = split(vstr, ' ') - if VersionNumber(vstr_splits[2]) >= v"6.0.0" + # Match first version number in the output, e.g.: + # "AMD LLD 15.0.0 ..." or "Ubuntu LLD 21.0.0 ..." + m = match(r"(\d+\.\d+(?:\.\d+)?)", vstr) + if m !== nothing && VersionNumber(m.captures[1]) >= v"6.0.0" return exp_ld_path end catch From 5da2d37649363334728ba27ef8f9108355db079f Mon Sep 17 00:00:00 2001 From: Ludovic Raess Date: Fri, 19 Jun 2026 09:51:42 +0200 Subject: [PATCH 2/2] Format --- src/discovery/utils.jl | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/discovery/utils.jl b/src/discovery/utils.jl index f8a9041b5..11d1f6d0e 100644 --- a/src/discovery/utils.jl +++ b/src/discovery/utils.jl @@ -144,8 +144,7 @@ function find_ld_lld(rocm_path::String)::String run(pipeline(`$exp_ld_path -v`; stdout=tmpfile)) vstr = read(tmpfile, String) rm(tmpfile) - # Match first version number in the output, e.g.: - # "AMD LLD 15.0.0 ..." or "Ubuntu LLD 21.0.0 ..." + # Match first version number in the output, e.g. "AMD LLD 15.0.0 ..." or "Ubuntu LLD 21.0.0 ..." m = match(r"(\d+\.\d+(?:\.\d+)?)", vstr) if m !== nothing && VersionNumber(m.captures[1]) >= v"6.0.0" return exp_ld_path