[yocto] libssp_nonshared.a not present in native SDK.

Rafael Gago Castano RGC at hms.se
Thu Dec 8 23:09:01 PST 2016


Thanks for your answer. I'll keep things as they are then.


________________________________
From: Paul Eggleton <paul.eggleton at linux.intel.com>
Sent: Thursday, December 8, 2016 9:59 PM
To: Rafael Gago Castano
Cc: yocto at yoctoproject.org
Subject: Re: [yocto] libssp_nonshared.a not present in native SDK.

Hi Rafael,

On Thu, 08 Dec 2016 16:05:04 Rafael Gago Castano wrote:
> Yesterday, when cross-compiling with the SDK (relocatable/non-extensible), I
> noticed that CMake projects weren't generated because the compiler feature
> detection was failing. CMake enables fstack-protector for each of its
> platform tests and hance requires "libssp_nonshared.a" for linking. A quick
> search revealed that "libssp_nonshared.a" is actually missing from the SDK.
>
> I found that "libssp_nonshared.a" comes from "gcc-utils.inc". So adding...
>
> IMAGE_INSTALL_append += "libssp"
>
> ...fixes (or workarounds) the issue and allows CMake projects to
> cross-compile fine.
>
> What I see is that I can't manually add all the libraries present in
> "gcc-utils.inc" as "IMAGE_INSTALL_append"s. Some of them (e.g libquadmath)
> fail with the error:
>
> "Couldn't find anything to satisfy 'libquadmath'"
>
> So I added those that doesn't cause errors by trial and error. This looks
> wrong.

AIUI libquadmath is only for Fortran so unless you're enabling and using that,
you don't need it, and it wouldn't be present. However if you are enabling
Fortran, there was a recent patch to correctly enable libquadmath here:

 http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=1013385b2f04b914538c0699a636074496911788

> All the statics in "gcc-utils.inc" look to me like they should be on the SDK
> by default, as they are gcc/libc related and in this case (libssp)
> essential to use some of the compiler features, so I'm wondering:
>
> If this is a bug in krogoth?
> If it isn't a bug, what is the right way to add all these gcc-runtime libs?

So, yes and no. I looked earlier at adding a packagegroup for bringing all of
these in together, but the more I looked at it the more I came to realise that
in most circumstances you don't actually want all of these libraries - they
should come in individually with the pieces that they're intended to be used
with. Hence I added an RRECOMMENDS as it seemed appropriate:

  http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=1c0fc7fcf7772ef8774f623126050972f526fe83

In particular libssp is now RRECOMMENDED by gcc for the target. This patch
came in in the morty release so you wouldn't currently see this in krogoth
though. Having said that your workaround shouldn't be too awkward in the mean
time.

Cheers,
Paul

--

Paul Eggleton
Intel Open Source Technology Centre
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/yocto/attachments/20161209/b5dfc20c/attachment.html>


More information about the yocto mailing list