Skip to contentSkip to conversation

Fedora 15 and GCC 4.6 compatability patches

PATCH Applied Joshua Lock 3 participants 14 messages Apr 1, 2011 – Apr 6, 2011

lore
Share & tools
lore
#0 lore raw

cover Fedora 15 and GCC 4.6 compatability patches

From: Joshua Lock <[email protected]>

Folks,

Attached is a series of patches to ensure we can run oe-core builds on the soon to be released Fedora 15.

I don't think any of these should be too controversial and with the series applied I am able to build both minimal and sato images on my Fedora 15 box.

Pull URL: git://git.openembedded.org/openembedded-core-contrib
Branch: josh/fedora15
Browse: http://git.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=josh/fedora15

Thanks,
Joshua Lock <[email protected]>
---

Joshua Lock (7):
elfutils: fix builds with gcc 4.6
python-native: add missing SRC_URI hashes
libx11: add missing SRC_URI hashes xorg-[lib-common|proto-common]: disable use of fop document
generation
libx11: disable building of specs
openjade: fix build with GCC 4.6
xserver-xf86: explicitly disable fop document generation

 meta/recipes-devtools/elfutils/elfutils_0.148.bb   |    4 +
 .../user-declared-default-constructor.patch        |   88 ++++++++++++++++++++
 .../openjade/openjade-native_1.3.2.bb              |    5 +-
 .../recipes-devtools/python/python-native_2.6.6.bb |    3 +
 meta/recipes-graphics/xorg-lib/libx11.inc          |    2 +-
 meta/recipes-graphics/xorg-lib/libx11_1.3.4.bb     |    3 +
 meta/recipes-graphics/xorg-lib/xorg-lib-common.inc |    2 +-
 .../xorg-proto/xorg-proto-common.inc               |    1 +
 .../xorg-xserver/xserver-xf86-common.inc           |    1 +
 9 files changed, 105 insertions(+), 4 deletions(-)
 create mode 100644 meta/recipes-devtools/openjade/openjade-1.3.2/user-declared-default-constructor.patch
Signature · 1 line
1.7.4.1
#1 lore raw

PATCH 1/7 elfutils: fix builds with gcc 4.6

From: Joshua Lock <[email protected]>

gcc 4.6 (as used in Fedora 15) adds some extra warnings which are included with Werror. The new unused-but-set variable warning causes an error in libasm of elfutils. Work around this by removing unused-but-set from Werror.

---
 meta/recipes-devtools/elfutils/elfutils_0.148.bb |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
meta/recipes-devtools/elfutils/elfutils_0.148.bb +4 -0
index b2f700e..c395be8 100644
@@ -40,6 +40,10 @@ SRC_URI += "\
 
 inherit autotools
 
+# GCC 4.6.0 raises an unused-but-set warning in libasm, for now remove
+# this warning from Werror
+CFLAGS_virtclass-native += "-Wno-error=unused-but-set-variable"
+
 EXTRA_OECONF = "--program-prefix=eu-"
 
 do_configure_prepend() {
Signature · 1 line
1.7.4.1
#7 lore raw

PATCH 2/7 python-native: add missing SRC_URI hashes

In reply to Joshua Lock

From: Joshua Lock <[email protected]>

---
 .../recipes-devtools/python/python-native_2.6.6.bb |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
meta/recipes-devtools/python/python-native_2.6.6.bb +3 -0
index 2ad10c9..11956a4 100644
@@ -14,6 +14,9 @@ SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.bz2 \
            file://nohostlibs.patch"
 S = "${WORKDIR}/Python-${PV}"
 
+SRC_URI[md5sum] = "cf4e6881bb84a7ce6089e4a307f71f14"
+SRC_URI[sha256sum] = "134c5e0736bae2e5570d0b915693374f11108ded63c35a23a35d282737d2ce83"
+
 inherit native
 
 EXTRA_OEMAKE = '\
Signature · 1 line
1.7.4.1
#8 lore raw

PATCH 3/7 libx11: add missing SRC_URI hashes

In reply to Joshua Lock

From: Joshua Lock <[email protected]>

---
 meta/recipes-graphics/xorg-lib/libx11_1.3.4.bb |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
meta/recipes-graphics/xorg-lib/libx11_1.3.4.bb +3 -0
index aaeb38e..c572d5e 100644
@@ -10,6 +10,9 @@ SRC_URI += "file://x11_disable_makekeys.patch \
             file://nodolt.patch \
             file://include_fix.patch"
 
+SRC_URI[md5sum] = "f65c9c7ecbfb64c19dbd7927160d63fd"
+SRC_URI[sha256sum] = "88d7238ce5f7cd123450567de7a3b56a43556e4ccc45df38b8324147c889a844"
+
 DEPENDS += "bigreqsproto xproto xextproto xtrans libxau xcmiscproto \
             libxdmcp xf86bigfontproto kbproto inputproto xproto-native gettext"
 
Signature · 1 line
1.7.4.1
#9 lore raw

PATCH 4/7 xorg-[lib-common|proto-common]: disable use of fop document generation

In reply to Joshua Lock

From: Joshua Lock <[email protected]>

On Fedora 15 I see a huge Java backtrace when document generation runs for some xorg libs. As fop is automatically detected, with the possibility of detecting fop on the host whilst doing target builds, the safest bet is to explicitly disable fop for document generation.

---
 meta/recipes-graphics/xorg-lib/xorg-lib-common.inc |    2 +-
 .../xorg-proto/xorg-proto-common.inc               |    1 +
 2 files changed, 2 insertions(+), 1 deletions(-)
meta/recipes-graphics/xorg-lib/xorg-lib-common.inc +1 -1
index 4ed8c86..d843d65 100644
@@ -13,4 +13,4 @@ S = "${WORKDIR}/${XORG_PN}-${PV}"
 
 inherit autotools pkgconfig
 
-EXTRA_OECONF = "--enable-malloc0returnsnull"
+EXTRA_OECONF = "--enable-malloc0returnsnull --with-fop=no"
meta/recipes-graphics/xorg-proto/xorg-proto-common.inc +1 -0
index 92aa1fe..ab1af28 100644
@@ -14,6 +14,7 @@ S = "${WORKDIR}/${XORG_PN}-${PV}"
 DEPENDS = "util-macros"
 
 inherit autotools pkgconfig
+EXTRA_OECONF = "--with-fop=no"
 
 # ${PN} is empty so we need to tweak -dev and -dbg package dependencies
 RDEPENDS_${PN}-dev = ""
Signature · 1 line
1.7.4.1
#10 lore raw

PATCH 5/7 libx11: disable building of specs

In reply to Joshua Lock

From: Joshua Lock <[email protected]>

Generating Postscript specs fails on Fedora 15, I don't *think* we need them so disable them.

---
 meta/recipes-graphics/xorg-lib/libx11.inc |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
meta/recipes-graphics/xorg-lib/libx11.inc +1 -1
index 267a03a..030b0db 100644
@@ -11,7 +11,7 @@ PROVIDES = "virtual/libx11"
 XORG_PN = "libX11"
 LEAD_SONAME = "libX11.so"
 
-EXTRA_OECONF += "--with-keysymdef=${STAGING_INCDIR}/X11/keysymdef.h"
+EXTRA_OECONF += "--with-keysymdef=${STAGING_INCDIR}/X11/keysymdef.h --disable-specs"
 
 FILES_${PN} += "${datadir}/X11/XKeysymDB ${datadir}/X11/XErrorDB ${libdir}/X11/Xcms.txt"
 FILES_${PN}-locale += "${datadir}/X11/locale ${libdir}/X11/locale"
Signature · 1 line
1.7.4.1
#11 lore raw

PATCH 6/7 openjade: fix build with GCC 4.6

In reply to Joshua Lock

From: Joshua Lock <[email protected]>

In GCC 4.6 the compiler no longer allows objects of const-qualified type to be default initialized unless the type has a user-declared default constructor.

Patch from Gentoo bugzilla: http://bugs.gentoo.org/show_bug.cgi?id=358021

---
 .../user-declared-default-constructor.patch        |   88 ++++++++++++++++++++
 .../openjade/openjade-native_1.3.2.bb              |    5 +-
 2 files changed, 91 insertions(+), 2 deletions(-)
 create mode 100644 meta/recipes-devtools/openjade/openjade-1.3.2/user-declared-default-constructor.patch
meta/recipes-devtools/openjade/openjade-1.3.2/user-declared-default-constructor.patch new file +88 -0
new file mode 100644
index 0000000..2f2adfe
@@ -0,0 +1,88 @@
+In GCC 4.6 the compiler no longer allows objects of const-qualified type to
+be default initialized unless the type has a user-declared default
+constructor.
+
+Patch from Gentoo bugzilla: http://bugs.gentoo.org/show_bug.cgi?id=358021
+
+Gentoo Bugzilla description follows:
+"If a class or struct has no user-defined default constructor, C++ doesn't
+allow you to default construct a const instance of it.
+
+https://bugs.gentoo.org/358021
+http://clang.llvm.org/compatibility.html#default_init_const
+http://gcc.gnu.org/PR44499"
+
+--- a/jade/TeXFOTBuilder.cxx
++++ b/jade/TeXFOTBuilder.cxx
+@@ -88,6 +88,8 @@ public:
+       value.convertString(nic_.placement);
+       }
+     ExtensionFlowObj *copy() const { return new PageFloatFlowObj(*this); }
++  public:
++    PageFloatFlowObj() {}
+   private:
+     PageFloatNIC nic_;
+     StringC name_;
+@@ -101,6 +103,8 @@ public:
+       fotb.endPageFootnote();
+     }
+     ExtensionFlowObj *copy() const { return new PageFootnoteFlowObj(*this); }
++  public:
++    PageFootnoteFlowObj() {}
+   private:
+   };
+   //////////////////////////////////////////////////////////////////////
+--- a/jade/TransformFOTBuilder.cxx
++++ b/jade/TransformFOTBuilder.cxx
+@@ -41,6 +41,7 @@ public:
+   };
+   class EntityRefFlowObj : public TransformExtensionFlowObj {
+   public:
++    EntityRefFlowObj() {}
+     void atomic(TransformFOTBuilder &fotb, const NodePtr &) const {
+       fotb.entityRef(name_);
+     }
+@@ -56,6 +57,7 @@ public:
+   };
+   class ProcessingInstructionFlowObj : public TransformExtensionFlowObj {
+   public:
++    ProcessingInstructionFlowObj() {}
+     void atomic(TransformFOTBuilder &fotb, const NodePtr &) const {
+       fotb.processingInstruction(data_);
+     }
+@@ -98,6 +100,8 @@ public:
+       }
+     }
+     ExtensionFlowObj *copy() const { return new EmptyElementFlowObj(*this); }
++  public:
++    EmptyElementFlowObj() {}
+   private:
+     ElementNIC nic_;
+   };
+@@ -133,6 +137,8 @@ public:
+       }
+     }
+     ExtensionFlowObj *copy() const { return new ElementFlowObj(*this); }
++  public:
++    ElementFlowObj() {}
+   private:
+     ElementNIC nic_;
+   };
+@@ -150,6 +156,8 @@ public:
+       value.convertString(systemId_);
+     }
+     ExtensionFlowObj *copy() const { return new EntityFlowObj(*this); }
++  public:
++    EntityFlowObj() {}
+   private:
+     StringC systemId_;
+   };
+@@ -174,6 +182,8 @@ public:
+       }
+     }
+     ExtensionFlowObj *copy() const { return new DocumentTypeFlowObj(*this); }
++  public:
++    DocumentTypeFlowObj() {}
+   private:
+     DocumentTypeNIC nic_;
+   };
meta/recipes-devtools/openjade/openjade-native_1.3.2.bb +3 -2
index 0de8b96..5c1037a 100644
@@ -7,13 +7,14 @@ SECTION = "base"
 LICENSE = "BSD"
 LIC_FILES_CHKSUM = "file://COPYING;md5=641ff1e4511f0a87044ad42f87cb1045"
 
-PR = "r1"
+PR = "r2"
 
 DEPENDS = "opensp-native sgml-common-native"
 RDEPENDS_${PN} = "sgml-common"
 
 SRC_URI = "${SOURCEFORGE_MIRROR}/openjade/openjade-${PV}.tar.gz \
-           file://makefile.patch"
+           file://makefile.patch \
+	   file://user-declared-default-constructor.patch"
 
 SRC_URI[md5sum] = "7df692e3186109cc00db6825b777201e"
 SRC_URI[sha256sum] = "1d2d7996cc94f9b87d0c51cf0e028070ac177c4123ecbfd7ac1cb8d0b7d322d1"
Signature · 1 line
1.7.4.1
#12 lore raw

PATCH 7/7 xserver-xf86: explicitly disable fop document generation

In reply to Joshua Lock

From: Joshua Lock <[email protected]>

---
 .../xorg-xserver/xserver-xf86-common.inc           |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
meta/recipes-graphics/xorg-xserver/xserver-xf86-common.inc +1 -0
index f9ea0e4..b1a0f08 100644
@@ -34,3 +34,4 @@ FILES_${PN}-dbg += "${libdir}/xorg/modules/.debug \
 
 SRC_URI += "file://macro_tweak.patch"
 
+EXTRA_OECONF = "--with-fop=no"
Signature · 1 line
1.7.4.1
#13 lore raw
In reply to Joshua Lock
Quoted 19 lines · Joshua Lock

From: Joshua Lock <[email protected]>

Folks,

Attached is a series of patches to ensure we can run oe-core builds on the soon to be released Fedora 15.

I don't think any of these should be too controversial and with the series applied I am able to build both minimal and sato images on my Fedora 15 box.

Pull URL: git://git.openembedded.org/openembedded-core-contrib
Branch: josh/fedora15
Browse: http://git.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=josh/fedora15

Thanks,
Joshua Lock <[email protected]>
---

Quoted 9 lines

Joshua Lock (7):
elfutils: fix builds with gcc 4.6
python-native: add missing SRC_URI hashes
libx11: add missing SRC_URI hashes xorg-[lib-common|proto-common]: disable use of fop document
generation
libx11: disable building of specs
openjade: fix build with GCC 4.6
xserver-xf86: explicitly disable fop document generation

Merged to master, thanks!

Richard

#2 lore raw

Re: [PATCH 1/7] elfutils: fix builds with gcc 4.6

In reply to Joshua Lock
Quoted 17 lines · Joshua Lock

From: Joshua Lock<[email protected]>

gcc 4.6 (as used in Fedora 15) adds some extra warnings which are included with Werror. The new unused-but-set variable warning causes an error in libasm of elfutils. Work around this by removing unused-but-set from Werror.

---
  meta/recipes-devtools/elfutils/elfutils_0.148.bb |    4 ++++
  1 files changed, 4 insertions(+), 0 deletions(-)
meta/recipes-devtools/elfutils/elfutils_0.148.bb +0 -0
index b2f700e..c395be8 100644

meta/recipes-devtools/elfutils/elfutils_0.148.bb SRC_URI += "\ · line 46

Quoted 7 lines
meta/recipes-devtools/elfutils/elfutils_0.148.bb +4 -0
@@ -40,6 +40,10 @@ SRC_URI += "\
 
  inherit autotools
 
+# GCC 4.6.0 raises an unused-but-set warning in libasm, for now remove
+# this warning from Werror
+CFLAGS_virtclass-native += "-Wno-error=unused-but-set-variable"
+

unused-but-set-variable is a new option in gcc 4.6 which means this will cause problems with older gcc's as they wont recognize this option and not all distros have gcc 4.6 as base compiler. Have you tried compiling this patchset on a build machine which has older gcc ? say 4.5

Quoted 3 lines
meta/recipes-devtools/elfutils/elfutils_0.148.bb +0 -0
  EXTRA_OECONF = "--program-prefix=eu-"
 
  do_configure_prepend() {
#3 lore raw

Re: [PATCH 1/7] elfutils: fix builds with gcc 4.6

Quoted 22 lines · Khem Raj
Quoted 21 lines · Joshua Lock

From: Joshua Lock<[email protected]>

gcc 4.6 (as used in Fedora 15) adds some extra warnings which are included with Werror. The new unused-but-set variable warning causes an error in libasm of elfutils. Work around this by removing unused-but-set from Werror.

---
meta/recipes-devtools/elfutils/elfutils_0.148.bb | 4 ++++

1 files changed, 4 insertions(+), 0 deletions(-)
meta/recipes-devtools/elfutils/elfutils_0.148.bb +0 -0
index b2f700e..c395be8 100644
@@ -40,6 +40,10 @@ SRC_URI += "\
 

inherit autotools

Quoted 11 lines

meta/recipes-devtools/elfutils/elfutils_0.148.bb SRC_URI += "\ · line 46

Quoted 4 lines
meta/recipes-devtools/elfutils/elfutils_0.148.bb +4 -0
+# GCC 4.6.0 raises an unused-but-set warning in libasm, for now remove
+# this warning from Werror
+CFLAGS_virtclass-native += "-Wno-error=unused-but-set-variable"
+

unused-but-set-variable is a new option in gcc 4.6 which means this will cause problems with older gcc's as they wont recognize this option and not all distros have gcc 4.6
as base compiler. Have you tried compiling this patchset on a build machine which has older gcc ? say 4.5

may be this patch would help to get rid of using this option
https://fedorahosted.org/pipermail/elfutils-devel/attachments/20110401/d91b26be/attachment.bin

Quoted 4 lines
Quoted 3 lines

EXTRA_OECONF = "--program-prefix=eu-"

do_configure_prepend() {

#4 lore raw

Re: [PATCH 1/7] elfutils: fix builds with gcc 4.6

In reply to Khem Raj
Quoted 21 lines · Khem Raj
Quoted 20 lines · Joshua Lock

From: Joshua Lock<[email protected]>

gcc 4.6 (as used in Fedora 15) adds some extra warnings which are included with Werror. The new unused-but-set variable warning causes an error in libasm of elfutils. Work around this by removing unused-but-set from Werror.

---
  meta/recipes-devtools/elfutils/elfutils_0.148.bb |    4 ++++
  1 files changed, 4 insertions(+), 0 deletions(-)
meta/recipes-devtools/elfutils/elfutils_0.148.bb +0 -0
index b2f700e..c395be8 100644
@@ -40,6 +40,10 @@ SRC_URI += "\
 
  inherit autotools
 
Quoted 10 lines

meta/recipes-devtools/elfutils/elfutils_0.148.bb SRC_URI += "\ · line 46

Quoted 4 lines
meta/recipes-devtools/elfutils/elfutils_0.148.bb +4 -0
+# GCC 4.6.0 raises an unused-but-set warning in libasm, for now remove
+# this warning from Werror
+CFLAGS_virtclass-native += "-Wno-error=unused-but-set-variable"
+

unused-but-set-variable is a new option in gcc 4.6 which means this will cause problems with older gcc's as they wont recognize this option and not all distros have gcc 4.6
as base compiler. Have you tried compiling this patchset on a build machine which has older gcc ? say 4.5

I had not but thanks for pointing this out. I'll work up a new patch and make sure to test it on a machine with an older GCC.

Cheers,
Joshua

Signature · 3 lines
Joshua Lock
        Yocto Build System Monkey
        Intel Open Source Technology Centre
#5 lore raw

Re: [PATCH 1/7] elfutils: fix builds with gcc 4.6

Quoted 33 lines · Joshua Lock
Quoted 21 lines · Khem Raj
Quoted 20 lines · Joshua Lock

From: Joshua Lock<[email protected]>

gcc 4.6 (as used in Fedora 15) adds some extra warnings which are included with Werror. The new unused-but-set variable warning causes an error in libasm of elfutils. Work around this by removing unused-but-set from Werror.

---
  meta/recipes-devtools/elfutils/elfutils_0.148.bb |    4 ++++

  1 files changed, 4 insertions(+), 0 deletions(-)
meta/recipes-devtools/elfutils/elfutils_0.148.bb +0 -0
index b2f700e..c395be8 100644
@@ -40,6 +40,10 @@ SRC_URI += "\
 

  inherit autotools

Quoted 10 lines

meta/recipes-devtools/elfutils/elfutils_0.148.bb SRC_URI += "\ · line 46

Quoted 4 lines
meta/recipes-devtools/elfutils/elfutils_0.148.bb +4 -0
+# GCC 4.6.0 raises an unused-but-set warning in libasm, for now remove
+# this warning from Werror
+CFLAGS_virtclass-native += "-Wno-error=unused-but-set-variable"
+

unused-but-set-variable is a new option in gcc 4.6 which means this will cause problems with older gcc's as they wont recognize this option and not all distros have gcc 4.6
as base compiler. Have you tried compiling this patchset on a build machine which has older gcc ? say 4.5

Quoted 3 lines

I had not but thanks for pointing this out. I'll work up a new patch and make sure to test it on a machine with an older GCC.

IMO either disabling Werror completely or fixing the problem are only two alternatives

Quoted 13 lines

Cheers,
Joshua
--
Joshua Lock
       Yocto Build System Monkey
       Intel Open Source Technology Centre

_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core

#6 lore raw

Re: [PATCH 1/7] elfutils: fix builds with gcc 4.6

Quoted 34 lines · Khem Raj
Quoted 33 lines · Joshua Lock
Quoted 31 lines · Khem Raj
Quoted 17 lines · Joshua Lock

From: Joshua Lock<[email protected]>

gcc 4.6 (as used in Fedora 15) adds some extra warnings which are included with Werror. The new unused-but-set variable warning causes an error in libasm of elfutils. Work around this by removing unused-but-set from Werror.

---
  meta/recipes-devtools/elfutils/elfutils_0.148.bb |    4 ++++
  1 files changed, 4 insertions(+), 0 deletions(-)
meta/recipes-devtools/elfutils/elfutils_0.148.bb +0 -0
index b2f700e..c395be8 100644

meta/recipes-devtools/elfutils/elfutils_0.148.bb SRC_URI += "\ · line 46

Quoted 7 lines
meta/recipes-devtools/elfutils/elfutils_0.148.bb +4 -0
@@ -40,6 +40,10 @@ SRC_URI += "\
 
  inherit autotools
 
+# GCC 4.6.0 raises an unused-but-set warning in libasm, for now remove
+# this warning from Werror
+CFLAGS_virtclass-native += "-Wno-error=unused-but-set-variable"
+

unused-but-set-variable is a new option in gcc 4.6 which means this will cause problems with older gcc's as they wont recognize this option and not all distros have gcc 4.6
as base compiler. Have you tried compiling this patchset on a build machine which has older gcc ? say 4.5

Quoted 6 lines
Quoted 3 lines

I had not but thanks for pointing this out. I'll work up a new patch and make sure to test it on a machine with an older GCC.

IMO either disabling Werror completely or fixing the problem are only two alternatives

Agreed. I've gone the route of fixing the problem and have pulled in a series of patches from upstream. I haven't yet had the chance to test on GCC other than 4.6 but will send a pull request shortly.

Regards,
Joshua

Signature · 3 lines
Joshua Lock
        Yocto Build System Monkey
        Intel Open Source Technology Centre