Yocto Project Boost library : Change default package version used in bitbake recipe - boost

I am developing a Linux image operating system using Yocto Project.
I am using SUMO branch (Yocto Project 2.5).
In order to install the boost library in my Linux image, I added this line to the local.conf file :
IMAGE_INSTALL_append = " boost"
But I discover that the default version installed is Boost 1.66.0.
Under meta/recipes-support/boost directory I can find three files :
recipes-support/boost/boost_1.66.0.bb
recipes-support/boost/boost-1.66.0.inc
recipes-support/boost/boost.inc
I think that those are the recipes for this library.
I need to use version 1.70.0 because I have an application coded using this version.
I don't know how to modify these recipes in order to have the desired version, or is there another method to use ? I don't find any helpful tips on the internet. Can you help me please ?
Thank you!

take a look at the openembedded layer index. There you'll find the recipe for boost 1.72. If this recipe doesn't depend on any other components of your system (like gcc version), you'll be able to add this recipe in your own layer. Then, in your build/local.conf, after IMAGE_INSTALL_append = "<YOUR_OTHER_PGS> boost" set the preferred version for boost by adding PREFERED_VERSION_boost="1.72.0" to the file and rerun bitbake.
I hope this helps.

Related

how to add yocto recipy that will be build for non-default target arch

I work for a large yocto based project which builds has a target that builds the firmware for an embedded ARM device.
One of the recipes downloads the source code and builds a component by running a "make " command in do_compile(). The compilation will use the arm toolchain internally and produce an executable for the ARM arch.
For that specific component a different "make <host_tool>" target can build a host tool that is useful when debugging binary logs obtained from the target.
The objective here is to build the "host_tool" during the bitbake process. I am not sure who should the recipy file look in such a case. Should the "MACHINE" variable be overwritten locally in that recipy file ? Should I create a completely new layer when there MACHINE for that recipy be included there ? Should I create a completely new "bitbake " target ? If the latter is the correct approach where should I place my recipy in that case ?
Thank you in advance for your help

Yocto sumo with RPI3B+ with older Boost

I have updated a meta-layer for an application based on RPI3B to Yocto sumo release. The reason why I am using now RPI3B+ (instead of RPI3B).
When doing so, I run into a problem that Boost library 1.66.0 (in sumo) is not compatible with the one i used in previous build 1.64.0.
Is there a way to force Yocto in my configuration to start using boost 1.64.0 instead of the 1.66.0 ?
Yocto allows to choose preferred version of recipe with using - PREFERRED_VERSION, add into config file line:
PREFERRED_VERSION_boost = "1.64.0"
Proof:
$ bitbake -s | grep -e Preferred -e ^boost\\s
Recipe Name Latest Version Preferred Version
boost :1.67.0-r0 :1.64.0-r0

How to install debug libraries (like lib*d) into packages in yocto

Now I am writing my master theis which is related to embedded system using yocto.
I have an ua-SDK(source code included). I need to install the ua package into sato-image, which runs on a Raspberrypi.
First of all, I write a recipe "opcua" like this:
SUMMARY = "this is a recipe for building opc-ua sdk package"
LICENSE = "MIT & RCL & OpenSSL & LGPL-3.0 & Apache-2.0"
LIC_FILES_CHKSUM = "file:///home/yocto/workspace/poky/rpiHouseHello/tmp/work/armv6-vfp-poky-linux-gnueabi/ua-new/1.0-r0/license-destdir/ua-new/generic_Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10
SRC_URI = "file:///home/yocto/workspace/poky/rpiHouseHello/downloads/uasdkcppclient-src-linux32-x86-gcc4.5.1-v1.4.2-275.tar.gz"
S = "${WORKDIR}/sdk/src"
DEPENDS += "libxml2 openssl"
inherit cmake
INSANE_SKIP_ua-new += "dev-deps"
The opcua package is installed successfully after $bitbake opcua. Then I try to add the generated opcua package into sato-image by writing another recipesato-with-ua like this
DESCRIPTION = ""
IMAGE_FEATURES += "splash package-management x11-base x11-sato ssh-server-openssh hwcodecs dbg-pkgs tools-debug debug-tweaks"
LICENSE = "MIT"
inherit core-image
IMAGE_INSTALL += " ua ua-dbg ua-staticdev ua-dev"
it was also installed successfully. After that I extracted the SDK from this image by using:
$bitbake sato-with-ua -c populated_sdk
There is also no problem. After that I try to check the functionality of this extracted SDK. My tutor gave me a test project written by c++. I try to build this project in eclipse.
But here comes the problem, Eclipse can not find the debug libraries---lib*d(for example libuabased.a) by linking libraries. I found that there is libuabase.a but no libuabased.a in my package. Location of the package:/home/yocto/workspace/poky/rpiHouse/tmp/work/armv6-vfp-poky-linux-gnueabi/opcua/1.0-r0/packages-split. In Eclipse, we develop project in debug version so it also needs libraries in debug version.
I'm confused that why yocto installed only release library but not debug library. Both are included in source code. yocto can only install one type?
so I try to modify the opcua recipe to include the debug library into my packages-split. After reading the reference of yocto I added the follows to my recipe "opcua":
PACKAGES =+ " ${PN}-alibd ${PN}-solibd"
FILES_${PN}-alibd = "${libdir}/libstackd.so"
FILES_${PN}-solibd = "${libdir}/libuabased.a ${libdir}/libuaclientd.a ${libdir}/libuapkid.a ${libdir}/libxmlparserd.a"
After bitbake opcua I got the two new packages ${PN}-alibd and ${PN}-solibd indeed, but both packages are empty. All of those libraries I listed above are not included.
My first question is that, does this variable ${libdir} indicate /usr/lib of our host machine? I found there is no lib*d.a file in that directory. So I think maybe I make a mistake by understanding this variable. what does this ${libdir} referred to?
My second question, how to install those debug libraries into my packages after bitbake the recipe? my goal is that I can get those debug libraries in the sato-with-ua image und then extract the SDK from this image.This SDK included those debug libraries so that I can link them in my Eclipse to develop my project correctly.
i am so sorry that i told a long story. This is the first time i made something related with software. so I beg your appologise.

glibc Linux based

I am currently using ubuntu 9.10 with the glibc version 2.11.1-0,
well i am doing a project, that i want to test with the another version of glibc that is 2.5-58, i wanted to know following things regarding this:
How to compile the version of 2.5-58, however keeping the previous version?
How to link the existing programs with the binaries of newer version of glibc?
I would be highly obliged if anybody can help me!!!
Thanks
If you want to manually compile another version of glibc, then I suggest you configuring (./configure script run) it with --prefix option to install not to /lib, /usr/lib but to /home/mehul/glibc2.5.58test/lib and /home/mehul/glibc2.5.58test/usr/lib
But compiling of glibc is not very easy thing, so another way is to get glibc 2.5-58 in compiled form from other linux and manually copy it to some subdirectory. Then you can override library search path of gcc and recompile your lib with libc from subdirectory.
Or you can use LD_LIBRARY_PATH to override library search path of compiled binary to use older glibc like this:
$ LD_LIBRARY_PATH=/home/mehul/glibc2.5.58test/lib /path/to/your/application
If you know that that version of libc is used in an older ditribution, you could install that distribution in a chroot/scratchbox/kvm/qemu/livecd or other such system for testing and building. Or there may be some other build farm type solution. Then you'll have an authentic system to test on that will not mess up your up to date one. It'll also be repeatable if you keep that system image.
If this isn't about a specific older release, why on earth would you want to test against a specific very old libc?

New Qt Directory is not valid

I've written an application using Qt on OS X. The installed SDK automatically installed as a framework which I didn't want. So I cloned their newest version from the Qt git repository and built it from source as static libraries. I would like it to compile using those static libraries instead of the framework but in preferences in setting the version/Path of Qt no matter what path I direct it to it says it's not a valid Qt directory. What has to be in a qt Directory that constitutes it being valid?
I'm closing this, The problem was installing on OSX I needed to declare -no-framework when running configure.
Some tips;
Install into a path that doesn't contain spaces
Use -prefix $PWD from the current path, and set the PATH, INCLUDE and LIB env variables appropriately - this makes it possible to have multiple Qt builds, e.g. multiple shadow builds from one source directory
Don't do static configure - it makes using plugins difficult, and assuming you use LGPL you have to ship the .o files.

Resources