[oe] [meta-oe][PATCH v2 3/7] libldb: add new recipe

Bian, Naimeng biannm at cn.fujitsu.com
Tue Jun 23 05:47:39 UTC 2015


> -----Original Message-----
> From: openembedded-devel-bounces at lists.openembedded.org
> [mailto:openembedded-devel-bounces at lists.openembedded.org] On Behalf Of
> Martin Jansa
> Sent: Friday, June 19, 2015 11:57 PM
> To: openembedded-devel at lists.openembedded.org
> Subject: Re: [oe] [meta-oe][PATCH v2 3/7] libldb: add new recipe
> 
> On Wed, Jun 17, 2015 at 03:49:09PM +0800, Bian Naimeng wrote:
> > libldb is required by samba4
> >
> > Signed-off-by: Bian Naimeng <biannm at cn.fujitsu.com>
> > ---
> >  .../do-not-import-target-module-in-configure.patch | 32 +++++++++++++++
> >  meta-oe/recipes-support/libldb/libldb_1.1.17.bb    | 45
> ++++++++++++++++++++++
> >  2 files changed, 77 insertions(+)
> >  create mode 100644
> > meta-oe/recipes-support/libldb/libldb/do-not-import-target-module-in-c
> > onfigure.patch  create mode 100644
> > meta-oe/recipes-support/libldb/libldb_1.1.17.bb
> 
> Fails to build in bitbake world:
> 
> | Checking for system tdb >=
> 1.2.13                                                 : yes
> | ERROR: Python module pytdb of version 1.2.13 not found, and bundling
> | disabled
> | WARNING: exit code 1 from a shell command.
> | ERROR: Function failed: do_configure (log file is located at
> | /home/jenkins/oe/world/shr-core/tmp-glibc/work/core2-64-oe-linux/libld
> | b/1.1.17-r0/temp/log.do_configure.22697)
> NOTE: recipe libldb-1.1.17-r0: task do_configure: Failed
> ERROR: Task 25505
> (/home/jenkins/oe/world/shr-core/meta-openembedded/meta-oe/recipes-support
> /libldb/libldb_1.1.17.bb, do_configure) failed with exit code '1'
> 

tdb.so is provided by libtdb which is DEPEND-ed by libldb, I think it should be installed into
STAGING_DIR_HOST/PYTHON_SITEPACKAGES_DIR.

Because I could not reproduce it in my building, would you mind telling me whether does tdb.so exist 
in STAGING_DIR_HOST/PYTHON_SITEPACKAGES_DIR/ while this error was caught.

Thanks
 Bian

> > diff --git
> > a/meta-oe/recipes-support/libldb/libldb/do-not-import-target-module-in
> > -configure.patch
> > b/meta-oe/recipes-support/libldb/libldb/do-not-import-target-module-in
> > -configure.patch
> > new file mode 100644
> > index 0000000..b4d522a
> > --- /dev/null
> > +++ b/meta-oe/recipes-support/libldb/libldb/do-not-import-target-modul
> > +++ e-in-configure.patch
> > @@ -0,0 +1,32 @@
> > +Some module can be loaded while cross compile, we jst check whether
> > +the module exist
> > +
> > +Signed-off-by: Bian Naimeng <biannm at cn.fujitsu.com>
> > +
> > +--- ldb-1.1.17.orig/buildtools/wafsamba/samba_bundled.py	2014-05-05
> 17:00:41.000000000 +0900
> > ++++ ldb-1.1.17/buildtools/wafsamba/samba_bundled.py	2015-06-15
> 10:09:50.210000217 +0900
> > +@@ -1,7 +1,7 @@
> > + # functions to support bundled libraries
> > +
> > + from Configure import conf
> > +-import sys, Logs
> > ++import sys, Logs, imp
> > + from samba_utils import *
> > +
> > + def PRIVATE_NAME(bld, name, private_extension, private_library):
> > +@@ -222,6 +222,16 @@ def CHECK_BUNDLED_SYSTEM_PYTHON(conf, li
> > +         m = __import__(modulename)
> > +     except ImportError:
> > +         found = False
> > ++
> > ++        build_arch = os.environ["BUILD_ARCH"]
> > ++        host_arch = os.environ["HOST_ARCH"]
> > ++        if build_arch != host_arch:
> > ++            # Some modules maybe can not be imported while cross compile
> > ++            # We just check whether the module exist
> > ++            stuff = imp.find_module(modulename,
> [os.environ["PYTHONPATH"]])
> > ++            if stuff != None:
> > ++                Logs.warn('Cross module[%s] has been found, but can not
> be loaded.' % (stuff[1]))
> > ++                found = True
> > +     else:
> > +         try:
> > +             version = m.__version__
> > diff --git a/meta-oe/recipes-support/libldb/libldb_1.1.17.bb
> > b/meta-oe/recipes-support/libldb/libldb_1.1.17.bb
> > new file mode 100644
> > index 0000000..17607f7
> > --- /dev/null
> > +++ b/meta-oe/recipes-support/libldb/libldb_1.1.17.bb
> > @@ -0,0 +1,45 @@
> > +SUMMARY = "Hierarchical, reference counted memory pool system with
> destructors"
> > +HOMEPAGE = "http://ldb.samba.org"
> > +SECTION = "libs"
> > +LICENSE = "LGPL-3.0+ & LGPL-2.1+ & GPL-3.0+"
> > +
> > +DEPENDS += "libtdb talloc libtevent libtdb"
> > +RDEPENDS_${PN} += "libtevent popt libtalloc"
> > +RDEPENDS_pyldb += "python libtdb libtalloc"
> > +
> > +SRC_URI = "http://samba.org/ftp/ldb/ldb-${PV}.tar.gz \
> > +           file://do-not-import-target-module-in-configure.patch"
> > +
> > +LIC_FILES_CHKSUM =
> "file://${COREBASE}/meta/files/common-licenses/LGPL-3.0;md5=bfccfe952269ff
> f2b407dd11f2f3083b \
> > +
> file://${COREBASE}/meta/files/common-licenses/LGPL-2.1;md5=1a6d268fd218675
> ffea8be556788b780 \
> > +
> file://${COREBASE}/meta/files/common-licenses/GPL-3.0;md5=c79ff39f19dfec6d
> 293b95dea7b07891"
> > +
> > +SRC_URI[md5sum] = "7c2ab4e3f2a4186493aa06eabbc61cc0"
> > +SRC_URI[sha256sum] =
> "b9a312aad19e9463716d257d8f2529fd7fc1a5ef24f6dcdc0c4a1930d7bdb6e6"
> > +
> > +inherit waf-samba
> > +
> > +S = "${WORKDIR}/ldb-${PV}"
> > +
> > +EXTRA_OECONF += "--disable-rpath \
> > +                 --disable-rpath-install \
> > +                 --bundled-libraries=NONE \
> > +                 --builtin-libraries=replace \
> > +                 --with-modulesdir=${libdir}/ldb/modules \
> > +                 --with-privatelibdir=${libdir}/ldb \
> > +                 --with-libiconv=${STAGING_DIR_HOST}${prefix}\
> > +                "
> > +
> > +PACKAGES += "pyldb pyldb-dbg pyldb-dev"
> > +
> > +FILES_${PN} += "${libdir}/ldb/*"
> > +FILES_${PN}-dbg += "${libdir}/ldb/.debug/* \
> > +                    ${libdir}/ldb/modules/ldb/.debug/*"
> > +
> > +FILES_pyldb = "${libdir}/python${PYTHON_BASEVERSION}/site-packages/* \
> > +               ${libdir}/libpyldb-util.so.1 \
> > +               ${libdir}/libpyldb-util.so.1.1.17 \
> > +              "
> > +FILES_pyldb-dbg =
> "${libdir}/python${PYTHON_BASEVERSION}/site-packages/.debug \
> > +                   ${libdir}/.debug/libpyldb-util.so.1.1.17"
> > +FILES_pyldb-dev = "${libdir}/libpyldb-util.so"
> > --
> > 1.9.1
> >
> > --
> > _______________________________________________
> > Openembedded-devel mailing list
> > Openembedded-devel at lists.openembedded.org
> > http://lists.openembedded.org/mailman/listinfo/openembedded-devel
> 
> --
> Martin 'JaMa' Jansa     jabber: Martin.Jansa at gmail.com


More information about the Openembedded-devel mailing list