[Clfs-dev] [clfs-embedded] Musl-libc

Andrew Bradford andrew at bradfordembedded.com
Fri Jul 19 09:53:38 PDT 2013


On Fri, Jul 19, 2013, at 11:19 AM, Kirk Terrell wrote:
> I am attempting to build a musl flavored clfs embedded. I am using the 
> set of packages from the 2012-09-?? version of the embedded book. I am 
> unable to compile busybox:
> 
> > networking/lib.a(isrv_identd.o): In function `do_rd':
> > isrv_identd.c:(.text.do_rd+0x108): undefined reference to `fdprintf'
> > isrv_identd.c:(.text.do_rd+0x120): undefined reference to `fdprintf'
> > printutils/lib.a(lpr.o): In function `lpqr_main':
> > lpr.c:(.text.lpqr_main+0x178): undefined reference to `fdprintf'
> > lpr.c:(.text.lpqr_main+0x1a4): undefined reference to `fdprintf'
> > lpr.c:(.text.lpqr_main+0x1f4): undefined reference to `fdprintf'
> > printutils/lib.a(lpr.o):lpr.c:(.text.lpqr_main+0x298): more undefined references to `fdprintf' follow

I believe fdprintf() is just dprintf() as per busybox source, as a
#define in platform.h.  musl provides a dprintf() but I've not tried a
musl build yet, myself.

> prior to building busybox I set C_INCLUDE_PATH=${CLFS}/include - 
> otherwise it couldn't find the header files. I've also tried to build as 
> a static system.

Are you following the instructions for the current book but using old
packages?  Or some combo like that?
Did you have this issue only with musl or also with uClibc?

> I did a static compile of hello.c using my tool chain and it worked, but 
> when i changed printf to fdprintf I got the same error message.

If you use dprintf() in stead of fdprintf() does that work?  I believe
you need to have an open fd to use dprintf().

> I am using gcc-4.6.0; musl-0.9.11 and busybox-1.18.4. I am attempting to 
> build a system based on the mips Malta machine. I've done so succesfully 
> w/ uClibc.

Let me know how musl works for you, I'm very interested.

Thanks,
Andrew



More information about the Clfs-dev mailing list