Qt and pjsip toolchain for Colibri iMX6

Deer Sir,

I have built a qt enabled image and a host tool chain with open embedded layers with bitbake and angstrom-qt5-x11-image recipe now I want to add pjsip and it’s modules to image and to my host tool chain.
for this purpose I followed this link:

cross compile pjsip for Colibri imx7

after installing sdk on my host machine in /usr/local/oecore-x86_64 with this command:

./angstrom-glibc-x86_64-armv7at2hf-neon-v2017.12-toolchain.sh

it seems that only include and pkgconfig file copied to directory and no library file were there so when i try to run pjsip functions on qt i will get undefined refrence to pjsip libraries.

also I can find pjsip library in /home/amin/oe-core/build/tmp-glibc/sysroots-components/armv7at2hf-neon-mx6qdl/pjproject/usr/lib

and this is my recipe file pjproject2.6.bb

appreciate any help

Hi @amin,

Can you please detail which Toradex BSP are you using?

And, how are your local.conf and bblayers.conf set?

Can you confirm that the pjsip is being installed in the generated image?

Best regards,
André Curvello

Hello

From deployed image I can see that my Toradex BSP version is 2.8b7

Here is my bblayers.conf and local.conf also added pjproject to image_install in recipe

I think that pjsip is completely installed in target because I can find pjsip in /home/amin/oe-core/build/buildhistory/packages/armv7at2hf-neon-mx6qdl-angstrom-linux-gnueabi/pjproject but also I cant find it in native sdk build history

Further more in bitbake procedure i can see it compile pjproject from external source

Thanks for your reply

Hi @amin,

What is the content of the generated -dev package for your pjproject2.6.bb recipe?

And… Considering that you are preparing an environment for development, why are you using the BSP 2.8b7?

It’s quite old, and we only maintain the 2.8b7 as LTS support for solutions already in production.

If you are working on the development of a new project, we strongly recommend a more recent LTS BSP, like the BSP 3.0b4 (or 3.0.4).

Could you try to configure a Yocto build with BSP 3.0.4?

Best regards,
André Curvello

Actually now I’m developing a project that has been written on Toradex BSP 2.8b7 because of that I prefer to use older version if that would be possible.

What do you mean by generated -dev package should I run devtool build pjproject?

@amin, Yocto normally generated “*-dev” packages for the recipes, in which it integrate the development resources for that package.

Can you please check if there is any sort of “pjproject2.6-dev” in your Yocto build generated packages?

Yes,I can find some of these files in my oe-core directory here is a picture of them pic

Hi @amin,

Well… The development package is there.

Please, can you confirm which command are you using to build the SDK?

Best regards,
André Curvello

I use populated sdk, more accurately this command:

bitbake angstrom-qt5-x11-image -c populate_sdk

Hi @amin

Can you try to search for the library in the install path of the toolchain? Is the library there? Maybe only the paths are wrong. Do a:

find <path to toolchain> -name "*pj*"

Regards,
Stefan

Hello

This file has all directories Dirs

As you can see there are some nativesdk-pjproject there to produce these files these are the new changes I made to add pjproject to my host(correct me if I’m wrong)

I removed libv4l dependency since we don’t want video and changed local.conf and nativesdk-packagegroup-sdk-host.bb

But now I get some errors

Thanks for your reply

Hi @amin

Sorry I didn’t mean what you have in the yocto build directory. As I understood you build the toolchain with -c populate_sdk and then you install it with ./angstrom-glibc-x86_64-armv7at2hf-neon-v2017.12-toolchain.sh. You install this toolchain to a directory (default /usr/lcoal/something). So you should run the find command there:

find /usr/local/something -name "*pj*"

Regards,
Stefan

Ok so here are the directories you want Dirs

Hi @amin and @stefan_e.tx,

The pjsip headers are there:

./sysroots/armv7at2hf-neon-angstrom-linux-gnueabi/usr/include/pjmedia.h
./sysroots/armv7at2hf-neon-angstrom-linux-gnueabi/usr/include/pjsip-ua
./sysroots/armv7at2hf-neon-angstrom-linux-gnueabi/usr/include/pj
./sysroots/armv7at2hf-neon-angstrom-linux-gnueabi/usr/include/pjnath.h
./sysroots/armv7at2hf-neon-angstrom-linux-gnueabi/usr/include/pjsip_simple.h
./sysroots/armv7at2hf-neon-angstrom-linux-gnueabi/usr/include/pjmedia
./sysroots/armv7at2hf-neon-angstrom-linux-gnueabi/usr/include/pjsua2.hpp
./sysroots/armv7at2hf-neon-angstrom-linux-gnueabi/usr/include/pj++
./sysroots/armv7at2hf-neon-angstrom-linux-gnueabi/usr/include/pjsua.h
./sysroots/armv7at2hf-neon-angstrom-linux-gnueabi/usr/include/pjlib-util.h
./sysroots/armv7at2hf-neon-angstrom-linux-gnueabi/usr/include/pjsip
./sysroots/armv7at2hf-neon-angstrom-linux-gnueabi/usr/include/pjsip.h
./sysroots/armv7at2hf-neon-angstrom-linux-gnueabi/usr/include/pjmedia_audiodev.h
./sysroots/armv7at2hf-neon-angstrom-linux-gnueabi/usr/include/pjmedia-codec.h
./sysroots/armv7at2hf-neon-angstrom-linux-gnueabi/usr/include/pjsip_ua.h
./sysroots/armv7at2hf-neon-angstrom-linux-gnueabi/usr/include/pjsua-lib
./sysroots/armv7at2hf-neon-angstrom-linux-gnueabi/usr/include/pjsua-lib/pjsua_internal.h
./sysroots/armv7at2hf-neon-angstrom-linux-gnueabi/usr/include/pjsua-lib/pjsua.h
./sysroots/armv7at2hf-neon-angstrom-linux-gnueabi/usr/include/pjmedia_videodev.h
./sysroots/armv7at2hf-neon-angstrom-linux-gnueabi/usr/include/pjsip-simple
./sysroots/armv7at2hf-neon-angstrom-linux-gnueabi/usr/include/pjmedia-codec
./sysroots/armv7at2hf-neon-angstrom-linux-gnueabi/usr/include/pjlib-util
./sysroots/armv7at2hf-neon-angstrom-linux-gnueabi/usr/include/pjsip_auth.h
./sysroots/armv7at2hf-neon-angstrom-linux-gnueabi/usr/include/pjmedia-audiodev
./sysroots/armv7at2hf-neon-angstrom-linux-gnueabi/usr/include/pjnath
./sysroots/armv7at2hf-neon-angstrom-linux-gnueabi/usr/include/pjmedia-videodev

Best regards,
André Curvello

Thank a lot @andrecurvello.tx

That solved the problem now I’m able to create a static executable file with pjsip libraries and run it on my target

Also I can find library files in my tool chain directory

But one question still remains in my head, my tool chain always make a static output executable file and that’s ok but Is sdk always make a static build or I can change this procedure and make them dynamic?

Hi @amin,

I think that is related to the package behavior.
Some packages already generate dynamic libraries, others do not.

And, on those cases, we are required to “force” the generation of static development packages.

So, with that SDKIMAGE_FEATURES_append, your SDK will always generate the packages for static libraries. The dynamic ones are safe :slight_smile:

Best regards,
André Curvello

Hello @andrecurvello.tx

I forgot to ask, Should I do any updates for your comment to mark it as answer?

Best regards

No problem, I can arrange that.

@Amin,

While the headers are there, the *.so library files are not.

That explains the errors you may be facing.

Please, add the following line to your local.conf file: SDKIMAGE_FEATURES_append = " staticdev-pkgs"

After that, build and load the SDK again.

It seems there are no dynamic libraries available…

Please try that and tell us if it worked.

Best regards,
André Curvello