The installworld target makes a temporary copy of binaries to be used during the install. Libraries that they depend on are also included, found by using `ldd`. After commit 0913953c9ed0 ldd started listing preloaded objects, including [vdso], under a [preloaded] header. Stop parsing ldd output once we reach the preloaded section.
Details
Details
- Reviewers
kib markj cy - Commits
- rG7150099b3c84: installworld: handle ldd including preloaded objects
rG2a2ea0075dda: installworld: handle ldd including preloaded objects
rG645427e7951f: installworld: handle ldd including preloaded objects
rGe10026a406b2: installworld: handle ldd including preloaded objects
rGb3b462229f97: installworld: handle ldd including preloaded objects
Diff Detail
Diff Detail
- Lint
Lint Skipped - Unit
Tests Skipped
Event Timeline
Comment Actions
I see that.
Either:
1.multiple invocations of ldd (not preferred), or
- ignore everything between "[preloaded]" and the next line that contains /^\//, or
- simply ignore lines that begin with / or [ using awk
IMO options 1 & 2 are klunky. Option 3 is better but still inelegant, without overcomplicating it.
Comment Actions
I can put printing of the preloaded objects under the option/env var, but I did not wanted to do that.
Comment Actions
Further to my previous comment, I'm thinking:
libs=$$(ldd -f "%o %p\n" -f "%o %p\n" $$progs 2>/dev/null | \ awk '$$1 !~ /:$$/ && $$1 !~ /^\[.*\]/ {print}' | sort -u | \ while read line; do \ set -- $$line; \ if [ "$$2 $$3" != "not found" ]; then \ echo $$2; \ else \ echo "Required library $$1 not found." >&2; \ exit 1; \ fi; \ done); \
Or as a diff:
diff --git a/Makefile.inc1 b/Makefile.inc1 index 04c44d8e297b..2be0980e503d 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -1366,7 +1366,8 @@ distributeworld installworld stageworld: _installcheck_world .PHONY fi; \ done); \ if [ -z "${CROSSBUILD_HOST}" ] ; then \ - libs=$$(ldd -f "%o %p\n" -f "%o %p\n" $$progs 2>/dev/null | sort -u | \ + libs=$$(ldd -f "%o %p\n" -f "%o %p\n" $$progs 2>/dev/null | \ + awk '$$1 !~ /:$$/ && $$1 !~ /^\[.*\]/ {print}' | sort -u | \ while read line; do \ set -- $$line; \ if [ "$$2 $$3" != "not found" ]; then \
Makefile.inc1 | ||
---|---|---|
1373 | || -> -o for test(1) |
Comment Actions
This vdso thing happens when building releng/12.3 as well. Edit: I suppose it will happen on any older builds but this branch is at least still supported.