NetBSD-Users archive

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

Re: netbsd-9 build failed



    Date:        Wed, 18 Sep 2019 12:01:48 +0700
    From:        Gua Chung Lim <gua.chunglim%gmail.com@localhost>
    Message-ID:  <20190918050148.GD363%gmail.com@localhost>

  | I updated from netbsd-8, all contents in destdir were cleaned.

Just for reference, but cleaned how?

If you're relying on a non-update build to do that (that is, build.sh
without -u), it won't for shared libraries (usually) as they are
specifically not removed (so that if you have any old local software,
incluiding from pkgsrc, that you want to retain, and that software uses
that old library, it will still work - it is not safe in general to simply
use a different major version  of a library).

When you want to truly clean, the right way is
	rm -fr destdir
	mkdir destdir
if destdir is a directory in some filesystem, or
	umount destdir
	newfs <the device>
	mount <the device> destdir
if it is a partition of its own.
(in the latter case you can also, if you're careful
	cd destdir
	rm -fr .[A-z]* *
instead of umount/newfs/mount, but you still need to
check that everything is gone - and that way is a lot
slower.

The same can apply to the obj and tools directories, except
that stray files there usually (just usually, not always) do
no more harm than wasting some space.

  | What should it be?

The only possibility really is that your "clean" build was not
truly clean.

But there is no need to build anything again, the error is just
about extra files existing which should not.   The fix for that is
simply to remove them (or leave them).   They are reported as a
problem just in case the problem is not that the file exists when
it should not (or at least, was not supposed to be created by the
build) but in case the file was created by the build, but the meta
data for the build doesn't know that.  If that happens, and binary
(release) sets are made from the result, those files would be
missing, and the sets obtained would be incompletek.

The latter isn't the case here, so you don't really need to do anything
at all - or you can just delete the files if you prefer, or if you want
to be truly sure, delete everything in destdir (you can leave obj and
tools, so the subsequest build will be faster - use -u so you get an
update build instead of a "clean" one)>

I see this "problem" a lot, as I actually boot my destdir to test it, and
that results in files being added to /dev /var /etc /home, sometimes even
a complete /usr/src (etc) if I have used the resuting system to test
building itself) - there can be tens of thousands of "extra" files, until
I truly do a clean (as above) and start from absolutely nothing.

kre



Home | Main Index | Thread Index | Old Index