All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] tools/xenstore: add libdl dependency to libxenstore
@ 2018-03-07 10:17 Juergen Gross
  2018-03-07 10:29 ` Wei Liu
                   ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: Juergen Gross @ 2018-03-07 10:17 UTC (permalink / raw)
  To: xen-devel; +Cc: Juergen Gross, wei.liu2, ian.jackson

Commit 448c03b3cbe14873ee63 ("tools/xenstore: try to get minimum thread
stack size for watch thread") added a dependency to libdl to
libxenstore.

Add the needed flags to LDLIBS_libxenstore and the pkg-config file of
libxenstore.

Fixes: 448c03b3cbe14873ee63
Signed-off-by: Juergen Gross <jgross@suse.com>
Tested-by: Olaf Hering <olaf@aepfle.de>
---
 tools/Rules.mk                | 3 +++
 tools/xenstore/Makefile       | 2 ++
 tools/xenstore/xenstore.pc.in | 2 +-
 3 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/tools/Rules.mk b/tools/Rules.mk
index 61515d3063..296b722372 100644
--- a/tools/Rules.mk
+++ b/tools/Rules.mk
@@ -149,6 +149,9 @@ CFLAGS_libxenstore = -I$(XEN_XENSTORE)/include $(CFLAGS_xeninclude)
 SHDEPS_libxenstore = $(SHLIB_libxentoolcore)
 LDLIBS_libxenstore = $(SHDEPS_libxenstore) $(XEN_XENSTORE)/libxenstore$(libextension)
 SHLIB_libxenstore  = $(SHDEPS_libxenstore) -Wl,-rpath-link=$(XEN_XENSTORE)
+ifeq ($(CONFIG_Linux),y)
+LDLIBS_libxenstore += -ldl
+endif
 
 CFLAGS_libxenstat  = -I$(XEN_LIBXENSTAT)
 SHDEPS_libxenstat  = $(SHLIB_libxenctrl) $(SHLIB_libxenstore)
diff --git a/tools/xenstore/Makefile b/tools/xenstore/Makefile
index 0831be0b6f..aeee819748 100644
--- a/tools/xenstore/Makefile
+++ b/tools/xenstore/Makefile
@@ -103,6 +103,8 @@ xs.opic: CFLAGS += -DUSE_PTHREAD
 ifeq ($(CONFIG_Linux),y)
 xs.opic: CFLAGS += -DUSE_DLSYM
 libxenstore.so.$(MAJOR).$(MINOR): LDFLAGS += -ldl
+else
+PKG_CONFIG_REMOVE += dl
 endif
 
 libxenstore.so.$(MAJOR).$(MINOR): xs.opic xs_lib.opic
diff --git a/tools/xenstore/xenstore.pc.in b/tools/xenstore/xenstore.pc.in
index 6fd72a1f17..4fc37f805b 100644
--- a/tools/xenstore/xenstore.pc.in
+++ b/tools/xenstore/xenstore.pc.in
@@ -7,4 +7,4 @@ Description: The Xenstore library for Xen hypervisor
 Version: @@version@@
 Cflags: -I${includedir} @@cflagslocal@@
 Libs: @@libsflag@@${libdir} -lxenstore
-Requires.private: xenevtchn,xencontrol,xengnttab,xentoolcore
+Requires.private: xenevtchn,xencontrol,xengnttab,xentoolcore,dl
-- 
2.13.6


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

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

* Re: [PATCH] tools/xenstore: add libdl dependency to libxenstore
  2018-03-07 10:17 [PATCH] tools/xenstore: add libdl dependency to libxenstore Juergen Gross
@ 2018-03-07 10:29 ` Wei Liu
  2018-03-07 11:01 ` Juergen Gross
  2018-03-07 11:19 ` Ian Jackson
  2 siblings, 0 replies; 13+ messages in thread
From: Wei Liu @ 2018-03-07 10:29 UTC (permalink / raw)
  To: Juergen Gross; +Cc: xen-devel, ian.jackson, wei.liu2

On Wed, Mar 07, 2018 at 11:17:44AM +0100, Juergen Gross wrote:
> Commit 448c03b3cbe14873ee63 ("tools/xenstore: try to get minimum thread
> stack size for watch thread") added a dependency to libdl to
> libxenstore.
> 
> Add the needed flags to LDLIBS_libxenstore and the pkg-config file of
> libxenstore.
> 
> Fixes: 448c03b3cbe14873ee63
> Signed-off-by: Juergen Gross <jgross@suse.com>
> Tested-by: Olaf Hering <olaf@aepfle.de>

Acked-by: Wei Liu <wei.liu2@citrix.com>

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

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

* Re: [PATCH] tools/xenstore: add libdl dependency to libxenstore
  2018-03-07 10:17 [PATCH] tools/xenstore: add libdl dependency to libxenstore Juergen Gross
  2018-03-07 10:29 ` Wei Liu
@ 2018-03-07 11:01 ` Juergen Gross
  2018-03-07 11:04   ` Wei Liu
  2018-03-07 11:19 ` Ian Jackson
  2 siblings, 1 reply; 13+ messages in thread
From: Juergen Gross @ 2018-03-07 11:01 UTC (permalink / raw)
  To: xen-devel; +Cc: ian.jackson, wei.liu2

On 07/03/18 11:17, Juergen Gross wrote:
> Commit 448c03b3cbe14873ee63 ("tools/xenstore: try to get minimum thread
> stack size for watch thread") added a dependency to libdl to
> libxenstore.
> 
> Add the needed flags to LDLIBS_libxenstore and the pkg-config file of
> libxenstore.
> 
> Fixes: 448c03b3cbe14873ee63
> Signed-off-by: Juergen Gross <jgross@suse.com>
> Tested-by: Olaf Hering <olaf@aepfle.de>
> ---
>  tools/Rules.mk                | 3 +++
>  tools/xenstore/Makefile       | 2 ++
>  tools/xenstore/xenstore.pc.in | 2 +-
>  3 files changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/tools/Rules.mk b/tools/Rules.mk
> index 61515d3063..296b722372 100644
> --- a/tools/Rules.mk
> +++ b/tools/Rules.mk
> @@ -149,6 +149,9 @@ CFLAGS_libxenstore = -I$(XEN_XENSTORE)/include $(CFLAGS_xeninclude)
>  SHDEPS_libxenstore = $(SHLIB_libxentoolcore)
>  LDLIBS_libxenstore = $(SHDEPS_libxenstore) $(XEN_XENSTORE)/libxenstore$(libextension)
>  SHLIB_libxenstore  = $(SHDEPS_libxenstore) -Wl,-rpath-link=$(XEN_XENSTORE)
> +ifeq ($(CONFIG_Linux),y)
> +LDLIBS_libxenstore += -ldl
> +endif
>  
>  CFLAGS_libxenstat  = -I$(XEN_LIBXENSTAT)
>  SHDEPS_libxenstat  = $(SHLIB_libxenctrl) $(SHLIB_libxenstore)
> diff --git a/tools/xenstore/Makefile b/tools/xenstore/Makefile
> index 0831be0b6f..aeee819748 100644
> --- a/tools/xenstore/Makefile
> +++ b/tools/xenstore/Makefile
> @@ -103,6 +103,8 @@ xs.opic: CFLAGS += -DUSE_PTHREAD
>  ifeq ($(CONFIG_Linux),y)
>  xs.opic: CFLAGS += -DUSE_DLSYM
>  libxenstore.so.$(MAJOR).$(MINOR): LDFLAGS += -ldl
> +else
> +PKG_CONFIG_REMOVE += dl
>  endif
>  
>  libxenstore.so.$(MAJOR).$(MINOR): xs.opic xs_lib.opic
> diff --git a/tools/xenstore/xenstore.pc.in b/tools/xenstore/xenstore.pc.in
> index 6fd72a1f17..4fc37f805b 100644
> --- a/tools/xenstore/xenstore.pc.in
> +++ b/tools/xenstore/xenstore.pc.in
> @@ -7,4 +7,4 @@ Description: The Xenstore library for Xen hypervisor
>  Version: @@version@@
>  Cflags: -I${includedir} @@cflagslocal@@
>  Libs: @@libsflag@@${libdir} -lxenstore
> -Requires.private: xenevtchn,xencontrol,xengnttab,xentoolcore
> +Requires.private: xenevtchn,xencontrol,xengnttab,xentoolcore,dl

Uuh, this was wrong. libdl hasn't got a pkgconfig file, so we need to
add -ldl to Libs.private instead. V2 coming soon...


Juergen


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

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

* Re: [PATCH] tools/xenstore: add libdl dependency to libxenstore
  2018-03-07 11:01 ` Juergen Gross
@ 2018-03-07 11:04   ` Wei Liu
  0 siblings, 0 replies; 13+ messages in thread
From: Wei Liu @ 2018-03-07 11:04 UTC (permalink / raw)
  To: Juergen Gross; +Cc: xen-devel, wei.liu2, ian.jackson

On Wed, Mar 07, 2018 at 12:01:25PM +0100, Juergen Gross wrote:
> On 07/03/18 11:17, Juergen Gross wrote:
> > Commit 448c03b3cbe14873ee63 ("tools/xenstore: try to get minimum thread
> > stack size for watch thread") added a dependency to libdl to
> > libxenstore.
> > 
> > Add the needed flags to LDLIBS_libxenstore and the pkg-config file of
> > libxenstore.
> > 
> > Fixes: 448c03b3cbe14873ee63
> > Signed-off-by: Juergen Gross <jgross@suse.com>
> > Tested-by: Olaf Hering <olaf@aepfle.de>
> > ---
> >  tools/Rules.mk                | 3 +++
> >  tools/xenstore/Makefile       | 2 ++
> >  tools/xenstore/xenstore.pc.in | 2 +-
> >  3 files changed, 6 insertions(+), 1 deletion(-)
> > 
> > diff --git a/tools/Rules.mk b/tools/Rules.mk
> > index 61515d3063..296b722372 100644
> > --- a/tools/Rules.mk
> > +++ b/tools/Rules.mk
> > @@ -149,6 +149,9 @@ CFLAGS_libxenstore = -I$(XEN_XENSTORE)/include $(CFLAGS_xeninclude)
> >  SHDEPS_libxenstore = $(SHLIB_libxentoolcore)
> >  LDLIBS_libxenstore = $(SHDEPS_libxenstore) $(XEN_XENSTORE)/libxenstore$(libextension)
> >  SHLIB_libxenstore  = $(SHDEPS_libxenstore) -Wl,-rpath-link=$(XEN_XENSTORE)
> > +ifeq ($(CONFIG_Linux),y)
> > +LDLIBS_libxenstore += -ldl
> > +endif
> >  
> >  CFLAGS_libxenstat  = -I$(XEN_LIBXENSTAT)
> >  SHDEPS_libxenstat  = $(SHLIB_libxenctrl) $(SHLIB_libxenstore)
> > diff --git a/tools/xenstore/Makefile b/tools/xenstore/Makefile
> > index 0831be0b6f..aeee819748 100644
> > --- a/tools/xenstore/Makefile
> > +++ b/tools/xenstore/Makefile
> > @@ -103,6 +103,8 @@ xs.opic: CFLAGS += -DUSE_PTHREAD
> >  ifeq ($(CONFIG_Linux),y)
> >  xs.opic: CFLAGS += -DUSE_DLSYM
> >  libxenstore.so.$(MAJOR).$(MINOR): LDFLAGS += -ldl
> > +else
> > +PKG_CONFIG_REMOVE += dl
> >  endif
> >  
> >  libxenstore.so.$(MAJOR).$(MINOR): xs.opic xs_lib.opic
> > diff --git a/tools/xenstore/xenstore.pc.in b/tools/xenstore/xenstore.pc.in
> > index 6fd72a1f17..4fc37f805b 100644
> > --- a/tools/xenstore/xenstore.pc.in
> > +++ b/tools/xenstore/xenstore.pc.in
> > @@ -7,4 +7,4 @@ Description: The Xenstore library for Xen hypervisor
> >  Version: @@version@@
> >  Cflags: -I${includedir} @@cflagslocal@@
> >  Libs: @@libsflag@@${libdir} -lxenstore
> > -Requires.private: xenevtchn,xencontrol,xengnttab,xentoolcore
> > +Requires.private: xenevtchn,xencontrol,xengnttab,xentoolcore,dl
> 
> Uuh, this was wrong. libdl hasn't got a pkgconfig file, so we need to
> add -ldl to Libs.private instead. V2 coming soon...
> 

Luckily I haven't got around to apply it...

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

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

* [PATCH] tools/xenstore: add libdl dependency to libxenstore
  2018-03-07 10:17 [PATCH] tools/xenstore: add libdl dependency to libxenstore Juergen Gross
  2018-03-07 10:29 ` Wei Liu
  2018-03-07 11:01 ` Juergen Gross
@ 2018-03-07 11:19 ` Ian Jackson
  2018-03-07 11:49   ` Juergen Gross
  2 siblings, 1 reply; 13+ messages in thread
From: Ian Jackson @ 2018-03-07 11:19 UTC (permalink / raw)
  To: Juergen Gross; +Cc: xen-devel, wei.liu2

Juergen Gross writes ("[PATCH] tools/xenstore: add libdl dependency to libxenstore"):
>  libxenstore.so.$(MAJOR).$(MINOR): LDFLAGS += -ldl
> +else
> +PKG_CONFIG_REMOVE += dl

What is this ?

Ian.

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

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

* Re: [PATCH] tools/xenstore: add libdl dependency to libxenstore
  2018-03-07 11:19 ` Ian Jackson
@ 2018-03-07 11:49   ` Juergen Gross
  2018-03-07 12:06     ` ian.jackson
  0 siblings, 1 reply; 13+ messages in thread
From: Juergen Gross @ 2018-03-07 11:49 UTC (permalink / raw)
  To: Ian Jackson; +Cc: xen-devel, wei.liu2

On 07/03/18 12:19, Ian Jackson wrote:
> Juergen Gross writes ("[PATCH] tools/xenstore: add libdl dependency to libxenstore"):
>>  libxenstore.so.$(MAJOR).$(MINOR): LDFLAGS += -ldl
>> +else
>> +PKG_CONFIG_REMOVE += dl
> 
> What is this ?

-ldl is needed on Linux only, but I didn't want to add a Linux specific
pkg-config file. So I'm removing the dependency in case we are not on
Linux.


Juergen

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

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

* Re: [PATCH] tools/xenstore: add libdl dependency to libxenstore
  2018-03-07 11:49   ` Juergen Gross
@ 2018-03-07 12:06     ` ian.jackson
  2018-03-07 12:15       ` Juergen Gross
  0 siblings, 1 reply; 13+ messages in thread
From: ian.jackson @ 2018-03-07 12:06 UTC (permalink / raw)
  To: Juergen Gross; +Cc: xen-devel, wei.liu2

Juergen Gross writes ("Re: [PATCH] tools/xenstore: add libdl dependency to libxenstore"):
> On 07/03/18 12:19, Ian Jackson wrote:
> > Juergen Gross writes ("[PATCH] tools/xenstore: add libdl dependency to libxenstore"):
> >>  libxenstore.so.$(MAJOR).$(MINOR): LDFLAGS += -ldl
> >> +else
> >> +PKG_CONFIG_REMOVE += dl
> > 
> > What is this ?
> 
> -ldl is needed on Linux only, but I didn't want to add a Linux specific
> pkg-config file. So I'm removing the dependency in case we are not on
> Linux.

Sorry, I was grepping an older xen tree, so I didn't see where this
variable was honoured.

Will this work, though, when what has to be done is to remove -ldl
from Libs, rather than from Requires ?

Ian.



_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

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

* Re: [PATCH] tools/xenstore: add libdl dependency to libxenstore
  2018-03-07 12:06     ` ian.jackson
@ 2018-03-07 12:15       ` Juergen Gross
  2018-03-09  8:36         ` Olaf Hering
  0 siblings, 1 reply; 13+ messages in thread
From: Juergen Gross @ 2018-03-07 12:15 UTC (permalink / raw)
  To: ian.jackson; +Cc: xen-devel, wei.liu2

On 07/03/18 13:06, ian.jackson@citrix.com wrote:
> Juergen Gross writes ("Re: [PATCH] tools/xenstore: add libdl dependency to libxenstore"):
>> On 07/03/18 12:19, Ian Jackson wrote:
>>> Juergen Gross writes ("[PATCH] tools/xenstore: add libdl dependency to libxenstore"):
>>>>  libxenstore.so.$(MAJOR).$(MINOR): LDFLAGS += -ldl
>>>> +else
>>>> +PKG_CONFIG_REMOVE += dl
>>>
>>> What is this ?
>>
>> -ldl is needed on Linux only, but I didn't want to add a Linux specific
>> pkg-config file. So I'm removing the dependency in case we are not on
>> Linux.
> 
> Sorry, I was grepping an older xen tree, so I didn't see where this
> variable was honoured.
> 
> Will this work, though, when what has to be done is to remove -ldl
> from Libs, rather than from Requires ?

Yes, I've tested it to work (in V2 we have: PKG_CONFIG_REMOVE += -ldl)


Juergen

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

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

* Re: [PATCH] tools/xenstore: add libdl dependency to libxenstore
  2018-03-07 12:15       ` Juergen Gross
@ 2018-03-09  8:36         ` Olaf Hering
  2018-03-09 10:00           ` Juergen Gross
  0 siblings, 1 reply; 13+ messages in thread
From: Olaf Hering @ 2018-03-09  8:36 UTC (permalink / raw)
  To: Juergen Gross; +Cc: ian.jackson, wei.liu2, xen-devel


[-- Attachment #1.1: Type: text/plain, Size: 1251 bytes --]

On Wed, Mar 07, Juergen Gross wrote:

> On 07/03/18 13:06, ian.jackson@citrix.com wrote:
> > Juergen Gross writes ("Re: [PATCH] tools/xenstore: add libdl dependency to libxenstore"):
> >> On 07/03/18 12:19, Ian Jackson wrote:
> >>> Juergen Gross writes ("[PATCH] tools/xenstore: add libdl dependency to libxenstore"):
> >>>>  libxenstore.so.$(MAJOR).$(MINOR): LDFLAGS += -ldl
> >>>> +else
> >>>> +PKG_CONFIG_REMOVE += dl
> >>> What is this ?
> >> -ldl is needed on Linux only, but I didn't want to add a Linux specific
> >> pkg-config file. So I'm removing the dependency in case we are not on
> >> Linux.
> > Sorry, I was grepping an older xen tree, so I didn't see where this
> > variable was honoured.
> > Will this work, though, when what has to be done is to remove -ldl
> > from Libs, rather than from Requires ?
> Yes, I've tested it to work (in V2 we have: PKG_CONFIG_REMOVE += -ldl)

This breaks libvirt.
m4/virt-driver-xen.m4 tries to use just '-lxenstore' and the test fails
with missing 'dlsym'. If I adjust this .m4 file to use pkgconfig it
still fails. Only appending '-ldl' to XEN_LIBS will help. So to me it
looks like -ldl is now a hard requirement when linking to
libxenstore.so. I used 20180307T163340.c9bd8a7365 for testing.

Olaf

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

[-- Attachment #2: Type: text/plain, Size: 157 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

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

* Re: [PATCH] tools/xenstore: add libdl dependency to libxenstore
  2018-03-09  8:36         ` Olaf Hering
@ 2018-03-09 10:00           ` Juergen Gross
  2018-03-09 10:23             ` Olaf Hering
  0 siblings, 1 reply; 13+ messages in thread
From: Juergen Gross @ 2018-03-09 10:00 UTC (permalink / raw)
  To: Olaf Hering; +Cc: ian.jackson, wei.liu2, xen-devel

On 09/03/18 09:36, Olaf Hering wrote:
> On Wed, Mar 07, Juergen Gross wrote:
> 
>> On 07/03/18 13:06, ian.jackson@citrix.com wrote:
>>> Juergen Gross writes ("Re: [PATCH] tools/xenstore: add libdl dependency to libxenstore"):
>>>> On 07/03/18 12:19, Ian Jackson wrote:
>>>>> Juergen Gross writes ("[PATCH] tools/xenstore: add libdl dependency to libxenstore"):
>>>>>>  libxenstore.so.$(MAJOR).$(MINOR): LDFLAGS += -ldl
>>>>>> +else
>>>>>> +PKG_CONFIG_REMOVE += dl
>>>>> What is this ?
>>>> -ldl is needed on Linux only, but I didn't want to add a Linux specific
>>>> pkg-config file. So I'm removing the dependency in case we are not on
>>>> Linux.
>>> Sorry, I was grepping an older xen tree, so I didn't see where this
>>> variable was honoured.
>>> Will this work, though, when what has to be done is to remove -ldl
>>> from Libs, rather than from Requires ?
>> Yes, I've tested it to work (in V2 we have: PKG_CONFIG_REMOVE += -ldl)
> 
> This breaks libvirt.
> m4/virt-driver-xen.m4 tries to use just '-lxenstore' and the test fails
> with missing 'dlsym'. If I adjust this .m4 file to use pkgconfig it
> still fails. Only appending '-ldl' to XEN_LIBS will help. So to me it
> looks like -ldl is now a hard requirement when linking to
> libxenstore.so. I used 20180307T163340.c9bd8a7365 for testing.

It seems as if some information in libxenstore.so is missing.

E.g. libpython2.7.so is linked against libdl.so. It is possible to just
link any program with libpython2.7.so without having to specify -ldl:

$ gcc -o cpuid cpuid.c -lpython2.7
$ ldd cpuid
        linux-vdso.so.1 (0x00007fffbe9bf000)
        libpython2.7.so.1.0 => /usr/lib64/libpython2.7.so.1.0
(0x00007f70bd560000)
        libc.so.6 => /lib64/libc.so.6 (0x00007f70bd1bb000)
        libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f70bcf9e000)
        libdl.so.2 => /lib64/libdl.so.2 (0x00007f70bcd9a000)
        libutil.so.1 => /lib64/libutil.so.1 (0x00007f70bcb97000)
        libm.so.6 => /lib64/libm.so.6 (0x00007f70bc89a000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f70bd96e000)

$ cat /usr/lib64/pkgconfig/python-2.7.pc
prefix=/usr
exec_prefix=/usr
libdir=/usr/lib64
includedir=/usr/include

Name: Python
Description: Python library
Requires:
Version: 2.7
Libs.private: -lpthread -ldl  -lutil
Libs: -L${libdir} -lpython2.7
Cflags: -I${includedir}/python2.7


So how does this work?


Juergen

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

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

* Re: [PATCH] tools/xenstore: add libdl dependency to libxenstore
  2018-03-09 10:00           ` Juergen Gross
@ 2018-03-09 10:23             ` Olaf Hering
  2018-03-09 11:08               ` Olaf Hering
  0 siblings, 1 reply; 13+ messages in thread
From: Olaf Hering @ 2018-03-09 10:23 UTC (permalink / raw)
  To: Juergen Gross; +Cc: ian.jackson, wei.liu2, xen-devel


[-- Attachment #1.1: Type: text/plain, Size: 580 bytes --]

On Fri, Mar 09, Juergen Gross wrote:

> So how does this work?

No idea, at least this output differs:

abuild@latitude:~> readelf -Wa /usr/lib64/libpython2.7.so | grep dlsym
00000000003e5e08  000000d900000007 R_X86_64_JUMP_SLOT     0000000000000000 dlsym@GLIBC_2.2.5 + 0
   217: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND dlsym@GLIBC_2.2.5 (10)
abuild@latitude:~> readelf -Wa /usr/lib64/libxenstore.so | grep dlsym
00000000002071b0  0000002b00000007 R_X86_64_JUMP_SLOT     0000000000000000 dlsym + 0
    43: 0000000000000000     0 NOTYPE  GLOBAL DEFAULT  UND dlsym

Olaf

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

[-- Attachment #2: Type: text/plain, Size: 157 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

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

* Re: [PATCH] tools/xenstore: add libdl dependency to libxenstore
  2018-03-09 10:23             ` Olaf Hering
@ 2018-03-09 11:08               ` Olaf Hering
  2018-03-09 16:12                 ` Wei Liu
  0 siblings, 1 reply; 13+ messages in thread
From: Olaf Hering @ 2018-03-09 11:08 UTC (permalink / raw)
  To: Juergen Gross; +Cc: ian.jackson, wei.liu2, xen-devel


[-- Attachment #1.1: Type: text/plain, Size: 853 bytes --]

On Fri, Mar 09, Olaf Hering wrote:

> abuild@latitude:~> readelf -Wa /usr/lib64/libpython2.7.so | grep dlsym
> 00000000003e5e08  000000d900000007 R_X86_64_JUMP_SLOT     0000000000000000 dlsym@GLIBC_2.2.5 + 0
>    217: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND dlsym@GLIBC_2.2.5 (10)
> abuild@latitude:~> readelf -Wa /usr/lib64/libxenstore.so | grep dlsym
> 00000000002071b0  0000002b00000007 R_X86_64_JUMP_SLOT     0000000000000000 dlsym + 0
>     43: 0000000000000000     0 NOTYPE  GLOBAL DEFAULT  UND dlsym

The difference is SUSE_ASNEEDED=1 in environment.
If it is set, libxenstore.so will not link to libdl.so.
If it is not, libxenstore.so will link to libdl.so.
Since package building exports SUSE_ASNEEDED=1 usage of -lxenstore will
fail. Not sure how all the other packages use dlsym(), clearly xenstore
does something different.

Olaf

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

[-- Attachment #2: Type: text/plain, Size: 157 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

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

* Re: [PATCH] tools/xenstore: add libdl dependency to libxenstore
  2018-03-09 11:08               ` Olaf Hering
@ 2018-03-09 16:12                 ` Wei Liu
  0 siblings, 0 replies; 13+ messages in thread
From: Wei Liu @ 2018-03-09 16:12 UTC (permalink / raw)
  To: Olaf Hering; +Cc: Juergen Gross, ian.jackson, wei.liu2, xen-devel

On Fri, Mar 09, 2018 at 12:08:42PM +0100, Olaf Hering wrote:
> On Fri, Mar 09, Olaf Hering wrote:
> 
> > abuild@latitude:~> readelf -Wa /usr/lib64/libpython2.7.so | grep dlsym
> > 00000000003e5e08  000000d900000007 R_X86_64_JUMP_SLOT     0000000000000000 dlsym@GLIBC_2.2.5 + 0
> >    217: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND dlsym@GLIBC_2.2.5 (10)
> > abuild@latitude:~> readelf -Wa /usr/lib64/libxenstore.so | grep dlsym
> > 00000000002071b0  0000002b00000007 R_X86_64_JUMP_SLOT     0000000000000000 dlsym + 0
> >     43: 0000000000000000     0 NOTYPE  GLOBAL DEFAULT  UND dlsym
> 
> The difference is SUSE_ASNEEDED=1 in environment.
> If it is set, libxenstore.so will not link to libdl.so.
> If it is not, libxenstore.so will link to libdl.so.
> Since package building exports SUSE_ASNEEDED=1 usage of -lxenstore will
> fail. Not sure how all the other packages use dlsym(), clearly xenstore
> does something different.

I'm not sure what to make of this. I'm not sure what SUSE_ASNEEDED is
for. I guess I will leave this to you SuSE experts to sort out. :-)

Wei.

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

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

end of thread, other threads:[~2018-03-09 16:12 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-07 10:17 [PATCH] tools/xenstore: add libdl dependency to libxenstore Juergen Gross
2018-03-07 10:29 ` Wei Liu
2018-03-07 11:01 ` Juergen Gross
2018-03-07 11:04   ` Wei Liu
2018-03-07 11:19 ` Ian Jackson
2018-03-07 11:49   ` Juergen Gross
2018-03-07 12:06     ` ian.jackson
2018-03-07 12:15       ` Juergen Gross
2018-03-09  8:36         ` Olaf Hering
2018-03-09 10:00           ` Juergen Gross
2018-03-09 10:23             ` Olaf Hering
2018-03-09 11:08               ` Olaf Hering
2018-03-09 16:12                 ` Wei Liu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.