* [meta-oe][PATCH] lmbench: fix usrmerge install path
@ 2018-08-24 9:24 mingli.yu
2018-08-24 13:43 ` Peter Kjellerstedt
0 siblings, 1 reply; 3+ messages in thread
From: mingli.yu @ 2018-08-24 9:24 UTC (permalink / raw)
To: openembedded-devel
From: Mingli Yu <Mingli.Yu@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@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
+ fi
install -d ${D}${sysconfdir}/default/volatiles \
${D}${bindir} ${D}${mandir} ${D}${libdir}/lmbench \
${D}${datadir}/lmbench/scripts
--
2.7.4
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [meta-oe][PATCH] lmbench: fix usrmerge install path
2018-08-24 9:24 [meta-oe][PATCH] lmbench: fix usrmerge install path mingli.yu
@ 2018-08-24 13:43 ` Peter Kjellerstedt
2018-08-27 1:27 ` Yu, Mingli
0 siblings, 1 reply; 3+ messages in thread
From: Peter Kjellerstedt @ 2018-08-24 13:43 UTC (permalink / raw)
To: mingli.yu@windriver.com,
openembedded-devel@lists.openembedded.org
> -----Original Message-----
> From: openembedded-devel-bounces@lists.openembedded.org <openembedded-
> devel-bounces@lists.openembedded.org> On Behalf Of
> mingli.yu@windriver.com
> Sent: den 24 augusti 2018 11:25
> To: openembedded-devel@lists.openembedded.org
> Subject: [oe] [meta-oe][PATCH] lmbench: fix usrmerge install path
>
> From: Mingli Yu <Mingli.Yu@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@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).
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
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [meta-oe][PATCH] lmbench: fix usrmerge install path
2018-08-24 13:43 ` Peter Kjellerstedt
@ 2018-08-27 1:27 ` Yu, Mingli
0 siblings, 0 replies; 3+ messages in thread
From: Yu, Mingli @ 2018-08-27 1:27 UTC (permalink / raw)
To: Peter Kjellerstedt, openembedded-devel@lists.openembedded.org
On 2018年08月24日 21:43, Peter Kjellerstedt wrote:
>> -----Original Message-----
>> From: openembedded-devel-bounces@lists.openembedded.org <openembedded-
>> devel-bounces@lists.openembedded.org> On Behalf Of
>> mingli.yu@windriver.com
>> Sent: den 24 augusti 2018 11:25
>> To: openembedded-devel@lists.openembedded.org
>> Subject: [oe] [meta-oe][PATCH] lmbench: fix usrmerge install path
>>
>> From: Mingli Yu <Mingli.Yu@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@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
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-08-27 1:30 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-08-24 9:24 [meta-oe][PATCH] lmbench: fix usrmerge install path mingli.yu
2018-08-24 13:43 ` Peter Kjellerstedt
2018-08-27 1:27 ` Yu, Mingli
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.