Page MenuHomeFreeBSD

pkgbase: remove incorrect clang shlib requires
ClosedPublic

Authored by ifreund_freebsdfoundation.org on Jan 20 2026, 11:24 AM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Apr 29, 3:48 AM
Unknown Object (File)
Tue, Apr 28, 12:13 AM
Unknown Object (File)
Tue, Apr 21, 8:19 PM
Unknown Object (File)
Tue, Apr 21, 8:30 AM
Unknown Object (File)
Tue, Apr 21, 7:13 AM
Unknown Object (File)
Mon, Apr 20, 5:47 PM
Unknown Object (File)
Mon, Apr 20, 5:47 PM
Unknown Object (File)
Sun, Apr 19, 7:42 AM

Details

Summary

The FreeBSD-clang package contains a 32-bit shared object at
/usr/lib/clang/19/lib/freebsd/libclang_rt.asan-i386.so

This is expected, since clang uses this object when compiling for i386
targets with asan enabled.

What is not expected is that the FreeBSD-clang package currently depends
on 32-bit libc packages due to pkg's shared library analysis, making it
impossible to install pkgbase on x86_64 without any lib32 packages.

This commit leverages a new pkg feature implemented in [1], but could
be landed before a pkg version including that feature is released
without any ill effects. Unknown keys in package manifests are ignored.

[1]: https://github.com/freebsd/pkg/pull/2594

Sponsored by: The FreeBSD Foundation

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Won’t that break the dependencies list if clang is itself 32-bit? This also introduces a new hard-coding of the set of compat libraries rather than using _ALL_libcompats.

Won’t that break the dependencies list if clang is itself 32-bit?

No, it shouldn't break when building src for a 32-bit target. The :32 is appended by pkg only when pkg config ABI is amd64, aarch64, or powerpc64 and it finds a shared library for the corresponding 32-bit architecture. On a fully 32-bit system there would be no :32.

This also introduces a new hard-coding of the set of compat libraries rather than using _ALL_libcompats.

Upstream pkg does not know about _All_libcompats and only supports detecting and handling 32-bit and linux compat libraries separately. Support for differentiating libraries for other libcompats would need to be implemented in upstream pkg.

The new pkg feature used by this patch was released in pkg 2.6.0 on March 3rd. I think this is ready to land.

this seems reasonable, and these lib32 issues are annoying, so i'd like to land this.

release/packages/ucl/clang.ucl
9–14

please add a blank line to separate the two blocks here

This revision is now accepted and ready to land.Thu, Apr 9, 12:26 PM

Please make sure this lands soon so it can be MFCed into stable/15 -- I'd like to revert my workarounds in 15.1.

This revision now requires review to proceed.Mon, Apr 13, 9:43 AM

Please make sure this lands soon so it can be MFCed into stable/15 -- I'd like to revert my workarounds in 15.1.

I am not a committer so I cannot land this myself but will ping Ed.

Any committer should feel free to land this though, my git branch is here: https://github.com/ifreund/freebsd-src/tree/clang-lib32-fix

This revision was not accepted when it landed; it landed in state Needs Review.Mon, Apr 13, 7:37 PM
This revision was automatically updated to reflect the committed changes.