[yocto] [meta-raspberrypi][PATCH 1/2] userland: Add '--no-as-needed' linker flag to ensure all specified shared libraries are linked against applications (e.g. raspivid)

Andrei Gherzan andrei at gherzan.ro
Tue Jun 10 11:22:28 PDT 2014


On Mon, Jun 2, 2014 at 1:58 PM, Alex J Lennon <ajlennon at dynamicdevices.co.uk
> wrote:

> libmmal_vc_client.so makes use of __attribute__(constructor) to ensure
> that supplier components (e.g. camera) are loaded when the static library
> is loaded.
>

There shouldn't be more than 78 characters per line. I did this change for
this patch (the other you already submited). More info:
http://www.openembedded.org/wiki/Commit_Patch_Message_Guidelines


>
> raspivid, and possibly other applications, link against
> libmmal_vc_client.so, causing the ctor to execute, but there is no needed
> dependency.
>
> Some build environments (e.g. Yocto/OpenEmbedded) pass the
> '--no-as-needed' linker flag which removes the dependency on
> libmmal_vc_client and thus components are not registered.
>
> In this situation raspivid then gives an error of the form
>
>   root at raspberrypi:~# raspivid -o test
>   mmal: mmal_component_create_core: could not find component
> 'vc.ril.camera'
>   mmal: Failed to create camera component
>   mmal: main: Failed to create camera component
>   mmal: Failed to run camera app. Please check for firmware updates
>
> For further details see:
> https://lists.yoctoproject.org/pipermail/yocto/2014-June/019933.html
>
> Change-Id: I9d787fd83379e8b6428dde3827395c8b96be1f7f
> Signed-off-by: Alex J Lennon <ajlennon at dynamicdevices.co.uk>
> ---
>  recipes-graphics/userland/userland_git.bb | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/recipes-graphics/userland/userland_git.bb
> b/recipes-graphics/userland/userland_git.bb
> index a348090..4b405ee 100644
> --- a/recipes-graphics/userland/userland_git.bb
> +++ b/recipes-graphics/userland/userland_git.bb
> @@ -18,7 +18,7 @@ S = "${WORKDIR}/git"
>
>  inherit cmake
>
> -EXTRA_OECMAKE = "-DCMAKE_BUILD_TYPE=Release"
> +EXTRA_OECMAKE = "-DCMAKE_BUILD_TYPE=Release
> -DCMAKE_EXE_LINKER_FLAGS='-Wl,--no-as-needed'"
>
>  # The compiled binaries don't provide sonames.
>  SOLIBS = "${SOLIBSDEV}"
> --
> 2.0.0
>
>
Thanks a lot. Merged.

-- 
*Andrei Gherzan*
m: +40.744.478.414 |  f: +40.31.816.28.12
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/yocto/attachments/20140610/e66bd864/attachment.html>


More information about the yocto mailing list