diff --git a/src/auditor/dynamic_linkage.jl b/src/auditor/dynamic_linkage.jl index f30e26c2..5b16c8fd 100644 --- a/src/auditor/dynamic_linkage.jl +++ b/src/auditor/dynamic_linkage.jl @@ -460,7 +460,12 @@ function update_linkage(prefix::Prefix, platform::AbstractPlatform, path::Abstra end return rp end - add_rpath = rp -> `$install_name_tool -add_rpath $(rp) $(rel_path)` + add_rpath = rp -> begin + # Remove paths starting with `/workspace`: they will not work outisde of the + # build environment and only create noise when debugging. + startswith(rp, "/workspace") && return + `$install_name_tool -add_rpath $(rp) $(rel_path)` + end relink = (op, np) -> `$install_name_tool -change $(op) $(np) $(rel_path)` elseif Sys.islinux(platform) || Sys.isbsd(platform) normalize_rpath = rp -> begin diff --git a/test/auditing.jl b/test/auditing.jl index 7a3a248e..d324f01a 100644 --- a/test/auditing.jl +++ b/test/auditing.jl @@ -693,7 +693,11 @@ end libfoo_rpaths = Auditor._rpaths(joinpath(testdir, "lib", "libfoo.$(platform_dlext(platform))")) @test (Sys.isapple(platform) ? "@loader_path" : "\$ORIGIN") * "/qux" in libfoo_rpaths # Currently we don't filter out absolute rpaths for macOS libraries, no good. - @test length(libfoo_rpaths) == 1 broken=Sys.isapple(platform) + #TODO + if !(length(libfoo_rpaths) == 1) + @show libfoo_rpaths + end + @test length(libfoo_rpaths) == 1 end end