[yocto] [meta-raspberrypi][PATCH 2/2] userland: Make vchostif as shared library

Jonathan Liu net147 at gmail.com
Fri Apr 15 18:24:01 PDT 2016


Hi Khem,

On 14 April 2016 at 02:36, Khem Raj <raj.khem at gmail.com> wrote:
> Thats interesting, I will try to reproduce it

I have submitted a patch to the mailing list to bump the omxplayer
revision which fixes the issue.

>
> On Apr 13, 2016, at 7:21 AM, Jonathan Liu <net147 at gmail.com> wrote:
>
> On Thursday, 14 April 2016, Khem Raj <raj.khem at gmail.com> wrote:
>>
>> On Wed, Apr 13, 2016 at 3:05 AM, Jonathan Liu <net147 at gmail.com> wrote:
>> > Hi Khem,
>> >
>> > On 3 April 2016 at 03:59, Khem Raj <raj.khem at gmail.com> wrote:
>> >> This helps in using this library when building
>> >> with PIE binaries
>> >>
>> >> Signed-off-by: Khem Raj <raj.khem at gmail.com>
>> >> ---
>> >>  .../0014-build-shared-library-for-vchostif.patch   | 28
>> >> ++++++++++++++++++++++
>> >>  recipes-graphics/userland/userland_git.bb          |  1 +
>> >>  2 files changed, 29 insertions(+)
>> >>  create mode 100644
>> >> recipes-graphics/userland/userland/0014-build-shared-library-for-vchostif.patch
>> >>
>> >> diff --git
>> >> a/recipes-graphics/userland/userland/0014-build-shared-library-for-vchostif.patch
>> >> b/recipes-graphics/userland/userland/0014-build-shared-library-for-vchostif.patch
>> >> new file mode 100644
>> >> index 0000000..ca7cb66
>> >> --- /dev/null
>> >> +++
>> >> b/recipes-graphics/userland/userland/0014-build-shared-library-for-vchostif.patch
>> >> @@ -0,0 +1,28 @@
>> >> +From 4e9aa3fffb458ca4fafd2241c18e9c8008b66ad8 Mon Sep 17 00:00:00 2001
>> >> +From: Khem Raj <raj.khem at gmail.com>
>> >> +Date: Sat, 2 Apr 2016 10:37:24 -0700
>> >> +Subject: [PATCH] build shared library for vchostif
>> >> +
>> >> +Fixes #149
>> >> +
>> >> +Signed-off-by: Khem Raj <raj.khem at gmail.com>
>> >> +---
>> >> + interface/vmcs_host/CMakeLists.txt | 2 +-
>> >> + 1 file changed, 1 insertion(+), 1 deletion(-)
>> >> +
>> >> +diff --git a/interface/vmcs_host/CMakeLists.txt
>> >> b/interface/vmcs_host/CMakeLists.txt
>> >> +index 22949a8..f8c2f2f 100755
>> >> +--- a/interface/vmcs_host/CMakeLists.txt
>> >> ++++ b/interface/vmcs_host/CMakeLists.txt
>> >> +@@ -17,7 +17,7 @@ set(VCHOSTIF_SOURCE
>> >> + #            ${VMCS_TARGET}/vmcs_main.c
>> >> + #  vc_vchi_haud.c
>> >> +
>> >> +-add_library(vchostif ${VCHOSTIF_SOURCE})
>> >> ++add_library(vchostif SHARED ${VCHOSTIF_SOURCE})
>> >> +
>> >> + #add_library(bufman            vc_vchi_bufman.c            )
>> >> +
>> >> +--
>> >> +2.8.0
>> >> +
>> >> diff --git a/recipes-graphics/userland/userland_git.bb
>> >> b/recipes-graphics/userland/userland_git.bb
>> >> index efa2128..6ed8fcf 100644
>> >> --- a/recipes-graphics/userland/userland_git.bb
>> >> +++ b/recipes-graphics/userland/userland_git.bb
>> >> @@ -33,6 +33,7 @@ SRC_URI = "\
>> >>      file://0011-fix-cmake-dependency-race.patch \
>> >>      file://0012-Fix-enum-conversion-warnings.patch \
>> >>      file://0013-Fix-for-framerate-with-nested-composition.patch \
>> >> +    file://0014-build-shared-library-for-vchostif.patch \
>> >>      file://0015-wl-dispmanx-buffer-wrapping.patch \
>> >>  "
>> >>  S = "${WORKDIR}/git"
>> >> --
>> >> 2.8.0
>> >>
>> >> --
>> >> _______________________________________________
>> >> yocto mailing list
>> >> yocto at yoctoproject.org
>> >> https://lists.yoctoproject.org/listinfo/yocto
>> >
>> > This breaks omxplayer compilation when linking omxplayer.bin:
>> >
>> > [...]/sysroots/x86_64-linux/usr/libexec/arm-custom-linux-gnueabi/gcc/arm-custom-linux-gnueabi/5.3.0/ld:
>> > omxplayer.o: undefined reference to symbol
>> > 'vc_dispmanx_resource_write_data'
>> > [...]/sysroots/raspberrypi2/usr/lib/libvchostif.so: error adding
>> > symbols: DSO missing from command line
>>
>> Interestingly i dont see this error. Are you using gold ?
>> see if this library is on linker cmdline or not
>
> Using whatever is the default for OE-core in master branch.
>
>  | arm-custom-linux-gnueabi-g++  -march=armv7ve -marm
>  -mfpu=neon-vfpv4  -mfloat-abi=hard -mcpu=cortex-a7
> --sysroot=/home/build/git/pi2/build/tmp/sysroots/ra
> spberrypi2 -L/home/build/git/pi2/build/tmp/work/cor
> texa7hf-neon-vfpv4-custom-linux-gnueabi/omxplayer/gi
> t-r4/git/ffmpeg_compiled/usr/lib                   -
> L/home/build/git/pi2/build/tmp/sysroots/raspberrypi
> 2/lib                   -L/home/build/git/pi2/build
> /tmp/sysroots/raspberrypi2/usr/lib
>  -L./ -Lffmpeg_compiled/usr/lib/ -lc -lWFC -lGLESv2
> -lEGL -lbcm_host -lopenmaxil -lfreetype -lz -o omxpl
> ayer.bin linux/XMemUtils.o utils/log.o DynamicDll.o
> utils/PCMRemap.o utils/RegExp.o OMXSubtitleTagSami.o
>  OMXOverlayCodecText.o BitstreamConverter.o linux/RB
> P.o OMXThread.o OMXReader.o OMXStreamInfo.o OMXAudio
> CodecOMX.o OMXCore.o OMXVideo.o OMXAudio.o OMXClock.
> o File.o OMXPlayerVideo.o OMXPlayerAudio.o OMXPlayer
> Subtitles.o SubtitleRenderer.o Unicode.o Srt.o KeyCo
> nfig.o OMXControl.o Keyboard.o omxplayer.o -lvchiq_a
> rm -lvcos -ldbus-1 -lrt -lpthread -lavutil -lavcodec
>  -lavformat -lswscale -lswresample -lpcre
> |
> /home/build/git/pi2/build/tmp/sysroots/x86_64-linux/usr/libexec/arm-custom-linux-gnueabi/gcc/arm-custom-linux-gnueabi/5.3.0/ld:
> omxplayer.o: undefined reference to symbol 'vc_dispmanx_resource_write_data'
> |
> /home/build/git/pi2/build/tmp/sysroots/raspberrypi2/usr/lib/libvchostif.so:
> error adding symbols: DSO
>  missing from command line
> | collect2: error: ld returned 1 exit status
> | Makefile:53: recipe for target 'omxplayer.bin' failed
> | make: *** [omxplayer.bin] Error 1

Regards,
Jonathan



More information about the yocto mailing list