userland: Add '--no-as-needed' linker flag to ensure all specified shared libraries are linked against applications (e.g. raspivid)
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH 1/2 userland: Add '--no-as-needed' linker flag to ensure all specified shared libraries are linked against applications (e.g. raspivid)
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.
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@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
--- recipes-graphics/userland/userland_git.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
recipes-graphics/userland/userland_git.bb +1 -1
@@ -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}"
Signature · 1 line
2.0.0
PATCH 2/2 userland: Add SRCBRANCH and SRCFORK for use by SRC_URI
Makes it clearer to manage repo forks, and branches prior to (e.g.) upstream commits of in tree changes
--- recipes-graphics/userland/userland_git.bb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
recipes-graphics/userland/userland_git.bb +4 -1
@@ -11,8 +11,11 @@ PROVIDES = "virtual/libgles2 \ virtual/egl" COMPATIBLE_MACHINE = "raspberrypi" +SRCBRANCH = "master" +SRCFORK = "raspberrypi" SRCREV = "eccb81050afd177da1923404b366c6226f29bfe0" -SRC_URI = "git://github.com/raspberrypi/userland.git;protocol=git;branch=master \ + +SRC_URI = "git://github.com/${SRCFORK}/userland.git;protocol=git;branch=${SRCBRANCH} \ " S = "${WORKDIR}/git"
Signature · 1 line
2.0.0
Re: [meta-raspberrypi][PATCH 2/2] userland: Add SRCBRANCH and SRCFORK for use by SRC_URI
On Mon, Jun 2, 2014 at 1:58 PM, Alex J Lennon <[email protected]
Quoted 31 lines
wrote:
Makes it clearer to manage repo forks, and branches prior to (e.g.) upstream commits of in tree changes
Change-Id I42f8af975c08f84c4ceb9910713eba2da3a87d8bSigned-off-by Alex J Lennon <[email protected]>--- recipes-graphics/userland/userland_git.bb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)recipes-graphics/userland/userland_git.bb +4
-1@@ -11,8 +11,11 @@ PROVIDES = "virtual/libgles2 \ virtual/egl" COMPATIBLE_MACHINE = "raspberrypi" +SRCBRANCH = "master" +SRCFORK = "raspberrypi" SRCREV = "eccb81050afd177da1923404b366c6226f29bfe0" -SRC_URI = "git:// github.com/raspberrypi/userland.git;protocol=git;branch=master \ + +SRC_URI = "git:// github.com/${SRCFORK}/userland.git;protocol=git;branch=${SRCBRANCH} \ "S = "${WORKDIR}/git"
Quoted 4 lines
--
2.0.0
Thanks Alex. Merged.
Signature · 2 lines
*Andrei Gherzan* m: +40.744.478.414 | f: +40.31.816.28.12
On Mon, Jun 2, 2014 at 1:58 PM, Alex J Lennon <[email protected]
Quoted 6 lines
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
Quoted 43 lines
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_clientand thus components are not registered.In this situation raspivid then gives an error of the form
root@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 updatesFor further details see:
https://lists.yoctoproject.org/pipermail/yocto/2014-June/019933.htmlChange-Id I9d787fd83379e8b6428dde3827395c8b96be1f7fSigned-off-by Alex J Lennon <[email protected]>--- recipes-graphics/userland/userland_git.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)recipes-graphics/userland/userland_git.bb +1
-3@@ -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}" --
Quoted 3 lines
2.0.0
Thanks a lot. Merged.
Signature · 2 lines
*Andrei Gherzan* m: +40.744.478.414 | f: +40.31.816.28.12
Quoted 6 lines · Andrei Gherzan
On Mon, Jun 2, 2014 at 1:58 PM, Alex J Lennon <[email protected] <mailto:[email protected]>> wrote:
Quoted 8 lines
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
Understood - thanks Andrei, I'll try to bear that in mind.
Perhaps you'd be open to the idea of a patch to add these requirements into the meta-raspberrypi README in-between 5A/5B.
I believe it would help contributors like myself, who are new to the process requirements, to understand how to put a patch together correctly, as well as where to sent it.
Cheers,
Alex
Quoted 18 lines · Alex J Lennon
On 10/06/2014 19:22, Andrei Gherzan wrote:
Quoted 4 lines · Alex J Lennon
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
Quoted 9 lines
Understood - thanks Andrei, I'll try to bear that in mind.
Perhaps you'd be open to the idea of a patch to add these requirements into the meta-raspberrypi README in-between 5A/5B.
I believe it would help contributors like myself, who are new to the process requirements, to understand how to put a patch together correctly, as well as where to sent it.
That's a good idea. Will send a patch.
Signature · 2 lines
*Andrei Gherzan* m: +40.744.478.414 | f: +40.31.816.28.12