Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 676896 - sci-electronics/gtkwave-3.3.111 undefined reference to xdrmem_create, xdr_double
Summary: sci-electronics/gtkwave-3.3.111 undefined reference to xdrmem_create, xdr_double
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: The Soldering-Iron Brotherhood
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-01-30 09:33 UTC by Carlo
Modified: 2023-01-23 09:29 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Carlo 2019-01-30 09:33:48 UTC
hi
I successfully emerge sci-electronics/gtkwave, 2018-04-11, with binutils-v2.29.1, gcc-v6.4.0

but now the same version of gtwave fails with gcc-v7.3.0, and the log says 

make[4]: Entering directory '/var/tmp/portage/sci-electronics/gtkwave-3.3.68/work/gtkwave-3.3.68/src/helpers'
powerpc-unknown-linux-gnu-gcc -I./.. -I./../..   -I./../liblzma    -I./fst -I./../../contrib/rtlbrowse -mcpu=7450 -O2 -maltivec -mabi=altivec -fno-strict-aliasing -pipe  -DFST_WRITER_PARALLEL  -Wl,-O1 -Wl,--as-needed -o vcd2vzt vcd2vzt.o vzt_write.o v2l_debug_lxt2.o LzmaLib.o -lz -lbz2  -lpthread -lm -ldl
vzt_write.o: In function `vzt_wr_emit_value_double':
vzt_write.c:(.text+0x3410): undefined reference to `xdrmem_create'
vzt_write.c:(.text+0x341c): undefined reference to `xdr_double'
collect2: error: ld returned 1 exit status

---

I don't know if it's related or not, but I have recently created this demo to test 

#include <rpc/xdr.h>

int main(int argc, char *argv[])
{
    char buf[1024];
    XDR  x;
    int  n  = 5;
    char *s = "Hello, world.";

    xdrmem_create(&x, buf, 1024, XDR_ENCODE);
    printf("%d\n", xdr_getpos(&x));
    xdr_int(&x, &n);
    printf("%d\n", xdr_getpos(&x));
    xdr_wrapstring(&x, &s);
    printf("%d\n", xdr_getpos(&x));
    return 0;
}

gcc test.c -o test -ltirpc

it successfully compiles

./test
0
4
24

ldd test
        libtirpc.so.3 => /lib/libtirpc.so.3 (0xf8be4000)
        libc.so.6 => /lib/libc.so.6 (0xf86de000)
        libpthread.so.0 => /lib/libpthread.so.0 (0xf82ca000)
        /lib/ld.so.1 (0xf8ec9000)

so I am using /lib/libtirpc.so.3, which belongs to net-libs/libtirpc-1.0.2-r1
Comment 1 Carlo 2019-01-30 10:49:47 UTC
not a good and elegant solution, but I have a workaround just to get gtkwave compiled again

ln -s /usr/lib/libtirpc.so /usr/lib/librpc.so

now ./configure says 

checking for xdrmem_create in -lnsl... no
checking for xdrmem_create in -lrpc... yes

and emerge is happy 

2019-01-30 [ sci-electronics/gtkwave ] - success - @2.29.1/7.3.0

please, let me know if/how net-libs/libtirpc needs to be modified
Comment 2 Brian Evans (RETIRED) gentoo-dev 2019-01-31 14:31:43 UTC
Looks like configure isn't picking up net-libs/libnsl for these symbols
Comment 3 Carlo 2019-01-31 14:34:57 UTC
Indeed. weird.

I don't know why, but net-libs/libnsl is installed

net-libs/libnsl
      Latest version available: 1.2.0
      Latest version installed: 1.2.0
      Size of files: 205 KiB
      Homepage:      https://github.com/thkukuk/libnsl
      Description:   Public client interface for NIS(YP) and NIS+ in a IPv6 ready version
      License:       LGPL-2.1+
Comment 4 David Seifert gentoo-dev 2020-10-03 16:20:35 UTC
Can you reproduce this with 3.3.106?
Comment 5 Agostino Sarubbo gentoo-dev 2023-01-23 09:28:52 UTC
usr-merge_tinderbox has reproduced this issue with version 3.3.111 - Updating summary.
Comment 6 Agostino Sarubbo gentoo-dev 2023-01-23 09:29:07 UTC
Dear treecleaner@:

usr-merge_tinderbox reproduced this issue right now.

Since it has not been fixed for a long time, I'd suggest to evaluate if it is the case to remove this package from the tree. Thanks