libtraceevent: fix lib installation
PATCH 1/2 libtraceevent: fix lib installation
When we use 'O=' with make to build libtraceevent in a separate folder it fails to install libtraceevent.a and libtraceevent.so.1.1.0 with the error:
INSTALL /home/sudip/linux/obj-trace/libtraceevent.a INSTALL /home/sudip/linux/obj-trace/libtraceevent.so.1.1.0
cp: cannot stat 'libtraceevent.a': No such file or directory Makefile:225: recipe for target 'install_lib' failed
make: *** [install_lib] Error 1
I used the command:
make O=../../../obj-trace DESTDIR=~/test prefix==/usr install
It turns out libtraceevent Makefile, even though it builds in a separate folder, searches for libtraceevent.a and libtraceevent.so.1.1.0 in its source folder.
So, add the 'OUTPUT' prefix to the source path so that 'make' looks for the files in the correct place.
--- tools/lib/traceevent/Makefile | 1 + 1 file changed, 1 insertion(+)
tools/lib/traceevent/Makefile +1 -0
@@ -97,6 +97,7 @@ EVENT_PARSE_VERSION = $(EP_VERSION).$(EP_PATCHLEVEL).$(EP_EXTRAVERSION) LIB_TARGET = libtraceevent.a libtraceevent.so.$(EVENT_PARSE_VERSION) LIB_INSTALL = libtraceevent.a libtraceevent.so* +LIB_INSTALL := $(addprefix $(OUTPUT),$(LIB_INSTALL)) INCLUDES = -I. -I $(srctree)/tools/include $(CONFIG_INCLUDES)
Signature · 1 line
2.11.0
PATCH 2/2 libtraceevent: copy pkg-config file in output folder
When we use 'O=' with make to build libtraceevent in a separate folder it still copies 'libtraceevent.pc' to its source folder. Modify the Makefile so that it uses the output folder to copy the pkg-config file and install from there.
--- tools/lib/traceevent/Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
tools/lib/traceevent/Makefile +3 -2
@@ -208,10 +208,11 @@ define do_install $(INSTALL) $(if $3,-m $3,) $1 '$(DESTDIR_SQ)$2' endef -PKG_CONFIG_FILE = libtraceevent.pc +PKG_CONFIG_SOURCE_FILE = libtraceevent.pc +PKG_CONFIG_FILE := $(addprefix $(OUTPUT),$(PKG_CONFIG_SOURCE_FILE)) define do_install_pkgconfig_file if [ -n "${pkgconfig_dir}" ]; then \ - cp -f ${PKG_CONFIG_FILE}.template ${PKG_CONFIG_FILE}; \ + cp -f ${PKG_CONFIG_SOURCE_FILE}.template ${PKG_CONFIG_FILE}; \ sed -i "s|INSTALL_PREFIX|${1}|g" ${PKG_CONFIG_FILE}; \ sed -i "s|LIB_VERSION|${EVENT_PARSE_VERSION}|g" ${PKG_CONFIG_FILE}; \ sed -i "s|LIB_DIR|${libdir}|g" ${PKG_CONFIG_FILE}; \
Signature · 1 line
2.11.0
[tip: perf/urgent] libtraceevent: Copy pkg-config file to output folder when using O=
The following commit has been merged into the perf/urgent branch of tip:
The following commit has been merged into the perf/urgent branch of tip:
Commit-ID: 15b3904f8e884e0d34d5f09906cf6526d0b889a2 Gitweb: https://git.kernel.org/tip/15b3904f8e884e0d34d5f09906cf6526d0b889a2 Author: Sudip Mukherjee <[email protected]> AuthorDate: Fri, 15 Nov 2019 11:36:10 Committer: Arnaldo Carvalho de Melo <[email protected]> CommitterDate: Mon, 02 Dec 2019 21:58:20 -03:00
libtraceevent: Copy pkg-config file to output folder when using O=
When we use 'O=' with make to build libtraceevent in a separate folder it still copies 'libtraceevent.pc' to its source folder. Modify the Makefile so that it uses the output folder to copy the pkg-config file and install from there.
--- tools/lib/traceevent/Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
tools/lib/traceevent/Makefile +3 -2
@@ -208,10 +208,11 @@ define do_install $(INSTALL) $(if $3,-m $3,) $1 '$(DESTDIR_SQ)$2' endef -PKG_CONFIG_FILE = libtraceevent.pc +PKG_CONFIG_SOURCE_FILE = libtraceevent.pc +PKG_CONFIG_FILE := $(addprefix $(OUTPUT),$(PKG_CONFIG_SOURCE_FILE)) define do_install_pkgconfig_file if [ -n "${pkgconfig_dir}" ]; then \ - cp -f ${PKG_CONFIG_FILE}.template ${PKG_CONFIG_FILE}; \ + cp -f ${PKG_CONFIG_SOURCE_FILE}.template ${PKG_CONFIG_FILE}; \ sed -i "s|INSTALL_PREFIX|${1}|g" ${PKG_CONFIG_FILE}; \ sed -i "s|LIB_VERSION|${EVENT_PARSE_VERSION}|g" ${PKG_CONFIG_FILE}; \ sed -i "s|LIB_DIR|${libdir}|g" ${PKG_CONFIG_FILE}; \
Hi Steve,
Quoted 19 lines · Sudip Mukherjee
When we use 'O=' with make to build libtraceevent in a separate folder it fails to install libtraceevent.a and libtraceevent.so.1.1.0 with the error:
INSTALL/home/sudip/linux/obj-trace/libtraceevent.aINSTALL/home/sudip/linux/obj-trace/libtraceevent.so.1.1.0
cp: cannot stat 'libtraceevent.a': No such file or directory Makefile:225: recipe for target 'install_lib' failed
make: *** [install_lib] Error 1I used the command:
make O=../../../obj-trace DESTDIR=~/test prefix==/usr installIt turns out libtraceevent
Makefile, even though it builds in a separate folder, searches for libtraceevent.a and libtraceevent.so.1.1.0 in its source folder.
So, add the 'OUTPUT' prefix to the source path so that 'make' looks for the files in the correct place.
Quoted 3 lines
Signed-off-by Sudip Mukherjee <[email protected]>--- tools/lib/traceevent/Makefile | 1 +
A gentle ping.
I know its the merge window now. But your ack for these two patches will allow me to start with the debian workflow.
--
Regards
Sudip
Steven Rostedt
Reviewed-byQuoted 23 lines · On Mon, 2 Dec 2019 12:40:49 +0000 Sudip Mukherjee <[email protected]>…
Hi Steve,
Quoted 19 lines · Sudip Mukherjee
When we use 'O=' with make to build libtraceevent in a separate folder it fails to install libtraceevent.a and libtraceevent.so.1.1.0 with the error:
INSTALL/home/sudip/linux/obj-trace/libtraceevent.aINSTALL/home/sudip/linux/obj-trace/libtraceevent.so.1.1.0
cp: cannot stat 'libtraceevent.a': No such file or directory Makefile:225: recipe for target 'install_lib' failed
make: *** [install_lib] Error 1I used the command:
make O=../../../obj-trace DESTDIR=~/test prefix==/usr installIt turns out libtraceevent
Makefile, even though it builds in a separate folder, searches for libtraceevent.a and libtraceevent.so.1.1.0 in its source folder.
So, add the 'OUTPUT' prefix to the source path so that 'make' looks for the files in the correct place.
Quoted 8 lines
Quoted 3 lines
Signed-off-by Sudip Mukherjee <[email protected]>--- tools/lib/traceevent/Makefile | 1 +A gentle ping.
I know its the merge window now. But your ack for these two patches will allow me to start with the debian workflow.
Thanks for the reminder. Yeah, these look fine, and I just tested them out.
Arnaldo, can you take these in, and possibly get them into this merge window?
-- Steve
Em Mon, Dec 02, 2019 at 05:53:07PM -0500, Steven Rostedt escreveu:
Quoted 35 lines
Quoted 23 lines · On Mon, 2 Dec 2019 12:40:49 +0000 Sudip Mukherjee <[email protected]>…
Hi Steve,
Quoted 19 lines · Sudip Mukherjee
When we use 'O=' with make to build libtraceevent in a separate folder it fails to install libtraceevent.a and libtraceevent.so.1.1.0 with the error:
INSTALL/home/sudip/linux/obj-trace/libtraceevent.aINSTALL/home/sudip/linux/obj-trace/libtraceevent.so.1.1.0
cp: cannot stat 'libtraceevent.a': No such file or directory Makefile:225: recipe for target 'install_lib' failed
make: *** [install_lib] Error 1I used the command:
make O=../../../obj-trace DESTDIR=~/test prefix==/usr installIt turns out libtraceevent
Makefile, even though it builds in a separate folder, searches for libtraceevent.a and libtraceevent.so.1.1.0 in its source folder.
So, add the 'OUTPUT' prefix to the source path so that 'make' looks for the files in the correct place.Quoted 8 lines
Quoted 3 lines
Signed-off-by Sudip Mukherjee <[email protected]>--- tools/lib/traceevent/Makefile | 1 +A gentle ping.
I know its the merge window now. But your ack for these two patches will allow me to start with the debian workflow.
Quoted 7 lines
Thanks for the reminder. Yeah, these look fine, and I just tested them out.
Arnaldo, can you take these in, and possibly get them into this merge window?
Reviewed-by Steven Rostedt (VMware) <[email protected]>
Sure,
- Arnaldo
[tip: perf/urgent] libtraceevent: Fix lib installation with O=
In reply to Sudip MukherjeeThe following commit has been merged into the perf/urgent branch of tip:
The following commit has been merged into the perf/urgent branch of tip:
Commit-ID: 587db8ebdac2c5eb3a8851e16b26f2e2711ab797 Gitweb: https://git.kernel.org/tip/587db8ebdac2c5eb3a8851e16b26f2e2711ab797 Author: Sudip Mukherjee <[email protected]> AuthorDate: Fri, 15 Nov 2019 11:36:09 Committer: Arnaldo Carvalho de Melo <[email protected]> CommitterDate: Mon, 02 Dec 2019 21:58:20 -03:00
libtraceevent: Fix lib installation with O=
When we use 'O=' with make to build libtraceevent in a separate folder it fails to install libtraceevent.a and libtraceevent.so.1.1.0 with the error:
INSTALL /home/sudip/linux/obj-trace/libtraceevent.a INSTALL /home/sudip/linux/obj-trace/libtraceevent.so.1.1.0
cp: cannot stat 'libtraceevent.a': No such file or directory Makefile:225: recipe for target 'install_lib' failed
make: *** [install_lib] Error 1
I used the command:
make O=../../../obj-trace DESTDIR=~/test prefix==/usr install
It turns out libtraceevent Makefile, even though it builds in a separate folder, searches for libtraceevent.a and libtraceevent.so.1.1.0 in its source folder.
So, add the 'OUTPUT' prefix to the source path so that 'make' looks for the files in the correct place.
--- tools/lib/traceevent/Makefile | 1 + 1 file changed, 1 insertion(+)
tools/lib/traceevent/Makefile +1 -0
@@ -97,6 +97,7 @@ EVENT_PARSE_VERSION = $(EP_VERSION).$(EP_PATCHLEVEL).$(EP_EXTRAVERSION) LIB_TARGET = libtraceevent.a libtraceevent.so.$(EVENT_PARSE_VERSION) LIB_INSTALL = libtraceevent.a libtraceevent.so* +LIB_INSTALL := $(addprefix $(OUTPUT),$(LIB_INSTALL)) INCLUDES = -I. -I $(srctree)/tools/include $(CONFIG_INCLUDES)