tech-toolchain archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: rump_nfs dependencies and binutils 2.18.50



On Tue Dec 02 2008 at 00:56:00 +0900, Izumi Tsutsui wrote:
> pooka%cs.hut.fi@localhost wrote:
> 
> > Looks fishy.  Especially you should note that 2.18.50 has
> > link_set_domains and sockindomain, which are both generated by the
> > DOMAIN_DEFINE(sockindomain); directive.
> 
> As you can see on daily build log, sun2 (which is NOPIC) gets
> the following errors:
> 
> ---
> #      link  rump_nfs/rump_nfs
> /usr/tooldir/m68000/bin/m68010--netbsdelf-gcc \
> -B/export/sun2/root/usr/lib/ -B/export/sun2/root/usr/lib/  \
> -Wl,-nostdlib   -Wl,--wrap=malloc      -o rump_nfs  \
> getnfsargs.o mount_nfs.o rump_nfs.o pathadj.o fattr.o \
> -lrumpfs_nfs -lrumpnet -lrumpnet_sockin -lrumpfs_nfs -lp2k -lukfs \
> -lrumpvfs -lrump -lrumpuser -lpuffs -lutil -lpthread \
> -L/export/sun2/root/usr/lib   -Wl,-rpath-link,/export/sun2/root/lib  \
> -L/export/sun2/root/lib -Wl,-rpath-link,/export/sun2/root/usr/lib  \
> -L/export/sun2/root/usr/lib
> /export/sun2/root/usr/lib/librumpnet.a(uipc_domain.o): In function 
> `domaininit':
> uipc_domain.c:(.text+0xb98): undefined reference to `__start_link_set_domains'
> uipc_domain.c:(.text+0xb9e): undefined reference to `__stop_link_set_domains'
> uipc_domain.c:(.text+0xbc2): undefined reference to `__stop_link_set_domains'
> collect2: ld returned 1 exit status
> 
> *** Failed target:  rump_nfs
> ---
> 
> __start_link_set_domains and __stop_link_set_domains are
> from __link_set_decl() and __link_set_foreach() in uipc_domain.c
> (as a part of librumpnet.a).
> 
> But DOMAIN_DEFINE(sockindomain) is in src/sys/rump/net/lib/libsockin/sockin.c,
> and any other sources which have DOMAIN_DEFINE() aren't in librumpnfs.a.

Hmm, I don't think this is same issue as in the original post and the
problem could be fixed by simply fixing the linker line so that there is
(at least one) -lrumpnet_sockin before -lrumpnet.

I'll testbuild sun2 tomorrow unless someone beats me to it (ENOTIME
today, sorry).

> Maybe librumpnet.a should have at least one source
> which has DOMAIN_DEFINE(foo) like src/sys/kern/uipc_proto.c?

If my analysis above is correct, that would fix linking but not
functionality on sun2.

Additionally, it would break functionality on ~all platforms.  The dynamic
linker has a limitation which makes it unable to handle more than one
linkset per dynamic library.  If you try to use more than one, all but the
first on the linkline are lost.  This will hopefully be fixed by having
everything as a dynamic module in the future (dlopened instead of linked).

thanks for the notice,
  antti


Home | Main Index | Thread Index | Old Index