Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 539614 - sys-block/nbd-3.8 fails with undefined references to ntohll, etc.
Summary: sys-block/nbd-3.8 fails with undefined references to ntohll, etc.
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-02-10 14:08 UTC by Joe Sapp (RETIRED)
Modified: 2015-03-04 06:55 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (build.log,13.20 KB, text/plain)
2015-02-10 14:08 UTC, Joe Sapp (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Joe Sapp (RETIRED) gentoo-dev 2015-02-10 14:08:50 UTC
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"
Comment 1 SpanKY gentoo-dev 2015-03-04 06:55:41 UTC
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