Skip to contentSkip to conversation

Fix recipes for uclibc and others

PATCH In review Khem Raj 2 participants 8 messages May 9, 2011 – May 10, 2011

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

cover Fix recipes for uclibc and others

These patches address build failures when using uclibc oe/patch.py fix is a backport from oe, we need to fix BBFILES for oe-core since some class code expects it to be first entry in BBFILES. gconf-dbus to dbus is needed for SDKs to compile for angstrom

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

Thanks,
Khem Raj <[email protected]>
---

Khem Raj (6):
recipes: Replace gconf-dbus with gconf conf/layer.conf: Use .= to append to BBPATH and =+ for BBFILES libgalago_0.5.2.bb: Fix compile for uclibc liburcu_0.5.4.bb: Let it build on uclibc targets lttng-ust_0.12.bb: Fix compilation on uclibc oe/patch.py: Remove series file during Clean()

 .../recipes-gnome/gnome/libgnomekbd_2.26.0.bb      |    2 +-
 meta/conf/layer.conf                               |   10 ++++-
 meta/lib/oe/patch.py                               |    1 +
 .../recipes-connectivity/galago/libgalago_0.5.2.bb |    4 ++
 meta/recipes-gnome/gnome/gnome-desktop.inc         |    2 +-
 meta/recipes-gnome/gthumb/gthumb_2.12.2.bb         |    2 +-
 meta/recipes-gnome/tasks/task-sdk-gmae.inc         |    2 +-
 .../lttng/lttng-ust/uclibc-sched_getcpu.patch      |   50 ++++++++++++++++++++
 meta/recipes-kernel/lttng/lttng-ust_0.12.bb        |    4 +-
 meta/recipes-support/libproxy/libproxy_0.4.6.bb    |    2 +-
 meta/recipes-support/liburcu/liburcu_0.5.4.bb      |    2 +-
 11 files changed, 73 insertions(+), 8 deletions(-)
 create mode 100644 meta/recipes-kernel/lttng/lttng-ust/uclibc-sched_getcpu.patch
Signature · 1 line
1.7.4.1
author
#1 lore raw

PATCH 1/6 recipes: Replace gconf-dbus with gconf

Some distributions e.g. angstrom do not support gconf-dbus anymore since its now provided by gconf and in oe-core we have PREFERRED_PROVIDER_gconf tunable, here we replace all dependencies on gconf-dbus with gconf, which should work in both cases where poky defines PREFERRED_PROVIDER-gconf = "gconf-dbus" and for angstrom it is simply gconf

Without this meta-toolchain-sdk ends up with conflicts in runqueue and does not build

---
 .../recipes-gnome/gnome/libgnomekbd_2.26.0.bb      |    2 +-
 meta/recipes-gnome/gnome/gnome-desktop.inc         |    2 +-
 meta/recipes-gnome/gthumb/gthumb_2.12.2.bb         |    2 +-
 meta/recipes-gnome/tasks/task-sdk-gmae.inc         |    2 +-
 meta/recipes-support/libproxy/libproxy_0.4.6.bb    |    2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)
meta-demoapps/recipes-gnome/gnome/libgnomekbd_2.26.0.bb +1 -1
index f2e4ec5..68e4eee 100644
@@ -1,7 +1,7 @@
 DESCRIPTION = "GNOME keyboard library"
 LICENSE = "LGPL"
 
-DEPENDS = "gconf-dbus dbus libxklavier gtk+"
+DEPENDS = "gconf dbus libxklavier gtk+"
 
 inherit gnome
 
meta/recipes-gnome/gnome/gnome-desktop.inc +1 -1
index 123f82d..336b87f 100644
@@ -1,7 +1,7 @@
 DESCRIPTION = "GNOME library for reading .desktop files"
 SECTION = "x11/gnome"
 LICENSE = "GPLv2 & LGPLv2"
-DEPENDS = "gconf-dbus libxrandr virtual/libx11 gtk+ glib-2.0 gnome-doc-utils"
+DEPENDS = "gconf libxrandr virtual/libx11 gtk+ glib-2.0 gnome-doc-utils"
 
 EXTRA_OECONF = "--disable-scrollkeeper --disable-desktop-docs"
 
meta/recipes-gnome/gthumb/gthumb_2.12.2.bb +1 -1
index 0b3bd1a..258f2d5 100644
@@ -2,7 +2,7 @@ DESCRIPTION = "gThumb is an image viewer and browser for the GNOME Desktop"
 SECTION = "x11/gnome"
 LICENSE = "GPLv2"
 LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552"
-DEPENDS = "glib-2.0 gtk+ libxml2 gnome-doc-utils libunique gconf-dbus libpng gstreamer jpeg tiff gst-plugins-base"
+DEPENDS = "glib-2.0 gtk+ libxml2 gnome-doc-utils libunique gconf libpng gstreamer jpeg tiff gst-plugins-base"
 PR = "r0"
 
 EXTRA_OECONF = "--disable-gnome-keyring --disable-libsoup --disable-exiv2 --disable-clutter"
meta/recipes-gnome/tasks/task-sdk-gmae.inc +1 -1
index 586d76f..b24fc9e 100644
@@ -4,7 +4,7 @@ SDK-GMAE = " \
     gtk+-dev \
     gstreamer-dev \
     bluez4-dev \
-    gconf-dbus-dev \
+    gconf-dev \
     avahi-dev \
     telepathy-glib-dev \
     eds-dbus-dev \
meta/recipes-support/libproxy/libproxy_0.4.6.bb +1 -1
index 255cd5b..2e18065 100644
@@ -7,7 +7,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=7d7044444a7b1b116e8783edcdb44ff4 \
                     file://utils/proxy.c;beginline=1;endline=18;md5=55152a1006d7dafbef32baf9c30a99c0"
 
 
-DEPENDS = "virtual/libx11 xmu gconf-dbus"
+DEPENDS = "virtual/libx11 xmu gconf"
 
 SRC_URI = "http://libproxy.googlecode.com/files/libproxy-${PV}.tar.gz"
 
Signature · 1 line
1.7.4.1
author
#2 lore raw

PATCH 2/6 conf/layer.conf: Use .= to append to BBPATH and =+ for BBFILES

In reply to Khem Raj

Appending to BBPATH gives a definite order to BBLAYERS which means paths are preferred in order from left to right.

---
 meta/conf/layer.conf |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)
meta/conf/layer.conf +9 -1
index 3f63c7d..10a6948 100644
@@ -2,7 +2,15 @@ BBPATH ?= ""
 # We have a conf and classes directory, add to BBPATH
 BBPATH .= ":${LAYERDIR}"
 # We have a packages directory, add to BBFILES
-BBFILES += "${LAYERDIR}/packages/*/*.bb ${LAYERDIR}/recipes-*/*/*.bb"
+# packages is still there because metadata_scm.bbclass still uses
+# it to deduce the repo directory and thats the reason to prepend
+# to BBFILES here because this class uses the first entry in
+# BBFILES to calculate the scm base.
+# since the order of BBFLILES is not that important its acted upon
+# using BBFILES_PRIORITY we are ok to keep the oe-core BBFILES dir
+# at top
+
+BBFILES =+ "${LAYERDIR}/packages/*/*.bb ${LAYERDIR}/recipes-*/*/*.bb"
 
 BBFILE_COLLECTIONS += "normal"
 BBFILE_PATTERN_normal := "^${LAYERDIR}/"
Signature · 1 line
1.7.4.1
author
#3 lore raw

PATCH 3/6 libgalago_0.5.2.bb: Fix compile for uclibc

In reply to Khem Raj

uclibc targets may not have gettext but this package still needs config.rpath during regenerating configury so we provide it when libc is uclibc.

---
 .../recipes-connectivity/galago/libgalago_0.5.2.bb |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
meta/recipes-connectivity/galago/libgalago_0.5.2.bb +4 -0
index 6d9f76b..3a47620 100644
@@ -18,3 +18,7 @@ PR = "r2"
 inherit autotools pkgconfig gettext
 
 EXTRA_OECONF = "--disable-tests --disable-check"
+
+do_configure_prepend_libc-uclibc() {
+        touch ${S}/config.rpath
+}
Signature · 1 line
1.7.4.1
author
#4 lore raw

PATCH 4/6 liburcu_0.5.4.bb: Let it build on uclibc targets

In reply to Khem Raj

uclibc requires -D_GNU_SOURCE to be defined for it to enable GNU extensions which CPU_SET/CPU_ZERO are used by this package. So we add -D_GNU_SOURCE to CFLAGS when compiling for uclibc.

---
 meta/recipes-support/liburcu/liburcu_0.5.4.bb |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
meta/recipes-support/liburcu/liburcu_0.5.4.bb +1 -1
index 8e17e5d..b83d708 100644
@@ -15,7 +15,7 @@ SRC_URI[md5sum] = "04147d24749be75200173859839207f7"
 SRC_URI[sha256sum] = "02aedbb16c16bd034e246d5c9637a9232be559c66fc2fe4eb28948e234bd89f1"
 
 S = "${WORKDIR}/userspace-rcu-${PV}"
-
+CFLAGS_append_libc-uclibc = " -D_GNU_SOURCE"
 inherit autotools
 
 # liburcu, which is only used by lttng-ust, may not build on other
Signature · 1 line
1.7.4.1
author
#5 lore raw

PATCH 5/6 lttng-ust_0.12.bb: Fix compilation on uclibc

In reply to Khem Raj

We provide alternative implementation of sched_getcpu() when compiling for uclibc

---
 .../lttng/lttng-ust/uclibc-sched_getcpu.patch      |   50 ++++++++++++++++++++
 meta/recipes-kernel/lttng/lttng-ust_0.12.bb        |    4 +-
 2 files changed, 53 insertions(+), 1 deletions(-)
 create mode 100644 meta/recipes-kernel/lttng/lttng-ust/uclibc-sched_getcpu.patch
meta/recipes-kernel/lttng/lttng-ust/uclibc-sched_getcpu.patch new file +50 -0
new file mode 100644
index 0000000..7102a69
@@ -0,0 +1,50 @@
+uClibc does not have sched_getcpu() implemented. So we create a wrapper
+to getcpu syscall when compiling for uclibc.
+
+So far execinfo.h does not exist on uclibc but it turns out to be that
+this header is not needed even in eglibc case so it can be removed
+
+Signed-off-by: Khem Raj <[email protected]>
+
+Upstream-status: Pending
+
+Index: ust-0.12/libust/tracer.h
+===================================================================
+--- ust-0.12.orig/libust/tracer.h
++++ ust-0.12/libust/tracer.h
+@@ -342,14 +342,22 @@ static __inline__ void ltt_write_trace_h
+ 	header->start_freq = trace->start_freq;
+ 	header->freq_scale = trace->freq_scale;
+ }
+-
++#ifdef __UCLIBC__
++#define sched_getcpu(cpu, node, cache) syscall(__NR_getcpu, cpu, node, cache)
++#endif
+ #ifndef UST_VALGRIND
+ 
+ static __inline__ int ust_get_cpu(void)
+ {
+ 	int cpu;
+ 
++#ifdef __UCLIBC__
++	int c, s;
++	s = syscall(__NR_getcpu, &c, NULL, NULL);
++	cpu = (s == -1) ? s : c;
++#else
+ 	cpu = sched_getcpu();
++#endif
+ 	if (likely(cpu >= 0))
+ 		return cpu;
+ 	/*
+Index: ust-0.12/libustcomm/ustcomm.c
+===================================================================
+--- ust-0.12.orig/libustcomm/ustcomm.c
++++ ust-0.12/libustcomm/ustcomm.c
+@@ -31,7 +31,6 @@
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
+-#include <execinfo.h>
+ 
+ #include "ustcomm.h"
+ #include "usterr.h"
meta/recipes-kernel/lttng/lttng-ust_0.12.bb +3 -1
index 7dadc04..5fca949 100644
@@ -12,7 +12,9 @@ DEPENDS = "liburcu"
 
 PR = "r0"
 
-SRC_URI = "http://lttng.org/files/ust/releases/ust-${PV}.tar.gz"
+SRC_URI = "http://lttng.org/files/ust/releases/ust-${PV}.tar.gz \
+           file://uclibc-sched_getcpu.patch \
+          "
 
 SRC_URI[md5sum] = "fae6e324a56016658c5b83ec14ba0043"
 SRC_URI[sha256sum] = "215b05f47d0c9e3a2934926a7d14fa9c67025db917c3a1f641df40b08314ab0c"
Signature · 1 line
1.7.4.1
author
#6 lore raw

PATCH 6/6 oe/patch.py: Remove series file during Clean()

In reply to Khem Raj

Currently if there is a failed do_patch the series files get appended so if there were two patches

a.patch
b.patch
and b.patch failed during next run it would append a.patch again a.patch
b.patch
a.patch

and this would keep growing.

We can remove series file in Clean() because we populate it in Import() anyway

---
 meta/lib/oe/patch.py |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
meta/lib/oe/patch.py +1 -0
index 16d3d08..1406e19 100644
@@ -198,6 +198,7 @@ class QuiltTree(PatchSet):
     def Clean(self):
         try:
             self._runcmd(["pop", "-a", "-f"])
+            oe.path.remove(os.path.join(self.dir, "patches","series"))
         except Exception:
             pass
         self.initialized = True
Signature · 1 line
1.7.4.1
#7 lore raw
In reply to Khem Raj
Quoted 10 lines · Khem Raj

These patches address build failures when using uclibc oe/patch.py fix is a backport from oe, we need to fix BBFILES for oe-core since some class code expects it to be first entry in BBFILES. gconf-dbus to dbus is needed for SDKs to compile for angstrom

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

Quoted 8 lines

Thanks,
Khem Raj<[email protected]>
---

Khem Raj (6):
recipes: Replace gconf-dbus with gconf conf/layer.conf: Use .= to append to BBPATH and =+ for BBFILES

Not merged, see Richard's follow-up

Quoted 17 lines

libgalago_0.5.2.bb: Fix compile for uclibc liburcu_0.5.4.bb: Let it build on uclibc targets lttng-ust_0.12.bb: Fix compilation on uclibc oe/patch.py: Remove series file during Clean()

  .../recipes-gnome/gnome/libgnomekbd_2.26.0.bb      |    2 +-
  meta/conf/layer.conf                               |   10 ++++-
  meta/lib/oe/patch.py                               |    1 +
  .../recipes-connectivity/galago/libgalago_0.5.2.bb |    4 ++
  meta/recipes-gnome/gnome/gnome-desktop.inc         |    2 +-
  meta/recipes-gnome/gthumb/gthumb_2.12.2.bb         |    2 +-
  meta/recipes-gnome/tasks/task-sdk-gmae.inc         |    2 +-
  .../lttng/lttng-ust/uclibc-sched_getcpu.patch      |   50 ++++++++++++++++++++
  meta/recipes-kernel/lttng/lttng-ust_0.12.bb        |    4 +-
  meta/recipes-support/libproxy/libproxy_0.4.6.bb    |    2 +-
  meta/recipes-support/liburcu/liburcu_0.5.4.bb      |    2 +-
  11 files changed, 73 insertions(+), 8 deletions(-)
Quoted 2 lines

create mode 100644 meta/recipes-kernel/lttng/lttng-ust/uclibc-sched_getcpu.patch

All but conf/layer.conf merged into oe-core

Thanks
Sau!