Page MenuHomeFreeBSD

pkgbase: remove incorrect clang shlib requires
Needs ReviewPublic

Authored by ifreund_freebsdfoundation.org on Tue, Jan 20, 11:24 AM.
Tags
None
Referenced Files
F142950222: D54792.diff
Sat, Jan 24, 9:49 PM
Unknown Object (File)
Thu, Jan 22, 5:50 PM
Unknown Object (File)
Thu, Jan 22, 5:29 PM
Unknown Object (File)
Thu, Jan 22, 4:18 PM
Unknown Object (File)
Tue, Jan 20, 4:45 PM
Unknown Object (File)
Tue, Jan 20, 1:41 PM
Unknown Object (File)
Tue, Jan 20, 1:07 PM
Unknown Object (File)
Tue, Jan 20, 12:18 PM
Subscribers

Details

Reviewers
emaste
bapt
Group Reviewers
pkgbase
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 Skipped
Unit
Tests Skipped
Build Status
Buildable 70012
Build 66895: arc lint + arc unit

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.