Hello, I am trying to revive an old linux server installation, which still has libc5. Sadly, most current software does not compile anymore on this system, including the tc utility. As with other tools (net-tools, coreutils, procps etc.) I tried to compile and statically link (LDFLAGS=-static) on a more recent linux machine and copy the static binaries over to the old machine. But no luck with tc. Even on the host where I compiled it (Debian Sarge 3.1), the static binary (/usr/local/iproute2-2.6.16-060323/usr/sbin/tc) does not see any qdisc: xoff:~# /sbin/tc qdisc ls dev eth0 qdisc pfifo_fast 0: bands 3 priomap 1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1 xoff:~# /usr/local/iproute2-2.6.16-060323/usr/sbin/tc qdisc ls dev eth0 qdisc pfifo_fast 0: [Unknown qdisc, optlen=20] The source code makes use of dlopen() / dlsym() functions, which may be the reason for the failure. Does anybody know a way to make it work in a static binary? Regards Matthias
On Wed, 26 Jul 2006 19:25:00 +0200 Matthias Ferdinand <mf@mfedv.net> wrote:> Hello, > > I am trying to revive an old linux server installation, which still has > libc5. Sadly, most current software does not compile anymore on this > system, including the tc utility. As with other tools (net-tools, > coreutils, procps etc.) I tried to compile and statically link > (LDFLAGS=-static) on a more recent linux machine and copy the static > binaries over to the old machine. > > But no luck with tc. Even on the host where I compiled it (Debian Sarge > 3.1), the static binary (/usr/local/iproute2-2.6.16-060323/usr/sbin/tc) > does not see any qdisc: > > xoff:~# /sbin/tc qdisc ls dev eth0 > qdisc pfifo_fast 0: bands 3 priomap 1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1 > > xoff:~# /usr/local/iproute2-2.6.16-060323/usr/sbin/tc qdisc ls dev eth0 > qdisc pfifo_fast 0: [Unknown qdisc, optlen=20] > > The source code makes use of dlopen() / dlsym() functions, which may be the > reason for the failure. Does anybody know a way to make it work in a static > binary? >The dlopen() stuff is just to allow adding support for new qdisc''s later. It also is introspective, it is used to find the qdisc''s that are statically linked in. Why bother updating it? You could with some effort change tc to have a list of qdisc structure pointers and change get_qdisc_kind to walk the list.
--On Mittwoch, Juli 26, 2006 12:22:40 -0700 Stephen Hemminger <shemminger@osdl.org> wrote:> On Wed, 26 Jul 2006 19:25:00 +0200 > Matthias Ferdinand <mf@mfedv.net> wrote: >> But no luck with tc. Even on the host where I compiled it (Debian Sarge >> 3.1), the static binary (/usr/local/iproute2-2.6.16-060323/usr/sbin/tc) >> does not see any qdisc:> You could with some effort change tc to have a list of qdisc structure > pointers and change get_qdisc_kind to walk the list.Thanks for the answer, but I guess that would be more trouble than it''s worth, and probably nobody would use that patched stuff except myself. I can do QoS stuff on a Linux router nearby, it would have been just aesthetically pleasing to have it all available on the old server. Regards Matthias