libx11.inc: disable warnings that don't work on certain compilers
PATCH 1/2 libx11.inc: disable warnings that don't work on certain compilers
Fixes these sorts of issues present on older gcc (CentOS 5.x in this case)
| cc1: error: unrecognized command line option "-Werror=implicit" | cc1: error: unrecognized command line option "-Werror=nonnull" | cc1: error: unrecognized command line option "-Werror=init-self" | cc1: error: unrecognized command line option "-Werror=main" | cc1: error: unrecognized command line option "-Werror=missing-braces" | cc1: error: unrecognized command line option "-Werror=sequence-point" | cc1: error: unrecognized command line option "-Werror=return-type" | cc1: error: unrecognized command line option "-Werror=trigraphs" | cc1: error: unrecognized command line option "-Werror=array-bounds" | cc1: error: unrecognized command line option "-Werror=write-strings" | cc1: error: unrecognized command line option "-Werror=address" | cc1: error: unrecognized command line option "-Werror=int-to-pointer-cast" | cc1: error: unrecognized command line option "-Werror=pointer-to-int-cast"
--- meta/recipes-graphics/xorg-lib/libx11.inc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
meta/recipes-graphics/xorg-lib/libx11.inc +2 -1
@@ -11,7 +11,7 @@ inherit siteinfo FILESPATH = "${FILE_DIRNAME}/libx11" PE = "1" -INC_PR = "r8" +INC_PR = "r9" PROVIDES = "virtual/libx11"
@@ -23,6 +23,7 @@ DEPENDS += "xproto xextproto xtrans libxcb kbproto inputproto" DEPENDS += "xproto-native" EXTRA_OECONF += "--with-keysymdefdir=${STAGING_INCDIR}/X11/" +EXTRA_OEMAKE = '-e CWARNFLAGS=""' # Let people with incredibly archaic requirements enable Xcms and BigFont, but # disable them by default.
Signature · 1 line
1.7.9.7
Quoted 15 lines · Matthew McClintock
Fixes these sorts of issues present on older gcc (CentOS 5.x in this case)
| cc1: error: unrecognized command line option "-Werror=implicit" | cc1: error: unrecognized command line option "-Werror=nonnull" | cc1: error: unrecognized command line option "-Werror=init-self" | cc1: error: unrecognized command line option "-Werror=main" | cc1: error: unrecognized command line option "-Werror=missing-braces" | cc1: error: unrecognized command line option "-Werror=sequence-point" | cc1: error: unrecognized command line option "-Werror=return-type" | cc1: error: unrecognized command line option "-Werror=trigraphs" | cc1: error: unrecognized command line option "-Werror=array-bounds" | cc1: error: unrecognized command line option "-Werror=write-strings" | cc1: error: unrecognized command line option "-Werror=address" | cc1: error: unrecognized command line option "-Werror=int-to-pointer-cast" | cc1: error: unrecognized command line option "-Werror=pointer-to-int-cast"
Shouldn't it be applied only for -native? version?
Cheers,
Quoted 36 lines
Signed-off-by Matthew McClintock <[email protected]>--- meta/recipes-graphics/xorg-lib/libx11.inc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)meta/recipes-graphics/xorg-lib/libx11.inc +2
-1@@ -11,7 +11,7 @@ inherit siteinfo FILESPATH = "${FILE_DIRNAME}/libx11" PE = "1" -INC_PR = "r8" +INC_PR = "r9" PROVIDES = "virtual/libx11"@@ -23,6 +23,7 @@ DEPENDS += "xproto xextproto xtrans libxcb kbproto inputproto" DEPENDS += "xproto-native" EXTRA_OECONF += "--with-keysymdefdir=${STAGING_INCDIR}/X11/" +EXTRA_OEMAKE = '-e CWARNFLAGS=""' # Let people with incredibly archaic requirements enable Xcms and BigFont, but # disable them by default.Signature · 8 lines
1.7.9.7 _______________________________________________ Openembedded-core mailing list [email protected] http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
Signature · 1 line
Martin 'JaMa' Jansa jabber: [email protected]
Quoted 17 lines · Martin Jansa
Quoted 15 lines · Matthew McClintock
Fixes these sorts of issues present on older gcc (CentOS 5.x in this case)
| cc1: error: unrecognized command line option "-Werror=implicit" | cc1: error: unrecognized command line option "-Werror=nonnull" | cc1: error: unrecognized command line option "-Werror=init-self" | cc1: error: unrecognized command line option "-Werror=main" | cc1: error: unrecognized command line option "-Werror=missing-braces" | cc1: error: unrecognized command line option "-Werror=sequence-point" | cc1: error: unrecognized command line option "-Werror=return-type" | cc1: error: unrecognized command line option "-Werror=trigraphs" | cc1: error: unrecognized command line option "-Werror=array-bounds" | cc1: error: unrecognized command line option "-Werror=write-strings" | cc1: error: unrecognized command line option "-Werror=address" | cc1: error: unrecognized command line option "-Werror=int-to-pointer-cast" | cc1: error: unrecognized command line option "-Werror=pointer-to-int-cast"
Quoted 1 line
Shouldn't it be applied only for -native? version?
That's reasonable. But, suppressing warnings to compile logs also did not seem to matter much since we don't go line by line on warnings in compile logs (does anyone?). I'll go with the consensus though.
-M
Quoted 48 lines
Cheers,
Quoted 32 lines
Signed-off-by Matthew McClintock <[email protected]>--- meta/recipes-graphics/xorg-lib/libx11.inc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)meta/recipes-graphics/xorg-lib/libx11.inc +2
-2@@ -11,7 +11,7 @@ inherit siteinfo FILESPATH = "${FILE_DIRNAME}/libx11" PE = "1" -INC_PR = "r8" +INC_PR = "r9" PROVIDES = "virtual/libx11"@@ -23,6 +23,7 @@ DEPENDS += "xproto xextproto xtrans libxcb kbproto inputproto" DEPENDS += "xproto-native" EXTRA_OECONF += "--with-keysymdefdir=${STAGING_INCDIR}/X11/" +EXTRA_OEMAKE = '-e CWARNFLAGS=""' # Let people with incredibly archaic requirements enable Xcms and BigFont, but # disable them by default. --1.7.9.7
Quoted 4 lines
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core--
Martin 'JaMa' Jansa jabber: [email protected]_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
PATCH 2/2 libx11: fix nativesdk build on older distros
In reply to Matthew McClintockmakekeys-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
--- .../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
meta/recipes-graphics/xorg-lib/libx11/use_host_cc_for_utils.patch new file +12 -0
@@ -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 + + force:
meta/recipes-graphics/xorg-lib/libx11_1.5.0.bb +2 -1
@@ -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"
Signature · 1 line
1.7.9.7
Re: [PATCH 2/2] libx11: fix nativesdk build on older distros
Quoted 23 lines · Matthew McClintock
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 1Older 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 <[email protected]>--- .../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.patchmeta/recipes-graphics/xorg-lib/libx11/use_host_cc_for_utils.patch new file +0
-0
meta/recipes-graphics/xorg-lib/libx11/use_host_cc_for_utils.patch line 10
Quoted 10 lines
meta/recipes-graphics/xorg-lib/libx11/use_host_cc_for_utils.patch new file +10
-0@@ -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
Quoted 29 lines
meta/recipes-graphics/xorg-lib/libx11/use_host_cc_for_utils.patch new file +2
-0+ + force:meta/recipes-graphics/xorg-lib/libx11_1.5.0.bb +2
-2@@ -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
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
Quoted 5 lines · On 24 September 2012 21:06, McClintock Matthew-B29882 <[email protected]>…
Quoted 1 line
Shouldn't it be applied only for -native? version?
That's reasonable. But, suppressing warnings to compile logs also did not seem to matter much since we don't go line by line on warnings in compile logs (does anyone?). I'll go with the consensus though.
I'd prefer this to be a -native only thing too.
Ross
Quoted 18 lines · Matthew McClintock
Quoted 17 lines · Martin Jansa
Quoted 15 lines · Matthew McClintock
Fixes these sorts of issues present on older gcc (CentOS 5.x in this case)
| cc1: error: unrecognized command line option "-Werror=implicit" | cc1: error: unrecognized command line option "-Werror=nonnull" | cc1: error: unrecognized command line option "-Werror=init-self" | cc1: error: unrecognized command line option "-Werror=main" | cc1: error: unrecognized command line option "-Werror=missing-braces" | cc1: error: unrecognized command line option "-Werror=sequence-point" | cc1: error: unrecognized command line option "-Werror=return-type" | cc1: error: unrecognized command line option "-Werror=trigraphs" | cc1: error: unrecognized command line option "-Werror=array-bounds" | cc1: error: unrecognized command line option "-Werror=write-strings" | cc1: error: unrecognized command line option "-Werror=address" | cc1: error: unrecognized command line option "-Werror=int-to-pointer-cast" | cc1: error: unrecognized command line option "-Werror=pointer-to-int-cast"
Quoted 5 lines
Quoted 1 line
Shouldn't it be applied only for -native? version?
That's reasonable. But, suppressing warnings to compile logs also did not seem to matter much since we don't go line by line on warnings in compile logs (does anyone?). I'll go with the consensus though.
Actually, this makes sense now because I'm seeing issues with non-nativesdk packages with the '-e' I've added... thought I build tested that... ;(
-M
Quoted 51 lines
-M
Quoted 48 lines
Cheers,
Quoted 32 lines
Signed-off-by Matthew McClintock <[email protected]>--- meta/recipes-graphics/xorg-lib/libx11.inc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)meta/recipes-graphics/xorg-lib/libx11.inc +2
-2@@ -11,7 +11,7 @@ inherit siteinfo FILESPATH = "${FILE_DIRNAME}/libx11" PE = "1" -INC_PR = "r8" +INC_PR = "r9" PROVIDES = "virtual/libx11"@@ -23,6 +23,7 @@ DEPENDS += "xproto xextproto xtrans libxcb kbproto inputproto" DEPENDS += "xproto-native" EXTRA_OECONF += "--with-keysymdefdir=${STAGING_INCDIR}/X11/" +EXTRA_OEMAKE = '-e CWARNFLAGS=""' # Let people with incredibly archaic requirements enable Xcms and BigFont, but # disable them by default. --1.7.9.7
Quoted 4 lines
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core--
Martin 'JaMa' Jansa jabber: [email protected]_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
Quoted 21 lines · On Mon, Sep 24, 2012 at 1:43 PM, McClintock Matthew-B29882…
Quoted 20 lines · Matthew McClintock
Quoted 18 lines · Martin Jansa
Quoted 15 lines · Matthew McClintock
Fixes these sorts of issues present on older gcc (CentOS 5.x in this case)
| cc1: error: unrecognized command line option "-Werror=implicit" | cc1: error: unrecognized command line option "-Werror=nonnull" | cc1: error: unrecognized command line option "-Werror=init-self" | cc1: error: unrecognized command line option "-Werror=main" | cc1: error: unrecognized command line option "-Werror=missing-braces" | cc1: error: unrecognized command line option "-Werror=sequence-point" | cc1: error: unrecognized command line option "-Werror=return-type" | cc1: error: unrecognized command line option "-Werror=trigraphs" | cc1: error: unrecognized command line option "-Werror=array-bounds" | cc1: error: unrecognized command line option "-Werror=write-strings" | cc1: error: unrecognized command line option "-Werror=address" | cc1: error: unrecognized command line option "-Werror=int-to-pointer-cast" | cc1: error: unrecognized command line option "-Werror=pointer-to-int-cast"Shouldn't it be applied only for -native? version?
Quoted 7 lines
Quoted 3 lines
That's reasonable. But, suppressing warnings to compile logs also did not seem to matter much since we don't go line by line on warnings in compile logs (does anyone?). I'll go with the consensus though.
Actually, this makes sense now because I'm seeing issues with non-nativesdk packages with the '-e' I've added... thought I build tested that... ;(
Why is -e being added? It's almost always better to add the vars you need explicitly, imo. I wish we could change the default EXTRA_OEMAKE to drop it, personally. It can cause odd unintended consequences.
Signature · 1 line
Christopher Larson
Re: [PATCH 2/2] libx11: fix nativesdk build on older distros
In reply to McClintock Matthew-B29882Quoted 18 lines · On Mon, Sep 24, 2012 at 1:13 PM, McClintock Matthew-B29882…
Quoted 17 lines · Matthew McClintock
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 1Older 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 <[email protected]>--- .../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
Quoted 16 lines
Quoted 6 lines
meta/recipes-graphics/xorg-lib/libx11/use_host_cc_for_utils.patch new file +0
-0meta/recipes-graphics/xorg-lib/libx11/use_host_cc_for_utils.patch line 10
Quoted 10 lines
meta/recipes-graphics/xorg-lib/libx11/use_host_cc_for_utils.patch new file +10
-0@@ -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
Isn't the makekeys build already using CC_FOR_BUILD? That's what is implied by the libx11.inc export of those variables. So it seems a bit unnecessary to pass in gcc expliciltly.
Signature · 1 line
Christopher Larson
Re: [PATCH 2/2] libx11: fix nativesdk build on older distros
In reply to Matthew McClintockmeta/recipes-graphics/xorg-lib/libx11/use_host_cc_for_utils.patch
Quoted 22 lines · Matthew McClintock
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 1Older 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 <[email protected]>--- .../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.patchmeta/recipes-graphics/xorg-lib/libx11/use_host_cc_for_utils.patch new file +0
-0
This patch needs a header!
meta/recipes-graphics/xorg-lib/libx11/use_host_cc_for_utils.patch line 10
Quoted 11 lines
meta/recipes-graphics/xorg-lib/libx11/use_host_cc_for_utils.patch new file +10
-0@@ -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
Is hardcoding 'gcc' here really the right thing to do?
Quoted 21 lines
meta/recipes-graphics/xorg-lib/libx11/use_host_cc_for_utils.patch new file +2
-0+ + force:meta/recipes-graphics/xorg-lib/libx11_1.5.0.bb +2
-1@@ -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"
Quoted 27 lines · Chris Larson
Quoted 25 lines · On Mon, Sep 24, 2012 at 1:43 PM, McClintock Matthew-B29882…
Quoted 23 lines · Matthew McClintock
Quoted 17 lines · Martin Jansa
Quoted 15 lines · Matthew McClintock
Fixes these sorts of issues present on older gcc (CentOS 5.x in this case)
| cc1: error: unrecognized command line option "-Werror=implicit" | cc1: error: unrecognized command line option "-Werror=nonnull" | cc1: error: unrecognized command line option "-Werror=init-self" | cc1: error: unrecognized command line option "-Werror=main" | cc1: error: unrecognized command line option "-Werror=missing-braces" | cc1: error: unrecognized command line option "-Werror=sequence-point" | cc1: error: unrecognized command line option "-Werror=return-type" | cc1: error: unrecognized command line option "-Werror=trigraphs" | cc1: error: unrecognized command line option "-Werror=array-bounds" | cc1: error: unrecognized command line option "-Werror=write-strings" | cc1: error: unrecognized command line option "-Werror=address" | cc1: error: unrecognized command line option "-Werror=int-to-pointer-cast" | cc1: error: unrecognized command line option "-Werror=pointer-to-int-cast"Quoted 1 line
Shouldn't it be applied only for -native? version?
That's reasonable. But, suppressing warnings to compile logs also did not seem to matter much since we don't go line by line on warnings in compile logs (does anyone?). I'll go with the consensus though.
Quoted 7 lines
Quoted 3 lines
Actually, this makes sense now because I'm seeing issues with non-nativesdk packages with the '-e' I've added... thought I build tested that... ;(
Why is -e being added? It's almost always better to add the vars you need explicitly, imo. I wish we could change the default
EXTRA_OEMAKEto drop it, personally. It can cause odd unintended consequences.
I think this was a holdover from trying to fix the issue fixed by patch 2/2. I don't think it belogs - I was working on this Friday and forgot everything today ;)
-M
Quoted 7 lines
--
Christopher Larson_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
Re: [PATCH 2/2] libx11: fix nativesdk build on older distros
In reply to Chris LarsonQuoted 32 lines · Chris Larson
Quoted 30 lines · On Mon, Sep 24, 2012 at 1:13 PM, McClintock Matthew-B29882…
Quoted 29 lines · Matthew McClintock
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 1Older 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 <[email protected]>--- .../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.patchmeta/recipes-graphics/xorg-lib/libx11/use_host_cc_for_utils.patch new file +6
-0@@ -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 $@
Quoted 8 lines
Quoted 4 lines
meta/recipes-graphics/xorg-lib/libx11/use_host_cc_for_utils.patch line 10
Quoted 4 lines
meta/recipes-graphics/xorg-lib/libx11/use_host_cc_for_utils.patch new file +4
-0+ + $(top_builddir)/src/util/makekeys$(EXEEXT): force +- cd util && $(MAKE) ++ cd util && $(MAKE) CC=gcc CCLD=gcc LDFLAGS= CFLAGS=-D_GNU_SOURCEIsn't the makekeys build already using
CC_FOR_BUILD? That's what is implied by the libx11.inc export of those variables. So it seems a bit unnecessary to pass in gcc expliciltly.
I think this is probably what I was looking for... will try to respin.
-M
Quoted 7 lines
--
Christopher Larson_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
Re: [PATCH 2/2] libx11: fix nativesdk build on older distros
In reply to Saul WoldQuoted 20 lines · Saul Wold
Quoted 19 lines · Matthew McClintock
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 1Older 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 <[email protected]>--- .../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
Quoted 10 lines
meta/recipes-graphics/xorg-lib/libx11/use_host_cc_for_utils.patch
Quoted 7 lines
diff --git
a/meta/recipes-graphics/xorg-lib/libx11/use_host_cc_for_utils.patchb/meta/recipes-graphics/xorg-lib/libx11/use_host_cc_for_utils.patchnew file mode 100644
index 0000000..08ba39ameta/recipes-graphics/xorg-lib/libx11/use_host_cc_for_utils.patch new file +0
-0This patch needs a header!
Yes!
Quoted 17 lines
Quoted 4 lines
meta/recipes-graphics/xorg-lib/libx11/use_host_cc_for_utils.patch line 10
Quoted 10 lines
meta/recipes-graphics/xorg-lib/libx11/use_host_cc_for_utils.patch new file +10
-0@@ -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_SOURCEIs hardcoding 'gcc' here really the right thing to do?
Probably not, Chris has made some other suggestions so I will look at a better v2.
-M
Quoted 30 lines
Quoted 21 lines
meta/recipes-graphics/xorg-lib/libx11/use_host_cc_for_utils.patch new file +2
-0+ + force:meta/recipes-graphics/xorg-lib/libx11_1.5.0.bb +2
-1@@ -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"
Quoted 4 lines
SRC_URI[md5sum] = "
78b4b3bab4acbdf0abcfca30a8c70cc6" SRC_URI[sha256sum] =
"c382efd7e92bfc3cef39a4b7f1ecf2744ba4414a705e3bc1e697f75502bd4d86"_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
Quoted 9 lines · Ross
Quoted 5 lines · On 24 September 2012 21:06, McClintock Matthew-B29882 <[email protected]>…
Quoted 1 line
Shouldn't it be applied only for -native? version?
That's reasonable. But, suppressing warnings to compile logs also did not seem to matter much since we don't go line by line on warnings in compile logs (does anyone?). I'll go with the consensus though.
I'd prefer this to be a -native only thing too.
I think the CWARNFLAGS needs to be on all the though (native, nativesdk, etc), '-e' can go away entirely.
-M
Quoted 7 lines
Ross
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
Re: [PATCH 2/2] libx11: fix nativesdk build on older distros
In reply to a message not in the archiveWhoops, I dropped oe-core.
Quoted 4 lines · On 25 September 2012 16:38, McClintock Matthew-B29882 <[email protected]>…
Quoted 4 lines
Quoted 3 lines
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
Quoted 8 lines
Quoted 6 lines
Why isn't this from configure.ac working?
# Set common system defines for POSIX extensions, such as
_GNU_SOURCE# Must be called before any macros that run the compiler (likeAC_PROG_LIBTOOL)# to avoid autoconf errors. AC_USE_SYSTEM_EXTENSIONSDo these make it to
CC_FOR_BUILD? Here is what it looks like before:
AC_USE_SYSTEM_EXTENSIONS sets _GNU_SOURCE (and more) using AC_DEFINE, so they end up in config.h... which isn't being included in makekeys.c.
So the correct and upstreamable fix is to include config.h from makekeys.c.
Ross
Re: [PATCH 2/2] libx11: fix nativesdk build on older distros
Quoted 15 lines · Ross
Whoops, I dropped oe-core.
Quoted 11 lines · On 25 September 2012 16:38, McClintock Matthew-B29882 <[email protected]>…
Quoted 10 lines
Quoted 3 lines
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
Why isn't this from configure.ac working?
# Set common system defines for POSIX extensions, such as
_GNU_SOURCE# Must be called before any macros that run the compiler (likeAC_PROG_LIBTOOL)# to avoid autoconf errors. AC_USE_SYSTEM_EXTENSIONS
Quoted 7 lines
Quoted 1 line
Do these make it to
CC_FOR_BUILD? Here is what it looks like before:
AC_USE_SYSTEM_EXTENSIONSsets_GNU_SOURCE(and more) usingAC_DEFINE, so they end up inconfig.h... which isn't being included inmakekeys.c.So the correct and upstreamable fix is to include
config.hfrommakekeys.c.
I read somewhere (very informative - I know - but I've forgot where) that you are not supposed to include config.h for CC_FOR_BUILD targets? I'm not expert and just double checking on this bit as the correct solution.
--M
Re: [PATCH 2/2] libx11: fix nativesdk build on older distros
In reply to a message not in the archiveQuoted 22 lines · Matthew McClintock
Quoted 21 lines · Ross
Whoops, I dropped oe-core.
Quoted 4 lines · On 25 September 2012 16:38, McClintock Matthew-B29882 <[email protected]>…
Quoted 4 lines
Quoted 3 lines
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
Quoted 8 lines
Quoted 6 lines
Why isn't this from configure.ac working?
# Set common system defines for POSIX extensions, such as
_GNU_SOURCE# Must be called before any macros that run the compiler (likeAC_PROG_LIBTOOL)# to avoid autoconf errors. AC_USE_SYSTEM_EXTENSIONSDo these make it to
CC_FOR_BUILD? Here is what it looks like before:
AC_USE_SYSTEM_EXTENSIONSsets_GNU_SOURCE(and more) usingAC_DEFINE, so they end up inconfig.h... which isn't being included inmakekeys.c.
Quoted 6 lines
Quoted 1 line
So the correct and upstreamable fix is to include
config.hfrommakekeys.c.I read somewhere (very informative - I know - but I've forgot where) that you are not supposed to include
config.hforCC_FOR_BUILDtargets? I'm not expert and just double checking on this bit as the correct solution.
Found it: http://sources.redhat.com/autobook/autobook/autobook_270.html
-M
Re: [PATCH 2/2] libx11: fix nativesdk build on older distros
Quoted 6 lines · On 25 September 2012 19:55, McClintock Matthew-B29882 <[email protected]>…
Quoted 4 lines
I read somewhere (very informative - I know - but I've forgot where) that you are not supposed to include
config.hforCC_FOR_BUILDtargets? I'm not expert and just double checking on this bit as the correct solution.Found it: http://sources.redhat.com/autobook/autobook/autobook_270.html
That is a very good point, hadn't thought of that (and I recommend that book to everyone, clearly I should re-read it).
The best fix is to just #define _GNU_SOURCE at the top of makekeys then, and push that upstream (mail patch to [email protected]).
Ross
Re: [PATCH 2/2] libx11: fix nativesdk build on older distros
Hi,
Quoted 7 lines · Ross
Quoted 5 lines · On 25 September 2012 19:55, McClintock Matthew-B29882 <[email protected]>…
Quoted 4 lines
I read somewhere (very informative - I know - but I've forgot where) that you are not supposed to include
config.hforCC_FOR_BUILDtargets? I'm not expert and just double checking on this bit as the correct solution.
Quoted 7 lines
Quoted 1 line
Found it: http://sources.redhat.com/autobook/autobook/autobook_270.html
That is a very good point, hadn't thought of that (and I recommend that book to everyone, clearly I should re-read it).
The best fix is to just #define
_GNU_SOURCEat the top of makekeys then, and push that upstream (mail patch to [email protected]).
Actually, it isn't, as that breaks non-glibc badly. glibc takes _GNU_SOURCE to mean 'please add useful GNU extensions to this POSIX wasteland', whereas BSD and/or Solaris take it to mean 'please make this only GNU and don't use any other extensions at all'. So we have to do whatever AC_USE_SYSTEM_EXTENSIONS does, because that really is the only thing that actually works.
Cheers,
Daniel
Re: [PATCH 2/2] libx11: fix nativesdk build on older distros
Quoted 9 lines · Daniel Stone
Quoted 2 lines
The best fix is to just #define
_GNU_SOURCEat the top of makekeys then, and push that upstream (mail patch to [email protected]).Actually, it isn't, as that breaks non-glibc badly. glibc takes
_GNU_SOURCEto mean 'please add useful GNU extensions to this POSIX wasteland', whereas BSD and/or Solaris take it to mean 'please make this only GNU and don't use any other extensions at all'. So we have to do whateverAC_USE_SYSTEM_EXTENSIONSdoes, because that really is the only thing that actually works.
What do you mean non-glibc? :)
Ignoring Minix as a build host (I think that's reasonable), AC_USE_SYSTEM_EXTENSIONS defines _ALL_SOURCE _GNU_SOURCE _POSIX_PTHREAD_SEMANTICS _TANDEM_SOURCE, and does a compile-time sanity test of __EXTENSIONS__ (because it's possible that some combination of these defines make the system headers unusable on Solaris).
This is annoying. How about for oe-core we patch in -D_GNU_SOURCE to src/util/Makefile.am's CPPFLAGS definition and I'll discuss with xorg-dev for a proper fix?
Ross
Re: [PATCH 2/2] libx11: fix nativesdk build on older distros
Quoted 20 lines · Ross
Quoted 9 lines · Daniel Stone
Quoted 2 lines
The best fix is to just #define
_GNU_SOURCEat the top of makekeys then, and push that upstream (mail patch to [email protected]).Actually, it isn't, as that breaks non-glibc badly. glibc takes
_GNU_SOURCEto mean 'please add useful GNU extensions to this POSIX wasteland', whereas BSD and/or Solaris take it to mean 'please make this only GNU and don't use any other extensions at all'. So we have to do whateverAC_USE_SYSTEM_EXTENSIONSdoes, because that really is the only thing that actually works.What do you mean non-glibc? :)
Ignoring Minix as a build host (I think that's reasonable),
AC_USE_SYSTEM_EXTENSIONSdefines_ALL_SOURCE_GNU_SOURCE_POSIX_PTHREAD_SEMANTICS_TANDEM_SOURCE, and does a compile-time sanity test of__EXTENSIONS__(because it's possible that some combination of these defines make the system headers unusable on Solaris).
Quoted 3 lines
This is annoying. How about for oe-core we patch in -D_GNU_SOURCE to src/util/Makefile.am's CPPFLAGS definition and I'll discuss with xorg-dev for a proper fix?
Would this be OK for now in libx11.inc?
-export CFLAGS_FOR_BUILD = "${BUILD_CFLAGS}" +export CFLAGS_FOR_BUILD = "${BUILD_CFLAGS} -D_GNU_SOURCE"
-M