[OE-core] [PATCH 2/2] libx11: fix nativesdk build on older distros

McClintock Matthew-B29882 B29882 at freescale.com
Mon Sep 24 20:13:36 UTC 2012


On Mon, Sep 24, 2012 at 2:55 PM, Matthew McClintock <msm at freescale.com> wrote:
> makekeys-makekeys.o: In function `main':
> makekeys.c:(.text+0x85): undefined reference to `__isoc99_sscanf'
> makekeys.c:(.text+0xa7): undefined reference to `__isoc99_sscanf'
> collect2: ld returned 1 exit status
> make: *** [makekeys] Error 1
>
> Older libc do not have this defined, we can use the -D_GNU_SOURCE
> to the compiler to prevent generating calls to this function and
> make linking work
>
> Signed-off-by: Matthew McClintock <msm at freescale.com>
> ---
>  .../xorg-lib/libx11/use_host_cc_for_utils.patch    |   12 ++++++++++++
>  meta/recipes-graphics/xorg-lib/libx11_1.5.0.bb     |    3 ++-
>  2 files changed, 14 insertions(+), 1 deletion(-)
>  create mode 100644 meta/recipes-graphics/xorg-lib/libx11/use_host_cc_for_utils.patch
>
> diff --git a/meta/recipes-graphics/xorg-lib/libx11/use_host_cc_for_utils.patch b/meta/recipes-graphics/xorg-lib/libx11/use_host_cc_for_utils.patch
> new file mode 100644
> index 0000000..08ba39a
> --- /dev/null
> +++ b/meta/recipes-graphics/xorg-lib/libx11/use_host_cc_for_utils.patch
> @@ -0,0 +1,12 @@
> +Index: libX11-1.5.0/src/Makefile.am
> +===================================================================
> +--- libX11-1.5.0.orig/src/Makefile.am
> ++++ libX11-1.5.0/src/Makefile.am
> +@@ -420,6 +420,6 @@ ks_tables.h: $(KEYSYMDEFS) $(top_builddi
> +       mv ks_tables_h $@
> +
> + $(top_builddir)/src/util/makekeys$(EXEEXT): force
> +-      cd util && $(MAKE)
> ++      cd util && $(MAKE) CC=gcc CCLD=gcc LDFLAGS= CFLAGS=-D_GNU_SOURCE

I kicked off a build right after testing on one machine, and this is
not quite right. Mostly I think I Need more CFLAGS to build 32 or 64
bit native binaries so they can run on the target system properly.
E.g. if I don't have:

/lib/ld.so.1: No such file or directory

-M

> +
> + force:
> diff --git a/meta/recipes-graphics/xorg-lib/libx11_1.5.0.bb b/meta/recipes-graphics/xorg-lib/libx11_1.5.0.bb
> index 94e2051..3e00dd8 100644
> --- a/meta/recipes-graphics/xorg-lib/libx11_1.5.0.bb
> +++ b/meta/recipes-graphics/xorg-lib/libx11_1.5.0.bb
> @@ -1,11 +1,12 @@
>  require libx11.inc
>  inherit gettext
>
> -PR = "${INC_PR}.2"
> +PR = "${INC_PR}.3"
>
>  BBCLASSEXTEND = "native nativesdk"
>
>  SRC_URI += "file://keysymdef_include.patch"
> +SRC_URI_append_virtclass-nativesdk += "file://use_host_cc_for_utils.patch"
>
>  SRC_URI[md5sum] = "78b4b3bab4acbdf0abcfca30a8c70cc6"
>  SRC_URI[sha256sum] = "c382efd7e92bfc3cef39a4b7f1ecf2744ba4414a705e3bc1e697f75502bd4d86"
> --
> 1.7.9.7
>
>
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core at lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core




More information about the Openembedded-core mailing list