On Fri, Jul 17, 2026 at 07:41:06PM +0100, James Youngman <[email protected]> wrote:
> As far as I can tell, this seems to add appreciable maintenance burden > to find in order to save ... > > $ du -h --apparent-size $(ldd /usr/bin/find | grep -o ' /.* ' | xargs > -n1 readlink -f ) > 199K /usr/lib/x86_64-linux-gnu/libselinux.so.1 > 955K /usr/lib/x86_64-linux-gnu/libm.so.6 > 2.0M /usr/lib/x86_64-linux-gnu/libc.so.6 > 695K /usr/lib/x86_64-linux-gnu/libpcre2-8.so.0.14.0 > > ... around 200K in total. This doesn't seem proportionate. I > recommend instead either living with the extra 200K or, if space is so > constrained that this is unacceptable, building `find` to be smaller > as well as not depending on selinux is probably a better choice > (especially if `find` is not the only binary you care about): > > $ sh -c "../findutils/configure --disable-threads --without-selinux > && make -j clean ; make CFLAGS=-Oz -j" >/dev/null 2>&1 && strip > find/find ; ls -lh find/find > -rwxrwxr-x 1 james james 229K Jul 17 19:32 find/find > $ sh -c "../findutils/configure && make -j clean ; make -j" > >/dev/null 2>&1 && strip find/find ; ls -lh find/find > -rwxrwxr-x 1 james james 297K Jul 17 19:35 find/find > > Thanks, > James. When I saw the patch, it seemed to me that the only benefit of dlopen would be on systems that start off not using selinux but later switch to using selinux, or vice versa. I'm not even sure if that's a thing. If it's not, just configuring with or without selinux does sound better. Then there's no time wasted checking for the existence of libselinux at runtime. But if people do turn selinux on or off, maybe dlopen is a good idea. cheers, raf
