On 9/22/14 14:39, Alan Barrett wrote:
On Mon, 22 Sep 2014, bycn82 wrote:
On 9/22/14 1:12, Mindaugas Rasiukevicius wrote:
make: stopped in /usr/src/usr.sbin/npf/npfctl
I suspect that you have a corrupted source tree. Please take this
to current-users, not tech-kern.
Unlikely. I think he is just trying to build -current code on 6.x
system by manually invoking 'make' in the directory. Well, that is
not going to work: either build using ./build.sh or build on -current.
Your earlier messages showed some use of build.sh, so I incorrectly
assumed that you were still using build.sh.
Yes, I am trying build the npfctl from source by running "make" in
the npfctl folder, because I only want to get the npfctl command from
the source code. If it is not the correct to build the npfctl, then
can you please help to point out how to do it, I am new in NetBSD.
Just running "make" in the npfctl folder should work if you already
have an up to date installation of NetBSD, but it won't work if the
version of NetBSD that you are running is significantly older than the
version of NetBSD (or the version of npfctl) that you are trying to
build.
The recommended way to build NetBSD is with build.sh. See
src/BUILDING for instructions.
If you don't want to build the whole of NetBSD, but just npfctl, then
you will need something like this:
I think this is the correct way for me, just like "make buildworld"
1. Build tools.
cd src ; build.sh [options] tools
I recommend passing -m MACHINE, -T TOOLDIR, -O OBJDIR (or -M OBJDIR),
-D DESTDIR, and -R RELEASEDIR, as options to build.sh, because the
defaults are difficult to understand.
2. Create obj directories through out the src tree.
cd src ; ${TOOLDIR}/bin/nbmake-${MACHINE} obj
3. Install include files into ${DESTDIR}/include.
cd src ; ${TOOLDIR}/bin/nbmake-${MACHINE} includes
4. Build and install necessary libraries into ${DESTDIR}.
At least libc will be needed, and perhaps others too.
cd src/lib/libc ; ${TOOLDIR}/bin/nbmake-${MACHINE} build_install
5. Now you can build npfctl.
cd src/usr.sbin/npf/npfctl ; ${TOOLDIR}/bin/nbmake-${MACHINE} dependall
The above instructions should allow you to build a new version of
npfctl on an old version of NetBSD, but you probably won't be able to
run it, because it may depend on new features in libc; and you
probably won't be able to install a new version of libc with an old
kernel, because it may depend on new kernel interfaces.
I got the source from the CVS using below command ,
export CVSROOT="[email protected]:/cvsroot"
cd /usr
cvs checkout -A -P src
Am I using the correct command which can checkout the current
development version of the source?
That looks like the correct command.
However, the fact that "grep -R BPF_COP" didn't find the expected line
in src/sys/net/bpf.h suggests that it didn't work.
the development version is 7.99.1?
Yes.
--apb (Alan Barrett)