Page MenuHomeFreeBSD

pkgbase: Move headers and libs out of runtime and utilities
ClosedPublic

Authored by dfr on Sep 11 2023, 3:11 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Oct 22, 8:28 AM
Unknown Object (File)
Tue, Oct 22, 3:34 AM
Unknown Object (File)
Oct 13 2024, 11:02 AM
Unknown Object (File)
Oct 13 2024, 11:02 AM
Unknown Object (File)
Oct 13 2024, 11:02 AM
Unknown Object (File)
Oct 13 2024, 11:01 AM
Unknown Object (File)
Oct 13 2024, 10:50 AM
Unknown Object (File)
Sep 8 2024, 9:30 PM

Details

Summary

Headers from src/include were in the runtime-dev package but
subdirectories of src/include ended up in utilities-dev by default.
Neither package is a good choice - the headers in src/include are not
useful without the libraries contained in clibs-dev.

This moves the standard C headers to clibs-dev (C++ headers are already
in this package). While working on this, I found that various clang
libraries and headers were also bundled into utilities-dev by default
so these are also moved to clang-dev.

I also added a FreeBSD-build-essential meta package to make it simple to
install all the toolchain parts.

PR: 254173

Diff Detail

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

Event Timeline

dfr requested review of this revision.Sep 11 2023, 3:11 PM

I'm not sure about the build-essential meta package, we wanted to avoid adding this kind of package since the begining because we wanted to add the notion of pkg groups (metapackage at the repository level) for this.
Otherwise the rest looks good.

In D41815#953113, @manu wrote:

I'm not sure about the build-essential meta package, we wanted to avoid adding this kind of package since the begining because we wanted to add the notion of pkg groups (metapackage at the repository level) for this.
Otherwise the rest looks good.

How do I create a pkg group? I just want a way to be able to install all the pieces to make 'clang hello-world.c' etc. work without having to remember to install libcompiler_rt-dev etc.

Why doesn’t clang-dev depend on everything you need to build C/C++ binaries?

Why doesn’t clang-dev depend on everything you need to build C/C++ binaries?

I'm not sure clang-dev is the right place - maybe clibs-dev?

In D41815#953115, @dfr wrote:
In D41815#953113, @manu wrote:

I'm not sure about the build-essential meta package, we wanted to avoid adding this kind of package since the begining because we wanted to add the notion of pkg groups (metapackage at the repository level) for this.
Otherwise the rest looks good.

How do I create a pkg group? I just want a way to be able to install all the pieces to make 'clang hello-world.c' etc. work without having to remember to install libcompiler_rt-dev etc.

It's not yet an available feature :(
But anyway, I don't think that we should start making metapackage for pkgbase.

Why doesn’t clang-dev depend on everything you need to build C/C++ binaries?

bug: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=254173

On reflection, it seems clear that lld, libcompiler_rt-dev and the new clang-dev are needed for any meaningful use of clang and should probably be dependencies of the FreeBSD-clang package. I would like to keep clibs-dev separate though - clang doesn't require these to be installed, e.g. for embedded development and conversely, clibs-dev could be used with some other compiler. I will remove the metapackage and add new dependencies to clang. This would allow installing a functional toolchain with just 'pkg install FreeBSD-clang FreeBSD-clibs-dev' which seems reasonable.

In D41815#953265, @dfr wrote:

On reflection, it seems clear that lld, libcompiler_rt-dev and the new clang-dev are needed for any meaningful use of clang and should probably be dependencies of the FreeBSD-clang package. I would like to keep clibs-dev separate though - clang doesn't require these to be installed, e.g. for embedded development and conversely, clibs-dev could be used with some other compiler. I will remove the metapackage and add new dependencies to clang. This would allow installing a functional toolchain with just 'pkg install FreeBSD-clang FreeBSD-clibs-dev' which seems reasonable.

I think so too, it would be good to be able to compile a full kernel/world without having to install any FreeBSD-clang package (using external toolchain), if that's not possible with your change it's ok, at least we will be closer to this goal.

Remove build-essential, moving its dependencies to clang (except for
clibs-dev as discussed). Also move crt*.o from utilities to clibs-dev to
allow linking programs without needing to install utilities.

This revision is now accepted and ready to land.Sep 12 2023, 11:13 AM

this would've been nice to MFC
bit late for the current release, but there's always a next one