linux-trace-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] libtraceevent: fix lib installation
@ 2019-11-15 11:36 Sudip Mukherjee
  2019-11-15 11:36 ` [PATCH 2/2] libtraceevent: copy pkg-config file in output folder Sudip Mukherjee
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Sudip Mukherjee @ 2019-11-15 11:36 UTC (permalink / raw)
  To: arnaldo.melo, Arnaldo Carvalho de Melo, Steven Rostedt
  Cc: linux-kernel, linux-trace-devel, 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.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.

Signed-off-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
---
 tools/lib/traceevent/Makefile | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tools/lib/traceevent/Makefile b/tools/lib/traceevent/Makefile
index cbb429f55062..83446fe2cf01 100644
--- a/tools/lib/traceevent/Makefile
+++ b/tools/lib/traceevent/Makefile
@@ -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)
 
-- 
2.11.0


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2019-12-04  7:54 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-15 11:36 [PATCH 1/2] libtraceevent: fix lib installation Sudip Mukherjee
2019-11-15 11:36 ` [PATCH 2/2] libtraceevent: copy pkg-config file in output folder Sudip Mukherjee
2019-12-04  7:53   ` [tip: perf/urgent] libtraceevent: Copy pkg-config file to output folder when using O= tip-bot2 for Sudip Mukherjee
2019-12-02 12:40 ` [PATCH 1/2] libtraceevent: fix lib installation Sudip Mukherjee
2019-12-02 22:53   ` Steven Rostedt
2019-12-03  0:55     ` Arnaldo Carvalho de Melo
2019-12-04  7:53 ` [tip: perf/urgent] libtraceevent: Fix lib installation with O= tip-bot2 for Sudip Mukherjee

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).