Installing PJSIP Colibri iMX7

I am trying to install PJSIP on my Colibri iMX7 with Ubuntu 16.04 but I have some problems…
This is my recipe.

And the problems I have are :

  1. Sometimes Yocto seems to compile without taking note of my layer and sometimes yes…
    I do have added my layer in the bblayers file because sometimes the changes I do in my recipe are in my image but most of the time not…
  2. For installing the python library of PJSIP we have to do make or
    python setup.py install in the pjsip-apps/src/python/ folder.
    Why this in the recip:

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

    oe_runmake

    It’s not working? (I say so because if I do python --> import pjsua
    on the target it’s not working) How can I install it without doing
    it by hand after : cp -r ${S}/pjsip-apps/src/python/* ${D}/usr/pjsip-python --no-preserve=ownership in the recip ?

Thank you for your help !

  1. Not sure what you are exactly asking here. Bitbake definitly should parse your bblayers.conf file and act accordingly. You can use bitbake-layers show-layers to get a list of layers bitbake will use, and bitbake-layers show-recipies to get a list of recipes.
  2. I guess the normal makefile can not handle the Python module installation directly, or at least not in a cross compilation environment we deal here with. pjsip-apps/src/python/setup.py seems to make use of distutils. OpenEmbedded has support for building Python modules using distutils. Normally the way to do this is creating a separate recipe which inherits distutils. I would create a base image (which has the sources defined etc, e.g. pjsip.inc) and then create one recipe for the main app (pjsip_$VER.bb) and one for the Python module (e.g. pjsip-python_$VER.bb). The latter would then include distutils and set the source directory directly to where setup.py is located (something like `S = “${WORKDIR}/pjsip-apps/src/python/” or similar). That said, I did not test that approach, the detail and whether that approach really works depends on various factors, such as whether the Python module has dependencies to the rest of the source…

Thank you for your help.

  1. I solved my problem doing a clean building folder.
  2. I don’t think this is going to change anything. If it’s not installing it with my current recip, why doing two recipes will change something?
  3. I am a bit lost about how doing it and I can’t find good explanations…

Can’t I just install the files with make in a tmp-folder and install them manually ? I tried with DESTDIR but it’s not working…

Creating two recipe and distutils bbclass in the python folder. That will change the behavior of OpenEmbedded: It will try to build a package from the python module…

There are some notes in the Yocto reference manual. Questions such as this on StackOverflow might help, or looking at other examples which use distutils (grep for require distutils). Otherwise studying the source might help too…

I’m think I’m having the same issue but I’m using Colibri iMX6. Can you confirm I need to use solution proposed in 2.?

I created a layer for pjsip and used a .bb from this post:

Here is the error I get when I try $bitbake pjsip
| make[2]: Leaving directory ‘/home/aaron/oe-core/build/tmp-glibc/work/armv7at2hf-neon-mx6qdl-angstrom-linux-gnueabi/pjsip/2.6-r0/pjproject-2.6/pjsip-apps/build’
| make[1]: Leaving directory ‘/home/aaron/oe-core/build/tmp-glibc/work/armv7at2hf-neon-mx6qdl-angstrom-linux-gnueabi/pjsip/2.6-r0/pjproject-2.6/pjsip-apps/build’
| NOTE: make
| python setup.py build
| running build
| running build_py
| running build_ext
| error: invalid Python installation: unable to open /home/aaron/oe-core/build/tmp-glibc/work/armv7at2hf-neon-mx6qdl-angstrom-linux-gnueabi/pjsip/2.6-r0/recipe-sysroot/usr/lib/python2.7/config/Makefile (No such file or directory)
| Makefile:2: recipe for target ‘all’ failed
| make: *** [all] Error 1
| ERROR: oe_runmake failed
| WARNING: /home/aaron/oe-core/build/tmp-glibc/work/armv7at2hf-neon-mx6qdl-angstrom-linux-gnueabi/pjsip/2.6-r0/temp/run.do_compile.25391:1 exit 1 from ‘exit 1’
| ERROR: Function failed: do_compile (log file is located at /home/aaron/oe-core/build/tmp-glibc/work/armv7at2hf-neon-mx6qdl-angstrom-linux-gnueabi/pjsip/2.6-r0/temp/log.do_compile.25391)
ERROR: Task (/home/aaron/oe-core/build/…/layers/meta-pjsip/recipes-pjsip/pjsip/pjsip_2.6.bb:do_compile) failed with exit code ‘1’
NOTE: Tasks Summary: Attempted 1817 tasks of which 1816 didn’t need to be rerun and 1 failed.
NOTE: Writing buildhistory

Summary: 1 task failed:
/home/aaron/oe-core/build/…/layers/meta-pjsip/recipes-pjsip/pjsip/pjsip_2.6.bb:do_compile

Hi aaron

Welcome to the community. Can you please ask a new question? Thanks.
By the way, the solution proposed in the community post worked.