Re: [Nbd] Re: Problems getting nbd-2.7.x to compile
- To: Auke Kok <auke@...19...>
- Cc: nbd-general@lists.sourceforge.net
- Subject: Re: [Nbd] Re: Problems getting nbd-2.7.x to compile
- From: Wouter Verhelst <wouter@...3...>
- Date: Tue, 29 Jun 2004 23:10:19 +0200
- Message-id: <1088543419.859.5.camel@...21...>
- In-reply-to: <40E021E7.80507@...19...>
- References: <40E021E7.80507@...19...>
Op ma 28-06-2004, om 15:49 schreef Auke Kok:
> Hi, just had some problems compiling nbd and found the appropriate
> thread on this list:
>
> : On Fri, Jun 18, 2004 at 12:07:01AM -0600, heretic@...20... wrote:
> : > nbd-server.c: In function `mainloop":
> : > nbd-server.c:674: error: `NBD_CMD_DISC" undeclared (first use in this
> : > function)
> : > nbd-server.c:674: error: (Each undeclared identifier is reported only once
> : > nbd-server.c:674: error: for each function it appears in.)
> : >
> : > Thoughts?
> :
> : Your nbd.h is outdated. I"ll try to add a check for that in configure;
> : in the mean time, please get an updated nbd.h from a recent linux kernel
> : source tree (include/linux/nbd.h), put it in your build directory, and
> : re-run configure before you compile again.
>
>
> I fail to see what's outdated about 2.4.26's kernel headers... which is
> what I'm compiling against ;^). The reason for this is that the 2.4
> headers is missing:
>
> enum {
>
> NBD_CMD_READ = 0,
> NBD_CMD_WRITE = 1,
> *NBD_CMD_DISC* = 2
> };
That's correct.
>
> somehow this code made it into the 2.5 tree pretty soon, and the entire
> era of 2.4 kernels was skipped?
Apparently.
> apart from this mishap it all seems to work on 2.4.25/2.4.26 kernels, I
> don't know weather my hackfix actually is correct but I managed to mount
> a device over localhost:XXXX as well, which leaves me to the following
> questions:
>
> 1) if it works (reasonably) why is the code including only 2.6
> compatible headers?
Because I didn't realize that this change happened *that* recently :-)
I thought this change in the kernel headers had been done during the
2.2-series. If that isn't the case, perhaps I should ensure it compiles
against 2.4-headers too.
> 2) how come the kernel space driver is 5 years old and the nbd-tools
> work with 2.6 ? ;^)
The server works with everything, not just 2.6; however, you need to
compile the most recent version of nbd-server against the most recent
kernel headers too.
> and of course:
>
> 3) how can I get my 2.4 kernel properly working!
>
> I'm willing to put some debugging time in this as I intend not to switch
> over any time soon to 2.6 (lack of confidence and demand of
> stability)... ideas?
The issue is just a compile-time one, not a run-time one. If it
compiles, it'll work on anything able to run the binary (including older
kernels).
--
EARTH
smog | bricks
AIR -- mud -- FIRE
soda water | tequila
WATER
-- with thanks to fortune
Reply to: