lmbench: fix usrmerge install path
PATCH 1/1 lmbench: fix usrmerge install path
From: Mingli Yu <[email protected]>
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
--- meta-oe/recipes-benchmark/lmbench/lmbench_3.0-a9.bb | 5 +++++ 1 file changed, 5 insertions(+)
meta-oe/recipes-benchmark/lmbench/lmbench_3.0-a9.bb +5 -0
@@ -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
Signature · 1 line
2.7.4
Quoted 35 lines
-----Original Message-----
From: [email protected] <openembedded- [email protected]> On Behalf Of [email protected]
Sent: den 24 augusti 2018 11:25
To: [email protected]
Subject: [oe] [meta-oe][PATCH] lmbench: fix usrmerge install pathFrom: Mingli Yu <[email protected]>
Update $(base_libdir) to $(baselib) to fix
the belowdo_installerror when usrmerge
enabled inDISTRO_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 1Signed-off-by Mingli Yu <[email protected]>--- meta-oe/recipes-benchmark/lmbench/lmbench_3.0-a9.bb | 5 +++++ 1 file changed, 5 insertions(+)meta-oe/recipes-benchmark/lmbench/lmbench_3.0-a9.bb +0
-0
meta-oe/recipes-benchmark/lmbench/lmbench_3.0-a9.bb do_compile () { · line 59
Quoted 9 lines
meta-oe/recipes-benchmark/lmbench/lmbench_3.0-a9.bb +4
-0@@ -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}
fiQuoted 6 lines
meta-oe/recipes-benchmark/lmbench/lmbench_3.0-a9.bb +1
-1+ fi install -d ${D}${sysconfdir}/default/volatiles \ ${D}${bindir} ${D}${mandir} ${D}${libdir}/lmbench \ ${D}${datadir}/lmbench/scripts --2.7.4
//Peter
Quoted 52 lines · Peter Kjellerstedt
Quoted 35 lines
-----Original Message-----
From: [email protected] <openembedded- [email protected]> On Behalf Of [email protected]
Sent: den 24 augusti 2018 11:25
To: [email protected]
Subject: [oe] [meta-oe][PATCH] lmbench: fix usrmerge install pathFrom: Mingli Yu <[email protected]>
Update $(base_libdir) to $(baselib) to fix
the belowdo_installerror when usrmerge
enabled inDISTRO_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 1Signed-off-by Mingli Yu <[email protected]>--- meta-oe/recipes-benchmark/lmbench/lmbench_3.0-a9.bb | 5 +++++ 1 file changed, 5 insertions(+)meta-oe/recipes-benchmark/lmbench/lmbench_3.0-a9.bb +0
-0meta-oe/recipes-benchmark/lmbench/lmbench_3.0-a9.bb do_compile () { · line 59
Quoted 9 lines
meta-oe/recipes-benchmark/lmbench/lmbench_3.0-a9.bb +4
-0@@ -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/MakefileThe 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_runmakeinstall line in the recipe and things should end up where we want them.
Quoted 3 lines
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,
Quoted 22 lines
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_runmakeindo_install:if [ "${prefix}/lib" != "${libdir}" ]; then mv ${D}${prefix}/lib ${D}${libdir} fiQuoted 6 lines
meta-oe/recipes-benchmark/lmbench/lmbench_3.0-a9.bb +1
-1+ fi install -d ${D}${sysconfdir}/default/volatiles \ ${D}${bindir} ${D}${mandir} ${D}${libdir}/lmbench \ ${D}${datadir}/lmbench/scripts --2.7.4
//Peter