Re: PERFORCE change 136345 for review (fwd)

View: New views
4 Messages — Rating Filter:   Alert me  

Parent Message unknown Re: PERFORCE change 136345 for review (fwd)

by Alec Kloss-6 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On 2008-02-27 11:54, Robert Watson wrote:

>
> Tomas,
>
> Following a CVS update from the Arla anoncvs, I needed the attached patch
> to build on FreeBSD.  I still have the following further local changes in
> my tree still:
>
> - Remove nnpfs_deb.h include from fs_local.h.
>
> - Add /usr/include to various paths so that machine/whatever.h includes
>   properly.
>
> - #ifdef NNPFS_DEBUG around local variables in nnpfs_lk_info to avoid unused
>   variables warning/error.
I've been playing with this some tonight.  My current thought about
dealing with the "machine/whatever.h" includes is to copy the
pertinent headers out of the kernel sources (via $SYS) at the same
time configure generates vnode_if.h.  Any thoughts about that
approach?  It's kinda unfortunate that these headers aren't inside
a machine/ directory in /sys;  then we could -I these directly from
/sys.  Does anyone have any idea how this used to work?

I haven't loked at the NNPFS_DEBUG related issues yet, but I will.  

--
Alec Kloss  alec@...   IM: angryspamhater@...
PGP key at http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xA241980E
"No Bunny!" -- Simon, from Frisky Dingo


attachment0 (194 bytes) Download Attachment

Re: PERFORCE change 136345 for review (fwd)

by Alec Kloss-6 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On 2008-02-28 22:17,  wrote:

> On 2008-02-27 11:54, Robert Watson wrote:
> >
> > Tomas,
> >
> > Following a CVS update from the Arla anoncvs, I needed the attached patch
> > to build on FreeBSD.  I still have the following further local changes in
> > my tree still:
> >
> > - Remove nnpfs_deb.h include from fs_local.h.
> >
> > - Add /usr/include to various paths so that machine/whatever.h includes
> >   properly.
> >
> > - #ifdef NNPFS_DEBUG around local variables in nnpfs_lk_info to avoid unused
> >   variables warning/error.
>
> I've been playing with this some tonight.  My current thought about
> dealing with the "machine/whatever.h" includes is to copy the
> pertinent headers out of the kernel sources (via $SYS) at the same
> time configure generates vnode_if.h.  Any thoughts about that
> approach?  It's kinda unfortunate that these headers aren't inside
> a machine/ directory in /sys;  then we could -I these directly from
> /sys.  Does anyone have any idea how this used to work?
>
> I haven't loked at the NNPFS_DEBUG related issues yet, but I will.  
Hrm.  I didn't have any problems building arla on -CURRENT after
creating my machine/ hack.  I suppose a symlink would be more
appropriate than a copy for that.  Robert, did you need your other
changes to get Arla to compile, or were there just warnings you
were itching to fix?  It's time to shovel snow, but I'll be back at
this tomorrow evening.  If we can come to an agreement on the
machine includes and the nnpfs_debug stuff, tomorrow night I should
be able to implement whatever we decide on and update the ports
accordingly.  After that, I guess it's send-pr time for arla and
the ports maintainers.   :)

(Oh yeah, my change is just this:

oldothello% diff -u cf/*.orig cf/bsd-header-vnode-if-h.m4
--- cf/bsd-header-vnode-if-h.m4.orig    2008-02-28
23:01:01.000000000 -0600
+++ cf/bsd-header-vnode-if-h.m4 2008-02-28 22:42:32.000000000 -0600
@@ -25,6 +25,7 @@
   awk -f $SYS/tools/vnode_if.awk $SYS/kern/vnode_if.src -h
   awk -f $SYS/tools/vnode_if.awk $SYS/kern/vnode_if.src -p
   awk -f $SYS/tools/vnode_if.awk $SYS/kern/vnode_if.src -q
+  ln -sf $SYS/$(uname -m)/include machine
 else
   AC_MSG_ERROR(unable to find any vnode_if script)
 fi
oldothello%
)

--
Alec Kloss  alec@...   IM: angryspamhater@...
PGP key at http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xA241980E
"No Bunny!" -- Simon, from Frisky Dingo


attachment0 (194 bytes) Download Attachment

Re: PERFORCE change 136345 for review (fwd)

by Tomas Olsson :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Thu, 2008-02-28 at 23:02 -0600, Alec Kloss wrote:
> +++ cf/bsd-header-vnode-if-h.m4 2008-02-28 22:42:32.000000000 -0600
> @@ -25,6 +25,7 @@
>    awk -f $SYS/tools/vnode_if.awk $SYS/kern/vnode_if.src -h
>    awk -f $SYS/tools/vnode_if.awk $SYS/kern/vnode_if.src -p
>    awk -f $SYS/tools/vnode_if.awk $SYS/kern/vnode_if.src -q
> +  ln -sf $SYS/$(uname -m)/include machine
>  else
>    AC_MSG_ERROR(unable to find any vnode_if script)
>  fi
Good idea, maybe an odd place to put it -- unexpected side effect given
the file/macro name. On the other hand, I have no idea where I would put
it.

The beautiful long term solution may be adding some kind of lightweight
'generate headers' target for the kernel build so external projects
don't need to reinvent the wheel? Or maybe arla is just a very strange
one.

NNPFS_DEBUG is (hopefully) taken care of.

/t

_______________________________________________
freebsd-afs@... mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-afs
To unsubscribe, send any mail to "freebsd-afs-unsubscribe@..."

Re: PERFORCE change 136345 for review (fwd)

by Alec Kloss-8 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On 2008-02-29 08:08, Tomas Olsson wrote:
> Good idea, maybe an odd place to put it -- unexpected side effect given
> the file/macro name. On the other hand, I have no idea where I would put
> it.

Putting it next to vnode_if.h seems to make sense.  Having
vnode_if.h where it is in arla seems a little odd.  I guess I'd
consider moving both down to somewhere like nnpfs/sys or
nnpfs/kernel or something.  But that's all pretty much just
cosmetics.

> The beautiful long term solution may be adding some kind of lightweight
> 'generate headers' target for the kernel build so external projects
> don't need to reinvent the wheel? Or maybe arla is just a very strange
> one.

Yeah, glancing at the kernel build itself, there's bold symlink
just like what I did;

lrwxr-xr-x  1 root  wheel  25 Jan 25 18:43 machine -> /usr/src/sys/i386/include

It would be nice if either the kernel sources would have
/usr/src/sys/i386/machine or /usr/src/sys/i386/include/machine
instead of ending in include *or* as you suggest a
make-kernel-headers in the kernel itself would be nice and it could
do the symlinking, vnode_if.awk'ing, etc. for people.  But if this
works for you, and Robert doesn't object, let's go with it.  

Robert, any thoughts?  And do you want me to take a whack at
merging nnpfs into the kernel build this weekend?  I'd be jumping
right into the deep end, but that's how you learn to swim, right?

--
Alec Kloss  alec@...   IM: angryspamhater@...
PGP key at http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xA241980E
"No Bunny!" -- Simon, from Frisky Dingo


attachment0 (194 bytes) Download Attachment