Linux-Trace-Devel Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] libtraceevent: Add dependency on libdl
@ 2019-12-26 22:49 Sudip Mukherjee
  2020-01-06 22:19 ` Arnaldo Carvalho de Melo
  0 siblings, 1 reply; 4+ messages in thread
From: Sudip Mukherjee @ 2019-12-26 22:49 UTC (permalink / raw)
  To: rostedt, Arnaldo Carvalho de Melo, arnaldo.melo
  Cc: linux-kernel, linux-trace-devel, Sudip Mukherjee

event-plugin.c is calling dl_*() functions but it is not linked with
libdl. As a result when we use ldd on the generated libtraceevent.so
file, it does not list libdl as one of its dependencies.
Add -ldl explicitly as done in tools/lib/lockdep.

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

diff --git a/tools/lib/traceevent/Makefile b/tools/lib/traceevent/Makefile
index c874c017c636..0d0575981cc7 100644
--- a/tools/lib/traceevent/Makefile
+++ b/tools/lib/traceevent/Makefile
@@ -143,7 +143,7 @@ $(TE_IN): force
 	$(Q)$(MAKE) $(build)=libtraceevent
 
 $(OUTPUT)libtraceevent.so.$(EVENT_PARSE_VERSION): $(TE_IN)
-	$(QUIET_LINK)$(CC) --shared $(LDFLAGS) $^ -Wl,-soname,libtraceevent.so.$(EP_VERSION) -o $@
+	$(QUIET_LINK)$(CC) --shared $(LDFLAGS) $^ -ldl -Wl,-soname,libtraceevent.so.$(EP_VERSION) -o $@
 	@ln -sf $(@F) $(OUTPUT)libtraceevent.so
 	@ln -sf $(@F) $(OUTPUT)libtraceevent.so.$(EP_VERSION)
 
-- 
2.11.0


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

* Re: [PATCH] libtraceevent: Add dependency on libdl
  2019-12-26 22:49 [PATCH] libtraceevent: Add dependency on libdl Sudip Mukherjee
@ 2020-01-06 22:19 ` Arnaldo Carvalho de Melo
  2020-01-06 22:40   ` Steven Rostedt
  2020-01-07 20:14   ` Steven Rostedt
  0 siblings, 2 replies; 4+ messages in thread
From: Arnaldo Carvalho de Melo @ 2020-01-06 22:19 UTC (permalink / raw)
  To: Sudip Mukherjee
  Cc: rostedt, Arnaldo Carvalho de Melo, arnaldo.melo, linux-kernel,
	linux-trace-devel

Em Thu, Dec 26, 2019 at 10:49:31PM +0000, Sudip Mukherjee escreveu:
> event-plugin.c is calling dl_*() functions but it is not linked with
> libdl. As a result when we use ldd on the generated libtraceevent.so
> file, it does not list libdl as one of its dependencies.
> Add -ldl explicitly as done in tools/lib/lockdep.

Rostedt, can you ack this one? It applies just fine.

- Arnaldo
 
> Signed-off-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
> ---
>  tools/lib/traceevent/Makefile | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tools/lib/traceevent/Makefile b/tools/lib/traceevent/Makefile
> index c874c017c636..0d0575981cc7 100644
> --- a/tools/lib/traceevent/Makefile
> +++ b/tools/lib/traceevent/Makefile
> @@ -143,7 +143,7 @@ $(TE_IN): force
>  	$(Q)$(MAKE) $(build)=libtraceevent
>  
>  $(OUTPUT)libtraceevent.so.$(EVENT_PARSE_VERSION): $(TE_IN)
> -	$(QUIET_LINK)$(CC) --shared $(LDFLAGS) $^ -Wl,-soname,libtraceevent.so.$(EP_VERSION) -o $@
> +	$(QUIET_LINK)$(CC) --shared $(LDFLAGS) $^ -ldl -Wl,-soname,libtraceevent.so.$(EP_VERSION) -o $@
>  	@ln -sf $(@F) $(OUTPUT)libtraceevent.so
>  	@ln -sf $(@F) $(OUTPUT)libtraceevent.so.$(EP_VERSION)
>  
> -- 
> 2.11.0

-- 

- Arnaldo

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

* Re: [PATCH] libtraceevent: Add dependency on libdl
  2020-01-06 22:19 ` Arnaldo Carvalho de Melo
@ 2020-01-06 22:40   ` Steven Rostedt
  2020-01-07 20:14   ` Steven Rostedt
  1 sibling, 0 replies; 4+ messages in thread
From: Steven Rostedt @ 2020-01-06 22:40 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: Sudip Mukherjee, Arnaldo Carvalho de Melo, linux-kernel,
	linux-trace-devel

On Mon, 6 Jan 2020 19:19:55 -0300
Arnaldo Carvalho de Melo <arnaldo.melo@gmail.com> wrote:

> Em Thu, Dec 26, 2019 at 10:49:31PM +0000, Sudip Mukherjee escreveu:
> > event-plugin.c is calling dl_*() functions but it is not linked with
> > libdl. As a result when we use ldd on the generated libtraceevent.so
> > file, it does not list libdl as one of its dependencies.
> > Add -ldl explicitly as done in tools/lib/lockdep.  
> 
> Rostedt, can you ack this one? It applies just fine.

I see nothing wrong, but wanted to play with it before acking it. I'll
do that in a bit. Thanks for the reminder!

-- Steve

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

* Re: [PATCH] libtraceevent: Add dependency on libdl
  2020-01-06 22:19 ` Arnaldo Carvalho de Melo
  2020-01-06 22:40   ` Steven Rostedt
@ 2020-01-07 20:14   ` Steven Rostedt
  1 sibling, 0 replies; 4+ messages in thread
From: Steven Rostedt @ 2020-01-07 20:14 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: Sudip Mukherjee, Arnaldo Carvalho de Melo, linux-kernel,
	linux-trace-devel

On Mon, 6 Jan 2020 19:19:55 -0300
Arnaldo Carvalho de Melo <arnaldo.melo@gmail.com> wrote:

> Em Thu, Dec 26, 2019 at 10:49:31PM +0000, Sudip Mukherjee escreveu:
> > event-plugin.c is calling dl_*() functions but it is not linked with
> > libdl. As a result when we use ldd on the generated libtraceevent.so
> > file, it does not list libdl as one of its dependencies.
> > Add -ldl explicitly as done in tools/lib/lockdep.  
> 
> Rostedt, can you ack this one? It applies just fine.

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

Thanks!

-- Steve

> 
> - Arnaldo
>  
> > Signed-off-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
> > ---
> >  tools/lib/traceevent/Makefile | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/tools/lib/traceevent/Makefile b/tools/lib/traceevent/Makefile
> > index c874c017c636..0d0575981cc7 100644
> > --- a/tools/lib/traceevent/Makefile
> > +++ b/tools/lib/traceevent/Makefile
> > @@ -143,7 +143,7 @@ $(TE_IN): force
> >  	$(Q)$(MAKE) $(build)=libtraceevent
> >  
> >  $(OUTPUT)libtraceevent.so.$(EVENT_PARSE_VERSION): $(TE_IN)
> > -	$(QUIET_LINK)$(CC) --shared $(LDFLAGS) $^ -Wl,-soname,libtraceevent.so.$(EP_VERSION) -o $@
> > +	$(QUIET_LINK)$(CC) --shared $(LDFLAGS) $^ -ldl -Wl,-soname,libtraceevent.so.$(EP_VERSION) -o $@
> >  	@ln -sf $(@F) $(OUTPUT)libtraceevent.so
> >  	@ln -sf $(@F) $(OUTPUT)libtraceevent.so.$(EP_VERSION)
> >  
> > -- 
> > 2.11.0  
> 


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

end of thread, back to index

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-26 22:49 [PATCH] libtraceevent: Add dependency on libdl Sudip Mukherjee
2020-01-06 22:19 ` Arnaldo Carvalho de Melo
2020-01-06 22:40   ` Steven Rostedt
2020-01-07 20:14   ` Steven Rostedt

Linux-Trace-Devel Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-trace-devel/0 linux-trace-devel/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-trace-devel linux-trace-devel/ https://lore.kernel.org/linux-trace-devel \
		linux-trace-devel@vger.kernel.org
	public-inbox-index linux-trace-devel

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-trace-devel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git