tech-toolchain archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: build.sh trying to write to source tree
Date: Tue, 3 Jun 2025 13:25:38 +0200
From: Edgar Fu�<ef%math.uni-bonn.de@localhost>
Message-ID: <20250603112536.GI513%trav.math.uni-bonn.de@localhost>
| Oops, that didn't exist (and ran build-sh -o).
That would do it.
| However, the error is still strange. Is there some undetected failure in an
| earlier cd command?
No, and while I personally consider it a defect, the way that OBDDIRS
work, is such that if the obj directory (any one of the whole set) doesn't
exist, the build system simply uses the relevant source directories instead.
That's actually convenient for when obj directories aren't intended to
be used (cd /usr/src/whatever/foo; make) but when they are (the OBJ*
variables are set) it would be better to error out when one doesn't
exist, than just build in the source directory -- when, like your case,
the source dir wasn't writable you get the error, which is why some of
us like to make a readonly null mount to cover the source directory, and
use that readonly mount as the source for the build -- it is almost
as good as an actual on point error message, but if the directory had
been writable, the build would have "worked" (writing into the src/tools/what
directory in this case) - but then later, if a build without -o was
done, and the objdir got built, you'd have a mess to clean up that can
sometimes be very difficult to diagnose (after all, you would never
have known that tools/what was built incorrectly - later that would
probably never get cleaned - and those old files can cause problems).
In general, any time you cvs update (or hg or git equivalents) you should
do the next build (at least) without -o to ensure that all needed objdirs
are built (and of course, for any clean (no -u, or other methods) build).
Using -o is fine when all you are doing is local src changes, and rebuilding,
in a way that isn't adding any new directories.
kre
Home |
Main Index |
Thread Index |
Old Index