svccfg native build confused adjuncts
In illumos, we have two concepts:
ADJUNCT_PROTOwhich is used to specify where external libraries that are required for target software is.
NATIVE_ADJUCNTwhich is used to specify where to also look for software that is required for build-time tooling on the build host.
With these, we set
NATIVE_LIBS to indicate to the system what are libraries that exist, but come from either of those two sources. This is a bit confusing and should be cleaned up, but it has implications elsewhere. Now, the problem is that today the svccfg Makefile builds a native version and tries to look at whether the
ADJUNCT_PROTO value is set. If it doesn't have an ADJUNCT_PROTO it will set
NATIVE_LIBS. However, in the case of a native-build this means that if you have an
ADJUNCT_PROTO, but not a
NATIVE_ADJUNCT, then the build will fail because we'll try and trigger
-zassert-deflib even though we're building the native version of this an therefore will not be able to find them there.
While #14922 features the longer term plan here, in the short term we should make this consistent with everything else and set
NATIVE_LIBS correctly, while also going through and making it so that the actual headers we use are correctly going to the right proto area. Currently everything goes to the
ADJUNCT_PROTO which isn't correct.
Updated by Robert Mustacchi 3 months ago
I've tested this in a build-based fashion by doing a stock build with no adjuncts and a build with adjuncts. I did not have an environment with a separate native adjuncts here, but not with a native proto. I believe Dan has also gone through and tested on top of this with some gotchas for SmartOS that this uncovered, which also get back to the need for some future improvements in the adjunct / native area.
In addition, I did boot the bits that were build with this to ensure that we still had basic services and related from the native tools that build seed repositories and related.
Updated by Dan McDonald 3 months ago
Apparently the 4f9241761deff31c4840b1283ffc458661ee7dca commit didn't show up here. We can resolve this issue as it's in the gate now.
commit 4f9241761deff31c4840b1283ffc458661ee7dca Author: Robert Mustacchi <email@example.com> Date: Sat Aug 20 00:22:41 2022 +0000 14923 svccfg native build confused adjuncts Reviewed by: Gordon Ross <firstname.lastname@example.org> Reviewed by: Andy Fiddaman <email@example.com> Reviewed by: Dan McDonald <firstname.lastname@example.org> Approved by: Richard Lowe <email@example.com>