linux-kernel.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

* [PATCH 2/2] libtraceevent: copy pkg-config file in output folder
  2019-11-15 11:36 [PATCH 1/2] libtraceevent: fix lib installation Sudip Mukherjee
@ 2019-11-15 11:36 ` 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-04  7:53 ` [tip: perf/urgent] libtraceevent: Fix lib installation with O= tip-bot2 for Sudip Mukherjee
  2 siblings, 1 reply; 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 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.

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

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


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

* Re: [PATCH 1/2] libtraceevent: fix lib installation
  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-02 12:40 ` Sudip Mukherjee
  2019-12-02 22:53   ` Steven Rostedt
  2019-12-04  7:53 ` [tip: perf/urgent] libtraceevent: Fix lib installation with O= tip-bot2 for Sudip Mukherjee
  2 siblings, 1 reply; 7+ messages in thread
From: Sudip Mukherjee @ 2019-12-02 12:40 UTC (permalink / raw)
  To: Steven Rostedt
  Cc: linux-kernel, Linux Trace Devel, arnaldo.melo, Arnaldo Carvalho de Melo

Hi Steve,

On Fri, Nov 15, 2019 at 11:36 AM Sudip Mukherjee
<sudipm.mukherjee@gmail.com> wrote:
>
> 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 +

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

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

* Re: [PATCH 1/2] libtraceevent: fix lib installation
  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
  0 siblings, 1 reply; 7+ messages in thread
From: Steven Rostedt @ 2019-12-02 22:53 UTC (permalink / raw)
  To: Sudip Mukherjee
  Cc: linux-kernel, Linux Trace Devel, arnaldo.melo, Arnaldo Carvalho de Melo

On Mon, 2 Dec 2019 12:40:49 +0000
Sudip Mukherjee <sudipm.mukherjee@gmail.com> wrote:

> Hi Steve,
> 
> On Fri, Nov 15, 2019 at 11:36 AM Sudip Mukherjee
> <sudipm.mukherjee@gmail.com> wrote:
> >
> > 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 +  
> 
> 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?

Reviewed-by: Steven Rostedt (VMware) <rostedt@goodmis.org>

-- Steve

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

* Re: [PATCH 1/2] libtraceevent: fix lib installation
  2019-12-02 22:53   ` Steven Rostedt
@ 2019-12-03  0:55     ` Arnaldo Carvalho de Melo
  0 siblings, 0 replies; 7+ messages in thread
From: Arnaldo Carvalho de Melo @ 2019-12-03  0:55 UTC (permalink / raw)
  To: Steven Rostedt
  Cc: Sudip Mukherjee, linux-kernel, Linux Trace Devel, arnaldo.melo,
	Arnaldo Carvalho de Melo

Em Mon, Dec 02, 2019 at 05:53:07PM -0500, Steven Rostedt escreveu:
> On Mon, 2 Dec 2019 12:40:49 +0000
> Sudip Mukherjee <sudipm.mukherjee@gmail.com> wrote:
> 
> > Hi Steve,
> > 
> > On Fri, Nov 15, 2019 at 11:36 AM Sudip Mukherjee
> > <sudipm.mukherjee@gmail.com> wrote:
> > >
> > > 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 +  
> > 
> > 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?
> 
> Reviewed-by: Steven Rostedt (VMware) <rostedt@goodmis.org>

Sure,

- Arnaldo

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

* [tip: perf/urgent] libtraceevent: Copy pkg-config file to output folder when using O=
  2019-11-15 11:36 ` [PATCH 2/2] libtraceevent: copy pkg-config file in output folder Sudip Mukherjee
@ 2019-12-04  7:53   ` tip-bot2 for Sudip Mukherjee
  0 siblings, 0 replies; 7+ messages in thread
From: tip-bot2 for Sudip Mukherjee @ 2019-12-04  7:53 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: Sudipm Mukherjee, Steven Rostedt (VMware),
	linux-trace-devel, Arnaldo Carvalho de Melo, x86, LKML

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 <sudipm.mukherjee@gmail.com>
AuthorDate:    Fri, 15 Nov 2019 11:36:10 
Committer:     Arnaldo Carvalho de Melo <acme@redhat.com>
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.

Signed-off-by: Sudipm Mukherjee <sudipm.mukherjee@gmail.com>
Reviewed-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Cc: linux-trace-devel@vger.kernel.org
Link: http://lore.kernel.org/lkml/20191115113610.21493-2-sudipm.mukherjee@gmail.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/lib/traceevent/Makefile | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/tools/lib/traceevent/Makefile b/tools/lib/traceevent/Makefile
index 83446fe..c5a0335 100644
--- a/tools/lib/traceevent/Makefile
+++ b/tools/lib/traceevent/Makefile
@@ -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}; \

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

* [tip: perf/urgent] libtraceevent: Fix lib installation with O=
  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-02 12:40 ` [PATCH 1/2] libtraceevent: fix lib installation Sudip Mukherjee
@ 2019-12-04  7:53 ` tip-bot2 for Sudip Mukherjee
  2 siblings, 0 replies; 7+ messages in thread
From: tip-bot2 for Sudip Mukherjee @ 2019-12-04  7:53 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: Sudipm Mukherjee, Steven Rostedt (VMware),
	linux-trace-devel, Arnaldo Carvalho de Melo, x86, LKML

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 <sudipm.mukherjee@gmail.com>
AuthorDate:    Fri, 15 Nov 2019 11:36:09 
Committer:     Arnaldo Carvalho de Melo <acme@redhat.com>
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.

Signed-off-by: Sudipm Mukherjee <sudipm.mukherjee@gmail.com>
Reviewed-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Cc: linux-trace-devel@vger.kernel.org
Link: http://lore.kernel.org/lkml/20191115113610.21493-1-sudipm.mukherjee@gmail.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/lib/traceevent/Makefile | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tools/lib/traceevent/Makefile b/tools/lib/traceevent/Makefile
index cbb429f..83446fe 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)
 

^ 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).