[Buildroot] [PATCH 1/1] package/mtd: fix musl compile

Peter Korsgaard peter at korsgaard.com
Fri Apr 24 10:20:41 UTC 2015


>>>>> "Jörg" == Jörg Krause <joerg.krause at embedded.rocks> writes:

 > Expand existing rpmatch() patch for uClibc to musl. Add another patch to
 > fix more compile issues with musl.

 > Patches sent upstream:
 > 1) "include/common.h: fix build against musl"
 >    [http://patchwork.ozlabs.org/patch/464074/]
 > 2) "Makefile: fix build against musl"
 >    [http://patchwork.ozlabs.org/patch/464072/]
 > 3) "lib/libfec.c: fix build against musl"
 >    [http://patchwork.ozlabs.org/patch/464073/]

Thanks, but something seems wrong:

> +uClibc defines both __UCLIBC__ and __GLIBC__. So first check for uCibc and its
 > +version and then for a non glibc implementation (like musl). Note, musl does
 > +not define __MUSL__.
 > +
 > +Signed-off-by: Jörg Krause <joerg.krause at embedded.rocks>
 > +
 >  Cc: Mike Frysinger <vapier at gentoo.org>
 >  Signed-off-by: Baruch Siach <baruch at tkos.co.il>
 > +Signed-off-by: Jörg Krause <joerg.krause at embedded.rocks>
 >  ---
 >   include/common.h | 14 ++++++++++++++
 >   1 file changed, 14 insertions(+)
 
 >  diff --git a/include/common.h b/include/common.h
 > -index 4ffccea17213..838dc757bdf1 100644
 > +index 4ffccea..d1be21e 100644
 >  --- a/include/common.h
 >  +++ b/include/common.h
 >  @@ -102,6 +102,20 @@ extern "C" {
 > - 	fprintf(stderr, "%s: warning!: " fmt "\n", PROGRAM_NAME, ##__VA_ARGS__); \
 > - } while(0)
 > - 
 > -+#if defined(__UCLIBC__)
 > -+/* uClibc versions before 0.9.34 don't have rpmatch() */
 > -+#if __UCLIBC_MAJOR__ == 0 && \
 > +	fprintf(stderr, "%s: warning!: " fmt "\n", PROGRAM_NAME, ##__VA_ARGS__); \
 > +} while(0)
 > +

This is not valid patch syntax (context lines should start with a
space). Perhaps you mailed corrupted the patch?

With that fixed, it still doesn't build for me:

  CC      recv_image.o
recv_image.c:7:19: fatal error: error.h: No such file or directory
 #include <error.h>
                   ^
compilation terminated.
common.mk:82: recipe for target '/home/peko/source/buildroot/output/build/mtd-1.5.1/recv_image.o' failed

Care to fix that and resend?

-- 
Bye, Peter Korsgaard


More information about the buildroot mailing list