pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Recipe to address cyclic deps for bulkbuild?



* On 2022-08-11 at 07:45 BST, Mayuresh wrote:

After setting `ccache' as PKGSRC_COMPILER for pbulk based builk builds,
came across a cyclic dependency between gmake and ccache.

Solved it by setting PKGSRC_COMPILER=gcc in gmake's Makefile.

But that sounds a bit ad-hoc to me. Looking for a way to at least do it in
mk.conf instead of the Makefile.

The way to do this is to ensure that any dependencies of your primary compiler are built with an external compiler, leaving everything else to be built with the pkgsrc gcc once it's ready.

I do this for our builds with this file included into mk.conf:

  https://github.com/TritonDataCenter/pkgbuild/blob/master/include/pkgsrc-gcc.mk

There's no way to do this generally within pkgsrc as there are too many variables to consider, and for our setup we still need some additional patches to correctly support things, but it's pretty easy to get it set up for your specific environment using similar logic.

Such ability will also be useful to, e.g., tweak MAKE_JOBS for certain
packages (say rust, though it's handled in the the package now, IMO it's
more flexible to leave it to individual setups).

This is already supported with MAKE_JOBS.${PKGPATH}, so add something like this to your mk.conf:

  MAKE_JOBS.lang/rust=	16

Cheers,

--
Jonathan Perkin   -   mnx.io   -   pkgsrc.smartos.org
Open Source Complete Cloud   www.tritondatacenter.com


Home | Main Index | Thread Index | Old Index