[oe] [meta-oe][PATCH] lmbench: fix usrmerge install path

Yu, Mingli mingli.yu at windriver.com
Mon Aug 27 01:27:52 UTC 2018



On 2018年08月24日 21:43, Peter Kjellerstedt wrote:
>> -----Original Message-----
>> From: openembedded-devel-bounces at lists.openembedded.org <openembedded-
>> devel-bounces at lists.openembedded.org> On Behalf Of
>> mingli.yu at windriver.com
>> Sent: den 24 augusti 2018 11:25
>> To: openembedded-devel at lists.openembedded.org
>> Subject: [oe] [meta-oe][PATCH] lmbench: fix usrmerge install path
>>
>> From: Mingli Yu <Mingli.Yu at windriver.com>
>>
>> Update $(base_libdir) to $(baselib) to fix
>> the below do_install error when usrmerge
>> enabled in DISTRO_FEATURES.
>>
>> | if [ ! -d /poky-build/tmp-glibc/work/core2-64-wrs-linux/lmbench/3.0-
>> a9-r2/image/usr/usr/lib64 ]; then mkdir
>> /poky-build/tmp-glibc/work/core2-64-wrs-linux/lmbench/3.0-a9-
>> r2/image/usr/usr/lib64; fi
>> | mkdir: cannot create directory /poky-build/tmp-glibc/work/core2-64-
>> wrs-linux/lmbench/3.0-a9-r2/image/usr/usr/lib64 No such file or
>> directory
>> | Makefile:141: recipe for target 'install-target' failed
>> | make[1]: *** [install-target] Error 1
>>
>> Signed-off-by: Mingli Yu <Mingli.Yu at windriver.com>
>> ---
>>   meta-oe/recipes-benchmark/lmbench/lmbench_3.0-a9.bb | 5 +++++
>>   1 file changed, 5 insertions(+)
>>
>> diff --git a/meta-oe/recipes-benchmark/lmbench/lmbench_3.0-a9.bb
>> b/meta-oe/recipes-benchmark/lmbench/lmbench_3.0-a9.bb
>> index 593b62f..c78e7a8 100644
>> --- a/meta-oe/recipes-benchmark/lmbench/lmbench_3.0-a9.bb
>> +++ b/meta-oe/recipes-benchmark/lmbench/lmbench_3.0-a9.bb
>> @@ -51,8 +51,13 @@ do_compile () {
>>       install -d ${S}/bin/${TARGET_SYS}
>>       oe_runmake -C src
>>   }
>> +export baselib
>>
>>   do_install () {
>> +    # fix the lib path when usrmerge enabled
>> +    if ${@bb.utils.contains('DISTRO_FEATURES', 'usrmerge', 'true', 'false', d)}; then
>> +        sed -i -e "s;\$(BASE)\$(base_libdir);\$(BASE)/\$(baselib);g" ${S}/src/Makefile
>
> The use of $(base_libdir) in the src/Makefile is introduced via an
> OE patch, "use-base_libdir-instead-of-hardcoded-lib.patch", and it
> Would be better to change that directly instead. There you should
> change "$(BASE)$(base_libdir)" to "$(DESTDIR)$(libdir)" while
> adding DESTDIR="${D}" to the oe_runmake install line in the
> recipe and things should end up where we want them.
>
> While at it you may as well correct the patch to install libmbench.a
> with its correct name again (currently it is installed as lmbench.a
> due to a mistake in the patch).

Thanks Peter!

I will resend V2 to update the logic. Thanks you very much!

Thanks,

>
> Oh, and the Upstream-Status tag in the patch is wrong as well (it is
> missing the dash in Upstream-Status)...
>
> As an alternative to the above, and this is what I would recommend,
> you can drop the patch and instead add the following after the call
> to oe_runmake in do_install:
>
>      if [ "${prefix}/lib" != "${libdir}" ]; then
>          mv ${D}${prefix}/lib ${D}${libdir}
>      fi
>
>> +    fi
>>       install -d ${D}${sysconfdir}/default/volatiles \
>>              ${D}${bindir} ${D}${mandir} ${D}${libdir}/lmbench \
>>              ${D}${datadir}/lmbench/scripts
>> --
>> 2.7.4
>
> //Peter
>
>



More information about the Openembedded-devel mailing list