Summary: | relative paths given for 'MAKEOBJDIRPREFIX' make buildworld fail | ||
---|---|---|---|
Product: | Base System | Reporter: | tzxzan+cqw8r63qtfb5g |
Component: | bin | Assignee: | freebsd-bugs (Nobody) <bugs> |
Status: | Closed FIXED | ||
Severity: | Affects Only Me | CC: | emaste |
Priority: | --- | ||
Version: | Unspecified | ||
Hardware: | Any | ||
OS: | Any | ||
See Also: | https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=282737 |
Description
tzxzan+cqw8r63qtfb5g
2024-11-12 16:46:28 UTC
It happens with relative paths given for 'MAKEOBJDIRPREFIX': ... #MAKEOBJDIRPREFIX=$@/ /usr/bin/make -C mnt/src/ buildworld #MAKEOBJDIRPREFIX=$@/ /usr/bin/make -C mnt/src/ buildkernel ... Works if changed to absolute paths: ... MAKEOBJDIRPREFIX=$$(realpath ./)/$@/ /usr/bin/make -C mnt/src/ buildworld MAKEOBJDIRPREFIX=$$(realpath ./)/$@/ /usr/bin/make -C mnt/src/ buildkernel ... (These lines are from an in-house 'makefile' hence the '$$'s and '$@'s.) It is about building 10.4 from source, did not check with more recent -- and still supported -- versions. 10.x is long past EOL, of course, but this won't work on supported versions, either. MAKEOBJDIRPREFIX is (must be) set in the environment, and top-level buildworld/buildkernel invoke make in subdirectories, so it follows that relative paths can't be used in MAKEOBJDIRPREFIX. We should note in build(7) that it must be absolute. A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=75af1320f4b57fb568ec4f6df6171a0343953f4f commit 75af1320f4b57fb568ec4f6df6171a0343953f4f Author: Ed Maste <emaste@FreeBSD.org> AuthorDate: 2024-11-13 15:13:51 +0000 Commit: Ed Maste <emaste@FreeBSD.org> CommitDate: 2024-11-13 17:45:09 +0000 build: note that MAKEOBJDIRPREFIX must be absolute PR: 282711 Reviewed by: imp Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D47538 share/man/man7/build.7 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) It looks like supported versions already emit a more explicit error in this case, and the requirement for the path to be absolute is now included in the man page. A commit in branch stable/14 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=54efa38e255184f7f7862294666b017acb093a08 commit 54efa38e255184f7f7862294666b017acb093a08 Author: Ed Maste <emaste@FreeBSD.org> AuthorDate: 2024-11-13 15:13:51 +0000 Commit: Ed Maste <emaste@FreeBSD.org> CommitDate: 2024-11-16 14:59:22 +0000 build: Note paths that must be absolute PR: 282711 PR: 282737 Sponsored by: The FreeBSD Foundation (cherry picked from commit 75af1320f4b57fb568ec4f6df6171a0343953f4f) (cherry picked from commit 02dc158215a69c6439e5a0809e5f9c79e62c5fd1) share/man/man7/build.7 | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) A commit in branch stable/13 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=3c113ee25c20bdfc66d310e17451d17f4c1ddb92 commit 3c113ee25c20bdfc66d310e17451d17f4c1ddb92 Author: Ed Maste <emaste@FreeBSD.org> AuthorDate: 2024-11-13 15:13:51 +0000 Commit: Ed Maste <emaste@FreeBSD.org> CommitDate: 2024-11-16 15:01:41 +0000 build: Note paths that must be absolute PR: 282711 PR: 282737 Sponsored by: The FreeBSD Foundation (cherry picked from commit 75af1320f4b57fb568ec4f6df6171a0343953f4f) (cherry picked from commit 02dc158215a69c6439e5a0809e5f9c79e62c5fd1) (cherry picked from commit 54efa38e255184f7f7862294666b017acb093a08) share/man/man7/build.7 | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) |