static compile of rsync

Paul Slootman paul+rsync at wurtel.net
Wed Mar 19 10:37:03 GMT 2008


On Tue 18 Mar 2008, Lopez David E wrote:
[...]
> nss_deffinder.c:(.text+0xcc): undefined reference to `_dlclose'
> /usr/lib/libc.a(nss_deffinder.o): In function `SO_per_src_delete':
> nss_deffinder.c:(.text+0x104): undefined reference to `_dlclose'
> collect2: ld returned 1 exit status
> make: *** [rsync] Error 1
> 
> just as you say. won't build static compile.
> 
> just wondering... what if I create a library directory with all
> of the dependences and ship it with rsync. could I just create
> a script to set the LD_LIBRARY_PATH env var to that lib prior
> to running rsync? would not that work in far away hosts?

That may work.
You may also need to investigate what libraries are linked in
dynamically, i.e. what "ldd rsync" does not show... (as dlopen() etc.
are apparently used, I assume for the nsswitch stuff I mentioned
earlier). I don't know whether you could influence from where those are
loaded.


Paul Slootman


More information about the rsync mailing list