[yocto] Image lacks libraries needed by SDK

Andre McCurdy armccurdy at gmail.com
Tue Jun 13 18:01:35 PDT 2017


On Tue, Jun 13, 2017 at 4:24 PM, Paul D. DeRocco <pderocco at ix.netcom.com> wrote:
> I have a working system image for my 32-bit Atom-based hardware, based on
> Morty. My application is a C++ program that runs as a systemd service.
> I've always built the application outside Yocto, using the Eclipse CDT and
> whatever GCC was on my Ubuntu system. It gets installed into my hardware
> on a separate partition, but runs fine because my build host and target
> are both x86 machines.
>
> In order to try out the much more recent compiler in the Yocto SDK (and to
> prepare for converting to a different architecture in the future), I built
> a standard SDK by using do_populate_sdk on my image. I managed to modify
> my project to use the toolchain and libraries in the sysroot in the SDK,
> and it successfully produces an executable. But when I copy this into my
> system, it barfs because there is no libstdc++.o (and perhaps other
> libraries) on my system. And there is no libstdc++.a in the SDK.
>
> Why would the SDK, built against a particular image, not include the same
> shared libraries as that image?

The SDK explicitly includes various gcc-runtime packages (including
libstdc++) via packagegroup-core-standalone-sdk-target, whereas an
image will only include libstdc++ if something else in the image has a
runtime dependency on it (e.g. a c++ application, etc).

> I noticed that when I built an SDK under
> core-image-minimal, it didn't include libasound, but that was included
> when I built it under my own image which includes ALSA. So it's obviously
> paying attention to what's in the image. So is there some package I need
> to include in my image to complete the set of libraries to match what's in
> the SDK?

Not directly. You could add packagegroup-core-standalone-sdk-target to
the image, but then you'd get the corresponding -dev packages too
(header files, etc). Your best bet may be to add libstdc++ plus any
other individual packages to the image as you find you need them.

>
> --
>
> Ciao,               Paul D. DeRocco
> Paul                mailto:pderocco at ix.netcom.com
>
> --
> _______________________________________________
> yocto mailing list
> yocto at yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto



More information about the yocto mailing list