NetworkBlockDevice / nbd

Network Block Device
GNU General Public License v2.0
450 stars 116 forks source link

nbd-3.25 compile failure in gznbd #149

Closed thesamesam closed 1 month ago

thesamesam commented 1 year ago

nbd-3.25 fails to compile with zlib support:

make[2]: Entering directory '/var/tmp/portage/sys-block/nbd-3.25/work/nbd-3.25/gznbd'
x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I..  -DSYSCONFDIR='"/etc"'  -DTRACE -Wall -O2 -pipe -march=native -fdiagnostics-color=always -frecord-gcc-switches -Wreturn-type      -ggdb3 -c -o gznbd-gznbd.o `test -f 'gznbd.c' || echo './'`gznbd.c
gznbd.c: In function ‘main’:
gznbd.c:193:17: error: ‘struct nbd_reply’ has no member named ‘handle’
  193 |     memcpy(reply.handle,request.handle,sizeof(reply.handle));
      |                 ^
gznbd.c:193:32: error: ‘struct nbd_request’ has no member named ‘handle’
  193 |     memcpy(reply.handle,request.handle,sizeof(reply.handle));
      |                                ^
gznbd.c:193:52: error: ‘struct nbd_reply’ has no member named ‘handle’
  193 |     memcpy(reply.handle,request.handle,sizeof(reply.handle));
      |                                                    ^
make[2]: *** [Makefile:452: gznbd-gznbd.o] Error 1
make[2]: Leaving directory '/var/tmp/portage/sys-block/nbd-3.25/work/nbd-3.25/gznbd'
make[1]: *** [Makefile:913: all-recursive] Error 1
make: *** [Makefile:527: all] Error 2
 * ERROR: sys-block/nbd-3.25::gentoo failed (compile phase):

Full log: build.txt

Given the gznbd/ directory hasn't been updated in 9 years, I'm guessing we should stop building it in Gentoo?

yoe commented 1 year ago

Quickest fix is to s/handle/cookie/g over gznbd.c.

However, gznbd has indeed not been maintained in essentially forever. I think the right way to support it is to merge its functionality into nbd-server proper, through a plug in system.

As things stand, I doubt gznbd can even talk to any nbd-client since 3.10 anymore...

yoe commented 1 month ago

I dropped gznbd with commit e788607b6b386b5b06122a9ac4b92650a306f432