All of lore.kernel.org
 help / color / mirror / Atom feed
* [meta-raspberrypi][PATCH 0/1] userland: Add '--no-as-needed' linker flag to ensure all specified shared libraries are linked against applications (e.g. raspivid)
@ 2014-06-02 10:04 Alex J Lennon
  2014-06-02 10:04 ` [meta-raspberrypi][PATCH 1/1] " Alex J Lennon
  0 siblings, 1 reply; 7+ messages in thread
From: Alex J Lennon @ 2014-06-02 10:04 UTC (permalink / raw)
  To: yocto, vaduva.jan.alexandru, andrei, gary

Please see following patch for details

Alex J Lennon (1):
  userland: Add '--no-as-needed' linker flag to ensure all specified
    shared libraries are linked against applications (e.g. raspivid)

 recipes-graphics/userland/userland_git.bb | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

-- 
2.0.0



^ permalink raw reply	[flat|nested] 7+ messages in thread

* [meta-raspberrypi][PATCH 1/1] userland: Add '--no-as-needed' linker flag to ensure all specified shared libraries are linked against applications (e.g. raspivid)
  2014-06-02 10:04 [meta-raspberrypi][PATCH 0/1] userland: Add '--no-as-needed' linker flag to ensure all specified shared libraries are linked against applications (e.g. raspivid) Alex J Lennon
@ 2014-06-02 10:04 ` Alex J Lennon
  2014-06-02 10:30   ` Alexandru Vaduva
  2014-06-02 10:37   ` Paul Barker
  0 siblings, 2 replies; 7+ messages in thread
From: Alex J Lennon @ 2014-06-02 10:04 UTC (permalink / raw)
  To: yocto, vaduva.jan.alexandru, andrei, gary

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 r

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

Change-Id: I7d6b3751d043f2d79ea06f2d1205e7430f6e926d
Signed-off-by: Alex J Lennon <ajlennon@dynamicdevices.co.uk>
---
 recipes-graphics/userland/userland_git.bb | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/recipes-graphics/userland/userland_git.bb b/recipes-graphics/userland/userland_git.bb
index a348090..95e038b 100644
--- a/recipes-graphics/userland/userland_git.bb
+++ b/recipes-graphics/userland/userland_git.bb
@@ -11,14 +11,18 @@ 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"
 
 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}"
@@ -29,10 +33,10 @@ do_install_append() {
     rm -rf ${D}/opt
 }
 
+
 FILES_${PN} += "${libdir}/*${SOLIBS}"
 FILES_${PN}-dev = "${includedir} \
                    ${prefix}/src"
 FILES_${PN}-doc += "${datadir}/install"
 
 PACKAGE_ARCH = "${MACHINE_ARCH}"
-
-- 
2.0.0



^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [meta-raspberrypi][PATCH 1/1] userland: Add '--no-as-needed' linker flag to ensure all specified shared libraries are linked against applications (e.g. raspivid)
  2014-06-02 10:04 ` [meta-raspberrypi][PATCH 1/1] " Alex J Lennon
@ 2014-06-02 10:30   ` Alexandru Vaduva
  2014-06-02 10:41     ` Alex J Lennon
  2014-06-02 10:37   ` Paul Barker
  1 sibling, 1 reply; 7+ messages in thread
From: Alexandru Vaduva @ 2014-06-02 10:30 UTC (permalink / raw)
  To: Alex J Lennon; +Cc: yocto@yoctoproject.org, Gary Thomas

[-- Attachment #1: Type: text/plain, Size: 2958 bytes --]

It looks ok to me.
Waiting for a push on remote.

I like the suggestion regarding SRC_URI format but I would have suggested
it to be another patch.
The reason would be that when someone wants to do a revert to the change
the suggestion would still remain,
but this is only a personal preference.

Good work once again, you really did me a service.


Thank you,
Alex


On Mon, Jun 2, 2014 at 1:04 PM, Alex J Lennon <ajlennon@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.
>
> 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 r
>
> 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
>
> Change-Id: I7d6b3751d043f2d79ea06f2d1205e7430f6e926d
> Signed-off-by: Alex J Lennon <ajlennon@dynamicdevices.co.uk>
> ---
>  recipes-graphics/userland/userland_git.bb | 10 +++++++---
>  1 file changed, 7 insertions(+), 3 deletions(-)
>
> diff --git a/recipes-graphics/userland/userland_git.bb
> b/recipes-graphics/userland/userland_git.bb
> index a348090..95e038b 100644
> --- a/recipes-graphics/userland/userland_git.bb
> +++ b/recipes-graphics/userland/userland_git.bb
> @@ -11,14 +11,18 @@ 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"
>
>  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}"
> @@ -29,10 +33,10 @@ do_install_append() {
>      rm -rf ${D}/opt
>  }
>
> +
>  FILES_${PN} += "${libdir}/*${SOLIBS}"
>  FILES_${PN}-dev = "${includedir} \
>                     ${prefix}/src"
>  FILES_${PN}-doc += "${datadir}/install"
>
>  PACKAGE_ARCH = "${MACHINE_ARCH}"
> -
> --
> 2.0.0
>
>

[-- Attachment #2: Type: text/html, Size: 4372 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [meta-raspberrypi][PATCH 1/1] userland: Add '--no-as-needed' linker flag to ensure all specified shared libraries are linked against applications (e.g. raspivid)
  2014-06-02 10:04 ` [meta-raspberrypi][PATCH 1/1] " Alex J Lennon
  2014-06-02 10:30   ` Alexandru Vaduva
@ 2014-06-02 10:37   ` Paul Barker
  1 sibling, 0 replies; 7+ messages in thread
From: Paul Barker @ 2014-06-02 10:37 UTC (permalink / raw)
  To: Alex J Lennon; +Cc: Yocto discussion list, Gary Thomas, vaduva.jan.alexandru

Just jumping in to make a couple of minor comments, hope you don't mind.

On 2 June 2014 11:04, Alex J Lennon <ajlennon@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.
>
> 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 r

It looks like this line got cut off.

>
> 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
>
> Change-Id: I7d6b3751d043f2d79ea06f2d1205e7430f6e926d
> Signed-off-by: Alex J Lennon <ajlennon@dynamicdevices.co.uk>
> ---
>  recipes-graphics/userland/userland_git.bb | 10 +++++++---
>  1 file changed, 7 insertions(+), 3 deletions(-)
>
> diff --git a/recipes-graphics/userland/userland_git.bb b/recipes-graphics/userland/userland_git.bb
> index a348090..95e038b 100644
> --- a/recipes-graphics/userland/userland_git.bb
> +++ b/recipes-graphics/userland/userland_git.bb
> @@ -11,14 +11,18 @@ PROVIDES = "virtual/libgles2 \
>              virtual/egl"
>  COMPATIBLE_MACHINE = "raspberrypi"
>
> +SRCBRANCH = "master"
> +SRCFORK = "raspberrypi"

It looks like there are some changes here which are unrelated to the
commit message, including the SRC_URI and whitespace changes below.

>  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"
>
>  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}"
> @@ -29,10 +33,10 @@ do_install_append() {
>      rm -rf ${D}/opt
>  }
>
> +
>  FILES_${PN} += "${libdir}/*${SOLIBS}"
>  FILES_${PN}-dev = "${includedir} \
>                     ${prefix}/src"
>  FILES_${PN}-doc += "${datadir}/install"
>
>  PACKAGE_ARCH = "${MACHINE_ARCH}"
> -
> --
> 2.0.0
>
> --
> _______________________________________________
> yocto mailing list
> yocto@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto

Thanks,

-- 
Paul Barker

Email: paul@paulbarker.me.uk
http://www.paulbarker.me.uk


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [meta-raspberrypi][PATCH 1/1] userland: Add '--no-as-needed' linker flag to ensure all specified shared libraries are linked against applications (e.g. raspivid)
  2014-06-02 10:30   ` Alexandru Vaduva
@ 2014-06-02 10:41     ` Alex J Lennon
  2014-06-02 10:50       ` Alexandru Vaduva
  0 siblings, 1 reply; 7+ messages in thread
From: Alex J Lennon @ 2014-06-02 10:41 UTC (permalink / raw)
  To: Alexandru Vaduva; +Cc: yocto@yoctoproject.org, Gary Thomas


On 02/06/2014 11:30, Alexandru Vaduva wrote:
> It looks ok to me.
> Waiting for a push on remote.
>

Thanks Alex. Interesting issue. Next time I get a chance I need to turn
back to getting gstreamer-1.0 working with it.

I've pushed the commit up to gherzan. Is there anything else I should be
doing?

> I like the suggestion regarding SRC_URI format but I would have
> suggested it to be another patch.
> The reason would be that when someone wants to do a revert to the
> change the suggestion would still remain,
> but this is only a personal preference.
>

OK, I could do that if it was needed. (I'm pleased you like it. I pushed
a similar change upstream to my fork of 
raspiberrypi/userland  to try to make sure nobody else sinks time on
this. Breaking out the fork and branch
that way helps me to manage the upstream commits and github pull request).

> Good work once again, you really did me a service.
>
>

Cheers,

Alex



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [meta-raspberrypi][PATCH 1/1] userland: Add '--no-as-needed' linker flag to ensure all specified shared libraries are linked against applications (e.g. raspivid)
  2014-06-02 10:41     ` Alex J Lennon
@ 2014-06-02 10:50       ` Alexandru Vaduva
  2014-06-02 10:51         ` Alex J Lennon
  0 siblings, 1 reply; 7+ messages in thread
From: Alexandru Vaduva @ 2014-06-02 10:50 UTC (permalink / raw)
  To: Alex J Lennon; +Cc: yocto@yoctoproject.org, Gary Thomas

[-- Attachment #1: Type: text/plain, Size: 1425 bytes --]

I am not sure, let`s wait and see what the maintainers(Andrei and John)
have to say, if you pushed the
commit as recommended into the README file (
https://github.com/djwillis/meta-raspberrypi/blob/master/README).
I will try to contact them on Trello tonight if nothings happens until them.


Alex


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

>
> On 02/06/2014 11:30, Alexandru Vaduva wrote:
> > It looks ok to me.
> > Waiting for a push on remote.
> >
>
> Thanks Alex. Interesting issue. Next time I get a chance I need to turn
> back to getting gstreamer-1.0 working with it.
>
> I've pushed the commit up to gherzan. Is there anything else I should be
> doing?
>
> > I like the suggestion regarding SRC_URI format but I would have
> > suggested it to be another patch.
> > The reason would be that when someone wants to do a revert to the
> > change the suggestion would still remain,
> > but this is only a personal preference.
> >
>
> OK, I could do that if it was needed. (I'm pleased you like it. I pushed
> a similar change upstream to my fork of
> raspiberrypi/userland  to try to make sure nobody else sinks time on
> this. Breaking out the fork and branch
> that way helps me to manage the upstream commits and github pull request).
>
> > Good work once again, you really did me a service.
> >
> >
>
> Cheers,
>
> Alex
>
>

[-- Attachment #2: Type: text/html, Size: 2018 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [meta-raspberrypi][PATCH 1/1] userland: Add '--no-as-needed' linker flag to ensure all specified shared libraries are linked against applications (e.g. raspivid)
  2014-06-02 10:50       ` Alexandru Vaduva
@ 2014-06-02 10:51         ` Alex J Lennon
  0 siblings, 0 replies; 7+ messages in thread
From: Alex J Lennon @ 2014-06-02 10:51 UTC (permalink / raw)
  To: Alexandru Vaduva; +Cc: yocto@yoctoproject.org


On 02/06/2014 11:50, Alexandru Vaduva wrote:
> I am not sure, let`s wait and see what the maintainers(Andrei and
> John) have to say, if you pushed the
> commit as recommended into the README file
> (https://github.com/djwillis/meta-raspberrypi/blob/master/README).
> I will try to contact them on Trello tonight if nothings happens until
> them.

I did (I believe). Given your comment is echoed by Paul I will break the
commit into two separate ones, add the cut-off word and generate another
patch-set.

Alex



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2014-06-02 10:51 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-02 10:04 [meta-raspberrypi][PATCH 0/1] userland: Add '--no-as-needed' linker flag to ensure all specified shared libraries are linked against applications (e.g. raspivid) Alex J Lennon
2014-06-02 10:04 ` [meta-raspberrypi][PATCH 1/1] " Alex J Lennon
2014-06-02 10:30   ` Alexandru Vaduva
2014-06-02 10:41     ` Alex J Lennon
2014-06-02 10:50       ` Alexandru Vaduva
2014-06-02 10:51         ` Alex J Lennon
2014-06-02 10:37   ` Paul Barker

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.