# \[BinaryBuiler\] Mix of host and target libraries in host sysroot

**URL:** <https://discourse.julialang.org/t/binarybuiler-mix-of-host-and-target-libraries-in-host-sysroot/130470>\
**Category:** Tooling\
**Tags:** binarybuilder\
**Created:** [July 4, 2025, 11:03am UTC](https://discourse.julialang.org/t/binarybuiler-mix-of-host-and-target-libraries-in-host-sysroot/130470 "2025-07-04T11:03:51Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![grasph](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/grasph/32/25684_2.png) [@grasph](https://discourse.julialang.org/u/grasph)\
**Post date:** [July 4, 2025, 11:03am UTC](https://discourse.julialang.org/t/binarybuiler-mix-of-host-and-target-libraries-in-host-sysroot/130470/1 "2025-07-04T11:03:51Z")

</div>

Hello,

While trying to build `R/ROOT` for `arm` architectures, I’ve found that `/opt/x86_64-linux-musl/x86_64-linux-musl/sys-root/usr/local` points to `/workspace/destdir`. The results is that ` /opt/x86_64-linux-musl/x86_64-linux-musl/sys-root` file tree mixes libraries for the host (in `lib`) and libraries for the target (`local/lib`).

I would have expected to see under this sysroot only binaries compatible with the host.

On this other hands the libraries installed with HostDependency statements are not linked from this sysroot.

Why is it like this? Is it a bug or a feature?

Philippe.

---

<div class="post-metadata">

**Author:** ![giordano](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/giordano/32/2166_2.png) [@giordano](https://discourse.julialang.org/u/giordano)\
**Post date:** [July 4, 2025, 11:08am UTC](https://discourse.julialang.org/t/binarybuiler-mix-of-host-and-target-libraries-in-host-sysroot/130470/2 "2025-07-04T11:08:15Z")

</div>

That’s a symlink created automatically for all toolchains, if it creates problems you can just delete it. I think only CMake ever looks at that path, I never understood why.

---

<div class="post-metadata">

**Author:** ![grasph](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/grasph/32/25684_2.png) [@grasph](https://discourse.julialang.org/u/grasph)\
**Post date:** [July 4, 2025, 11:27am UTC](https://discourse.julialang.org/t/binarybuiler-mix-of-host-and-target-libraries-in-host-sysroot/130470/3 "2025-07-04T11:27:07Z")

</div>

ok. I have replaced it with a link to ` /workspace/x86_64-linux-musl-cxx11/destdir` .
