Created attachment 396080 [details] build.log sys-block/nbd-3.8 fails with multiple undefined references, e.g.: nbd_trdump-nbd-trdump.o: In function `main': nbd-trdump.c:(.text+0x1b3): undefined reference to `ntohll' nbd-trdump.c:(.text+0x1c3): undefined reference to `ntohll' nbd-trdump.c:(.text+0x2a7): undefined reference to `ntohll' collect2: error: ld returned 1 exit status Makefile:574: recipe for target 'nbd-trdump' failed make[2]: *** [nbd-trdump] Error 1 make[2]: *** Waiting for unfinished jobs.... libtool: link: x86_64-pc-linux-gnu-gcc -std=gnu99 -march=native -pipe -Wl,-O1 -Wl,--as-needed -o nbd-client nbd-client.o nbd-client.o: In function `opennet': nbd-client.c:(.text+0x2b9): undefined reference to `err_nonfatal' nbd-client.c:(.text+0x2ca): undefined reference to `setmysockopt' nbd-client.o: In function `ask_list': nbd-client.c:(.text+0x37e): undefined reference to `ntohll' nbd-client.c:(.text+0x4cb): undefined reference to `ntohll' nbd-client.c:(.text+0x711): undefined reference to `ntohll' nbd-client.o: In function `negotiate': nbd-client.c:(.text+0x8e0): undefined reference to `ntohll' nbd-client.c:(.text+0xa24): undefined reference to `ntohll' nbd-client.o:nbd-client.c:(.text+0xbb1): more undefined references to `ntohll' follow nbd-client.o: In function `main': nbd-client.c:(.text+0x1343): undefined reference to `logging' See attached build.log for more context. This commit may fix the problem, but it seems to be too new to apply to 3.8 without some work: https://github.com/yoe/nbd/commit/72d6ab0e7484d96608eb09242dae96020703fa57?diff=unified $ emerge -pqv '=sys-block/nbd-3.8::gentoo' [ebuild N ] sys-block/nbd-3.8 USE="zlib -debug"
that func is defined in the local header which is always included. my guess is your system is screwed up. to find out, go into the build dir and run: x86_64-pc-linux-gnu-gcc -std=gnu99 -DHAVE_CONFIG_H -I. -march=native -pipe \ -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -march=native -pipe \ -E -dD -o nbd_trdump-nbd-trdump.i nbd-trdump.c then attach that .i file here