[yocto] Building pjproject with python module

Jens Lucius incnews at jenslucius.de
Thu May 22 08:00:43 PDT 2014


Hi

I already asked this question before (got no answer) and thought I had it running,
but since I had to re-setup my yocto installation it runs into errors again.
Maybe somebody can help me with this issue?

I am trying to bitbake pjproject including the python module. I manged
to write a working .bb recipe for the latest pjproject, which compiles
and installes correctly. But I also want to build the python module.

The documentation of pjproject says about building the python module:

  1. Build the PJSIP libraries first with the usual "./configure && make
     dep && make" commands.
  2. Go to pjsip-apps/src/python directory.
  3. Run *'sudo python ./setup.py install'* or just *'sudo make'*

So I guess with the working recipe I got part 1. I tried to do stepts 2
and 3 by adding the following:

do_compile_append() {
export BUILD_SYS
export HOST_SYS
export STAGING_INCDIR
export STAGING_LIBDIR

cd ${S}/pjsip-apps/src/python
oe_runmake
}

which starts the building process but then terminates with:

|/  cc1: warning: include location "/usr/include/python2.7" is unsafe for
/cross-compilation [-Wpoison-system-directories]
|/  In file included from _pjsua.c:20:0:
/|/  _pjsua.h:25:20: fatal error: Python.h: No such file or directory
/
So can I build them both in one recipe and how? And if built correctly
how to install the modules? I also tried to split the build into two .bb files.

Thanks for your help.

(Here is the pjproject bb)
--------
DESCRIPTION = "Open source SIP stack and media stack for presence, im/instant \
                messaging, and multimedia communication"
SECTION = "libs"
HOMEPAGE = "http://www.pjsip.org/"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
DEPENDS = "alsa-lib openssl python"

PARALLEL_MAKE = ""

SRC_URI = "http://www.pjsip.org/release/${PV}/pjproject-${PV}.tar.bz2 "
SRC_URI[md5sum] = "6ed4bb7750c827dc1d881e209a3b62db"
SRC_URI[sha256sum] = "da1933336b38b65ff2254bed05ea1076531b16915777a252ea999cf7f3284cb3"
S = "${WORKDIR}/pjproject-${PV}"

inherit autotools pkgconfig

EXTRA_OECONF += "STAGING_DIR=${STAGING_DIR_NATIVE}"

do_configure_prepend () {
         export LD="${CC}"
}

do_compile_prepend() {
         oe_runmake dep
}


do_install_prepend() {
     install -d ${D}/usr/bin
     install -m 755 ${S}/pjsip-apps/bin/pj* ${D}/usr/bin
}
  

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/yocto/attachments/20140522/72899bd6/attachment.html>


More information about the yocto mailing list