I'm having some issues using busybox and dns lookups. I found a claim that this a glibc problem. I'm on gentoo. I would like to compile busybox against uClibc, without replacing glibc on the system.
Gentoo system, packages build against glibc. I have busybox installed as a statically linked binary against glibc. Edit: Architecture is x86_64, nomultilib.
I want to link busybox against uClibc, without messing with the host system's libc. I prefer to achieve this using gentoo's native tools, like emerge. But, suggestions that involve some manual scripting are also welcome. The target host is the same architecture.
emerge --root=/..option. But linking still seems to be done against glibc in
- Use the gentoo prefix project, but I just end up with another glibc based stage 3, in a prefixed installation path.
- I've found the option of
gcc -Xlinker -rpath=/default/path/to/libraries -Xlinker -I/default/path/to/libraries/ld.so program.c. But I have no clue how to use this in gentoo's
make.confor in a regular
makebased build like busybox'.
Edit; More tries:
USE="-staticon busybox to build a dynamic linked version. Find it's library dependencies using
ldd /bin/busybox. Stangly,
ldddoes not return any of the
nss*.solibs. So I copied them the the image manually. Bit still,
ping example.comwould result in an error.
- Download an uClibc stage from https://www.gentoo.org/downloads/. Configure and re-build the busybox binary in a chroot. This works, but is a definite overkill for building the +/- 1MB busybox binary vs a stage3 of 144MB.