Konrad Rzeszutek Wilk
2011-Mar-21 12:27 UTC
[Xen-devel] Build problem: note: ''xtl_createlogger_stdiostream'' is defined in DSO .. so try adding it to the linker command line... libxenctrl.so.4.0: could not read symbols: Invalid operation
This is a Fedora Core 13 environment and I just noticed this as I update the xen-unstable tree: make -C libxl install make[3]: Entering directory `/home/konrad/ssd/xtt/xen-unstable/tools/libxl'' rm -f _libxl_paths.h.tmp.tmp; echo "SBINDIR=\"/usr/sbin\"" >> _libxl_paths.h.tmp.tmp; echo "BINDIR=\"/usr/bin\"" >> _libxl_paths.h.tmp.tmp; echo "LIBEXEC=\"/usr/lib/xen/bin\"" >> _libxl_paths.h.tmp.tmp; echo "LIBDIR=\"/usr/lib64\"" >> _libxl_paths.h.tmp.tmp; echo "SHAREDIR=\"/usr/share\"" >> _libxl_paths.h.tmp.tmp; echo "PRIVATE_BINDIR=\"/usr/lib64/xen/bin\"" >> _libxl_paths.h.tmp.tmp; echo "XENFIRMWAREDIR=\"/usr/lib/xen/boot\"" >> _libxl_paths.h.tmp.tmp; echo "XEN_CONFIG_DIR=\"/etc/xen\"" >> _libxl_paths.h.tmp.tmp; echo "XEN_SCRIPT_DIR=\"/etc/xen/scripts\"" >> _libxl_paths.h.tmp.tmp; echo "XEN_LOCK_DIR=\"/var/lock\"" >> _libxl_paths.h.tmp.tmp; if ! cmp _libxl_paths.h.tmp.tmp _libxl_paths.h.tmp; then mv -f _libxl_paths.h.tmp.tmp _libxl_paths.h.tmp; fi sed -e "s/\([^=]*\)=\(.*\)/#define \1 \2/g" _libxl_paths.h.tmp >_libxl_paths.h.2.tmp if ! cmp _libxl_paths.h.2.tmp _libxl_paths.h; then mv -f _libxl_paths.h.2.tmp _libxl_paths.h; fi gcc -Wl,--no-as-needed -o xl xl.o xl_cmdimpl.o xl_cmdtable.o libxlutil.so libxenlight.so -L/home/konrad/ssd/xtt/xen-unstable/tools/libxl/../../tools/libxl -Wl,-rpath-link=/home/konrad/ssd/xtt/xen-unstable/tools/libxl/../../tools/libxc -Wl,-rpath-link=/home/konrad/ssd/xtt/xen-unstable/tools/libxl/../../tools/xenstore -Wl,-rpath-link=/home/konrad/ssd/xtt/xen-unstable/tools/libxl/../../tools/blktap2/control -lxenlight /usr/bin/ld: xl.o: undefined reference to symbol ''xtl_createlogger_stdiostream'' /usr/bin/ld: note: ''xtl_createlogger_stdiostream'' is defined in DSO /home/konrad/ssd/xtt/xen-unstable/tools/libxl/../../tools/libxc/libxenctrl.so.4.0 so try adding it to the linker command line /home/konrad/ssd/xtt/xen-unstable/tools/libxl/../../tools/libxc/libxenctrl.so.4.0: could not read symbols: Invalid operation collect2: ld returned 1 exit status make[3]: *** [xl] Error 1 make[3]: Leaving directory `/home/konrad/ssd/xtt/xen-unstable/tools/libxl'' make[2]: *** [subdir-install-libxl] Error 2 make[2]: Leaving directory `/home/konrad/ssd/xtt/xen-unstable/tools'' make[1]: *** [subdirs-install] Error 2 make[1]: Leaving directory `/home/konrad/ssd/xtt/xen-unstable/tools'' make: *** [install-tools] Error 2 And nm --defined | grep stdio shows: 0000000000018da0 t stdiostream_destroy 0000000000018df6 t stdiostream_progress 0000000000018f0a t stdiostream_vmessage 0000000000018cbd T xtl_createlogger_stdiostream 0000000000018dc0 T xtl_stdiostream_adjust_flags 0000000000018cb4 T xtl_stdiostream_set_minlevel So the symbol is definitly there. Any ideas? _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Ian Campbell
2011-Mar-21 13:05 UTC
Re: [Xen-devel] Build problem: note: ''xtl_createlogger_stdiostream'' is defined in DSO .. so try adding it to the linker command line... libxenctrl.so.4.0: could not read symbols: Invalid operation
On Mon, 2011-03-21 at 12:27 +0000, Konrad Rzeszutek Wilk wrote:> This is a Fedora Core 13 environment and I just noticed this as I update the xen-unstable > tree:My fault. Ian. # HG changeset patch # User Ian Campbell <ian.campbell@citrix.com> # Date 1300712676 0 # Node ID b139d8f6fc5edaa9b26af15c9a6712d6eb7b0bee # Parent 1849d5dc47deeb75721dfaf8fd46c76283a7e1e3 xl: link against libxenctrl As well as the indirect dependency (via libxl) the xl binary also uses libxenctrl directory (for xtl_createlogger_stdiostream etc) and therefore must link against the library directly too. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> diff -r 1849d5dc47de -r b139d8f6fc5e tools/libxl/Makefile --- a/tools/libxl/Makefile Fri Mar 18 16:40:56 2011 +0000 +++ b/tools/libxl/Makefile Mon Mar 21 13:04:36 2011 +0000 @@ -24,7 +24,7 @@ LIBXL_LIBS = $(LDLIBS_libxenctrl) $(LDLI LIBXLU_LIBS -CLIENT_LIBS = $(LDLIBS_libxenlight) +CLIENT_LIBS = $(LDLIBS_libxenlight) $(LDLIBS_libxenctrl) LIBXL_OBJS-y = osdeps.o libxl_paths.o libxl_bootloader.o flexarray.o ifeq ($(LIBXL_BLKTAP),y) _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Ian Jackson
2011-Mar-21 14:53 UTC
Re: [Xen-devel] Build problem: note: ''xtl_createlogger_stdiostream'' is defined in DSO .. so try adding it to the linker command line... libxenctrl.so.4.0: could not read symbols: Invalid operation
Ian Campbell writes ("Re: [Xen-devel] Build problem: note: ''xtl_createlogger_stdiostream'' is defined in DSO .. so try adding it to the linker command line... libxenctrl.so.4.0: could not read symbols: Invalid operation"):> xl: link against libxenctrlI''ve applied this, thanks. Although I don''t understand why the build failed for Konrad and not me or my test system. Perhaps the failure is only with -Wl,-as-needed ? Ian. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Ian Campbell
2011-Mar-21 15:53 UTC
Re: [Xen-devel] Build problem: note: ''xtl_createlogger_stdiostream'' is defined in DSO .. so try adding it to the linker command line... libxenctrl.so.4.0: could not read symbols: Invalid operation
On Mon, 2011-03-21 at 14:53 +0000, Ian Jackson wrote:> Ian Campbell writes ("Re: [Xen-devel] Build problem: note: ''xtl_createlogger_stdiostream'' is defined in DSO .. so try adding it to the linker command line... libxenctrl.so.4.0: could not read symbols: Invalid operation"): > > xl: link against libxenctrl > > I''ve applied this, thanks. Although I don''t understand why the build > failed for Konrad and not me or my test system.Me neither.> Perhaps the failure is only with -Wl,-as-needed ?Possibly, although I did do test builds with that enabled (or at least I thought I did...) Ian. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Konrad Rzeszutek Wilk
2011-Mar-22 17:16 UTC
Re: [Xen-devel] Build problem: note: ''xtl_createlogger_stdiostream'' is defined in DSO .. so try adding it to the linker command line... libxenctrl.so.4.0: could not read symbols: Invalid operation
On Mon, Mar 21, 2011 at 03:53:25PM +0000, Ian Campbell wrote:> On Mon, 2011-03-21 at 14:53 +0000, Ian Jackson wrote: > > Ian Campbell writes ("Re: [Xen-devel] Build problem: note: ''xtl_createlogger_stdiostream'' is defined in DSO .. so try adding it to the linker command line... libxenctrl.so.4.0: could not read symbols: Invalid operation"): > > > xl: link against libxenctrl > > > > I''ve applied this, thanks. Although I don''t understand why the build > > failed for Konrad and not me or my test system. > > Me neither.I am not sure either. Here is another with todays pull: gcc -o xl xl.o xl_cmdimpl.o xl_cmdtable.o libxlutil.so -L/home/konrad/ssd/xtt/xen-unstable/tools/libxl/../../tools/libxl -Wl,-rpath-link=/home/konrad/ssd/xtt/xen-unstable/tools/libxl/../../tools/libxc -Wl,-rpath-link=/home/konrad/ssd/xtt/xen-unstable/tools/libxl/../../tools/xenstore -Wl,-rpath-link=/home/konrad/ssd/xtt/xen-unstable/tools/libxl/../../tools/blktap2/control -lxenlight -L/home/konrad/ssd/xtt/xen-unstable/tools/libxl/../../tools/libxc -lxenctrl /usr/bin/ld: xl_cmdimpl.o: undefined reference to symbol ''uuid_parse@@UUID_1.0'' /usr/bin/ld: note: ''uuid_parse@@UUID_1.0'' is defined in DSO /lib64/libuuid.so.1 so try adding it to the linker command line /lib64/libuuid.so.1: could not read symbols: Invalid operation> > > Perhaps the failure is only with -Wl,-as-needed ? > > Possibly, although I did do test builds with that enabled (or at least I > thought I did...) > > Ian. > > > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Ian Campbell
2011-Mar-22 17:25 UTC
Re: [Xen-devel] Build problem: note: ''xtl_createlogger_stdiostream'' is defined in DSO .. so try adding it to the linker command line... libxenctrl.so.4.0: could not read symbols: Invalid operation
On Tue, 2011-03-22 at 17:16 +0000, Konrad Rzeszutek Wilk wrote:> On Mon, Mar 21, 2011 at 03:53:25PM +0000, Ian Campbell wrote: > > On Mon, 2011-03-21 at 14:53 +0000, Ian Jackson wrote: > > > Ian Campbell writes ("Re: [Xen-devel] Build problem: note: ''xtl_createlogger_stdiostream'' is defined in DSO .. so try adding it to the linker command line... libxenctrl.so.4.0: could not read symbols: Invalid operation"): > > > > xl: link against libxenctrl > > > > > > I''ve applied this, thanks. Although I don''t understand why the build > > > failed for Konrad and not me or my test system. > > > > Me neither. > > I am not sure either. Here is another with todays pull: > > gcc -o xl xl.o xl_cmdimpl.o xl_cmdtable.o libxlutil.so -L/home/konrad/ssd/xtt/xen-unstable/tools/libxl/../../tools/libxl -Wl,-rpath-link=/home/konrad/ssd/xtt/xen-unstable/tools/libxl/../../tools/libxc -Wl,-rpath-link=/home/konrad/ssd/xtt/xen-unstable/tools/libxl/../../tools/xenstore -Wl,-rpath-link=/home/konrad/ssd/xtt/xen-unstable/tools/libxl/../../tools/blktap2/control -lxenlight -L/home/konrad/ssd/xtt/xen-unstable/tools/libxl/../../tools/libxc -lxenctrl > /usr/bin/ld: xl_cmdimpl.o: undefined reference to symbol ''uuid_parse@@UUID_1.0'' > /usr/bin/ld: note: ''uuid_parse@@UUID_1.0'' is defined in DSO /lib64/libuuid.so.1 so try adding it to the linker command line > /lib64/libuuid.so.1: could not read symbols: Invalid operationThis is due to the use of the uuid library being inlined in the libxl headers, so the user of libxl can end up with linking requirements due to libxl header internals. I think the right fix is to move these out of line like I did with essentially the same thing in blktap2. I''ll take a look shortly. Ian.> > > > > > Perhaps the failure is only with -Wl,-as-needed ? > > > > Possibly, although I did do test builds with that enabled (or at least I > > thought I did...) > > > > Ian. > > > > > > > > _______________________________________________ > > Xen-devel mailing list > > Xen-devel@lists.xensource.com > > http://lists.xensource.com/xen-devel_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Ian Campbell
2011-Mar-23 15:12 UTC
Re: [Xen-devel] Build problem: note: ''xtl_createlogger_stdiostream'' is defined in DSO .. so try adding it to the linker command line... libxenctrl.so.4.0: could not read symbols: Invalid operation
On Tue, 2011-03-22 at 17:25 +0000, Ian Campbell wrote:> On Tue, 2011-03-22 at 17:16 +0000, Konrad Rzeszutek Wilk wrote: > > On Mon, Mar 21, 2011 at 03:53:25PM +0000, Ian Campbell wrote: > > > On Mon, 2011-03-21 at 14:53 +0000, Ian Jackson wrote: > > > > Ian Campbell writes ("Re: [Xen-devel] Build problem: note: ''xtl_createlogger_stdiostream'' is defined in DSO .. so try adding it to the linker command line... libxenctrl.so.4.0: could not read symbols: Invalid operation"): > > > > > xl: link against libxenctrl > > > > > > > > I''ve applied this, thanks. Although I don''t understand why the build > > > > failed for Konrad and not me or my test system. > > > > > > Me neither. > > > > I am not sure either. Here is another with todays pull: > > > > gcc -o xl xl.o xl_cmdimpl.o xl_cmdtable.o libxlutil.so -L/home/konrad/ssd/xtt/xen-unstable/tools/libxl/../../tools/libxl -Wl,-rpath-link=/home/konrad/ssd/xtt/xen-unstable/tools/libxl/../../tools/libxc -Wl,-rpath-link=/home/konrad/ssd/xtt/xen-unstable/tools/libxl/../../tools/xenstore -Wl,-rpath-link=/home/konrad/ssd/xtt/xen-unstable/tools/libxl/../../tools/blktap2/control -lxenlight -L/home/konrad/ssd/xtt/xen-unstable/tools/libxl/../../tools/libxc -lxenctrl > > /usr/bin/ld: xl_cmdimpl.o: undefined reference to symbol ''uuid_parse@@UUID_1.0'' > > /usr/bin/ld: note: ''uuid_parse@@UUID_1.0'' is defined in DSO /lib64/libuuid.so.1 so try adding it to the linker command line > > /lib64/libuuid.so.1: could not read symbols: Invalid operation > > This is due to the use of the uuid library being inlined in the libxl > headers, so the user of libxl can end up with linking requirements due > to libxl header internals. I think the right fix is to move these out of > line like I did with essentially the same thing in blktap2. I''ll take a > look shortly.Konrad, Jeremy, Does this help? Christoph, Does it work for BSD? Ian. # HG changeset patch # User Ian Campbell <ian.campbell@citrix.com> # Date 1300893083 0 # Node ID 83ff83c380c0bfb594e6ac0ccc860cfc60741242 # Parent 26ba6a80310af7c3b360d4b78da8f3ff7188a9e8 tools/libxl: move uuid wrapper functions out of line. This isolates users of libxenlight from the need to know about the different OS schemes for UUIDs, in particular the linkage requirements. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> diff -r 26ba6a80310a -r 83ff83c380c0 tools/libxl/Makefile --- a/tools/libxl/Makefile Mon Mar 21 14:41:46 2011 +0000 +++ b/tools/libxl/Makefile Wed Mar 23 15:11:23 2011 +0000 @@ -34,7 +34,7 @@ LIBXL_OBJS-$(CONFIG_IA64) += libxl_nocpu LIBXL_OBJS = flexarray.o libxl.o libxl_create.o libxl_dm.o libxl_pci.o \ libxl_dom.o libxl_exec.o libxl_xshelp.o libxl_device.o \ - libxl_internal.o libxl_utils.o $(LIBXL_OBJS-y) + libxl_internal.o libxl_utils.o libxl_uuid.o $(LIBXL_OBJS-y) LIBXL_OBJS += _libxl_types.o $(LIBXL_OBJS): CFLAGS += $(CFLAGS_libxenctrl) $(CFLAGS_libxenguest) $(CFLAGS_libxenstore) $(CFLAGS_libblktapctl) diff -r 26ba6a80310a -r 83ff83c380c0 tools/libxl/libxl_uuid.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tools/libxl/libxl_uuid.c Wed Mar 23 15:11:23 2011 +0000 @@ -0,0 +1,105 @@ +/* + * Copyright (C) 2008,2010 Citrix Ltd. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published + * by the Free Software Foundation; version 2.1 only. with the special + * exception on linking described in file LICENSE. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + */ + +#include <libxl_uuid.h> + +#if defined(__linux__) + +int libxl_uuid_is_nil(libxl_uuid *uuid) +{ + return uuid_is_null(uuid->uuid); +} + +void libxl_uuid_generate(libxl_uuid *uuid) +{ + uuid_generate(uuid->uuid); +} + +int libxl_uuid_from_string(libxl_uuid *uuid, const char *in) +{ + return uuid_parse(in, uuid->uuid); +} + +void libxl_uuid_copy(libxl_uuid *dst, libxl_uuid *src) +{ + uuid_copy(dst->uuid, src->uuid); +} + +void libxl_uuid_clear(libxl_uuid *uuid) +{ + uuid_clear(uuid->uuid); +} + +int libxl_uuid_compare(libxl_uuid *uuid1, libxl_uuid *uuid2) +{ + return uuid_compare(uuid1->uuid, uuid2->uuid); +} + +uint8_t *libxl_uuid_bytearray(libxl_uuid *uuid) +{ + return uuid->uuid; +} + +#elif defined(__NetBSD__) + +int libxl_uuid_is_nil(libxl_uuid *uuid) +{ + uint32_t status; + return uuid_is_nil((uuid_t *)uuid->uuid, &status); +} + +void libxl_uuid_generate(libxl_uuid *uuid) +{ + uint32_t status; + uuid_create((uuid_t *)uuid->uuid, &status); + assert(status == uuid_s_ok); +} + +#define LIBXL__UUID_PTRS(uuid) &uuid[0], &uuid[1], &uuid[2], &uuid[3], \ + &uuid[4], &uuid[5], &uuid[6], &uuid[7], \ + &uuid[8], &uuid[9], &uuid[10],&uuid[11], \ + &uuid[12],&uuid[13],&uuid[14],&uuid[15] +int libxl_uuid_from_string(libxl_uuid *uuid, const char *in) +{ + if ( sscanf(in, LIBXL_UUID_FMT, LIBXL__UUID_PTRS(uuid->uuid)) != sizeof(uuid->uuid) ) + return -1; + return 0; +} +#undef LIBXL__UUID_PTRS + +void libxl_uuid_copy(libxl_uuid *dst, libxl_uuid *src) +{ + memcpy(dst->uuid, src->uuid, sizeof(dst->uuid)); +} + +void libxl_uuid_clear(libxl_uuid *uuid) +{ + memset(uuid->uuid, 0, sizeof(uuid->uuid)); +} + +int libxl_uuid_compare(libxl_uuid *uuid1, libxl_uuid *uuid2) +{ + return memcmp(uuid1->uuid, uuid2->uuid, sizeof(uuid1->uuid)); +} + +uint8_t *libxl_uuid_bytearray(libxl_uuid *uuid) +{ + return uuid->uuid; +} + +#else + +#error "Please update libxl_uuid.c for your OS" + +#endif diff -r 26ba6a80310a -r 83ff83c380c0 tools/libxl/libxl_uuid.h --- a/tools/libxl/libxl_uuid.h Mon Mar 21 14:41:46 2011 +0000 +++ b/tools/libxl/libxl_uuid.h Wed Mar 23 15:11:23 2011 +0000 @@ -24,47 +24,13 @@ #if defined(__linux__) #include <uuid/uuid.h> +#include <stdint.h> typedef struct { uuid_t uuid; } libxl_uuid; #define LIBXL_UUID_BYTES(arg) LIBXL__UUID_BYTES(((uint8_t *)arg.uuid)) - -static inline int libxl_uuid_is_nil(libxl_uuid *uuid) -{ - return uuid_is_null(uuid->uuid); -} - -static inline void libxl_uuid_generate(libxl_uuid *uuid) -{ - uuid_generate(uuid->uuid); -} - -static inline int libxl_uuid_from_string(libxl_uuid *uuid, const char *in) -{ - return uuid_parse(in, uuid->uuid); -} - -static inline void libxl_uuid_copy(libxl_uuid *dst, libxl_uuid *src) -{ - uuid_copy(dst->uuid, src->uuid); -} - -static inline void libxl_uuid_clear(libxl_uuid *uuid) -{ - uuid_clear(uuid->uuid); -} - -static inline int libxl_uuid_compare(libxl_uuid *uuid1, libxl_uuid *uuid2) -{ - return uuid_compare(uuid1->uuid, uuid2->uuid); -} - -static inline uint8_t *libxl_uuid_bytearray(libxl_uuid *uuid) -{ - return uuid->uuid; -} #elif defined(__NetBSD__) @@ -80,55 +46,18 @@ typedef struct { uint8_t uuid[16]; } libxl_uuid; -static inline int libxl_uuid_is_nil(libxl_uuid *uuid) -{ - uint32_t status; - return uuid_is_nil((uuid_t *)uuid->uuid, &status); -} - -static inline void libxl_uuid_generate(libxl_uuid *uuid) -{ - uint32_t status; - uuid_create((uuid_t *)uuid->uuid, &status); - assert(status == uuid_s_ok); -} - -#define LIBXL__UUID_PTRS(uuid) &uuid[0], &uuid[1], &uuid[2], &uuid[3], \ - &uuid[4], &uuid[5], &uuid[6], &uuid[7], \ - &uuid[8], &uuid[9], &uuid[10],&uuid[11], \ - &uuid[12],&uuid[13],&uuid[14],&uuid[15] -static inline int libxl_uuid_from_string(libxl_uuid *uuid, const char *in) -{ - if ( sscanf(in, LIBXL_UUID_FMT, LIBXL__UUID_PTRS(uuid->uuid)) != sizeof(uuid->uuid) ) - return -1; - return 0; -} -#undef LIBXL__UUID_PTRS - -static inline void libxl_uuid_copy(libxl_uuid *dst, libxl_uuid *src) -{ - memcpy(dst->uuid, src->uuid, sizeof(dst->uuid)); -} - -static inline void libxl_uuid_clear(libxl_uuid *uuid) -{ - memset(uuid->uuid, 0, sizeof(uuid->uuid)); -} - -static inline int libxl_uuid_compare(libxl_uuid *uuid1, libxl_uuid *uuid2) -{ - return memcmp(uuid1->uuid, uuid2->uuid, sizeof(uuid1->uuid)); -} - -static inline uint8_t *libxl_uuid_bytearray(libxl_uuid *uuid) -{ - return uuid->uuid; -} - #else #error "Please update libxl_uuid.h for your OS" #endif +int libxl_uuid_is_nil(libxl_uuid *uuid); +void libxl_uuid_generate(libxl_uuid *uuid); +int libxl_uuid_from_string(libxl_uuid *uuid, const char *in); +void libxl_uuid_copy(libxl_uuid *dst, libxl_uuid *src); +void libxl_uuid_clear(libxl_uuid *uuid); +int libxl_uuid_compare(libxl_uuid *uuid1, libxl_uuid *uuid2); +uint8_t *libxl_uuid_bytearray(libxl_uuid *uuid); + #endif /* __LIBXL_UUID_H__ */ _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Konrad Rzeszutek Wilk
2011-Mar-23 15:52 UTC
Re: [Xen-devel] Build problem: note: ''xtl_createlogger_stdiostream'' is defined in DSO .. so try adding it to the linker command line... libxenctrl.so.4.0: could not read symbols: Invalid operation
On Wed, Mar 23, 2011 at 03:12:58PM +0000, Ian Campbell wrote:> On Tue, 2011-03-22 at 17:25 +0000, Ian Campbell wrote: > > On Tue, 2011-03-22 at 17:16 +0000, Konrad Rzeszutek Wilk wrote: > > > On Mon, Mar 21, 2011 at 03:53:25PM +0000, Ian Campbell wrote: > > > > On Mon, 2011-03-21 at 14:53 +0000, Ian Jackson wrote: > > > > > Ian Campbell writes ("Re: [Xen-devel] Build problem: note: ''xtl_createlogger_stdiostream'' is defined in DSO .. so try adding it to the linker command line... libxenctrl.so.4.0: could not read symbols: Invalid operation"): > > > > > > xl: link against libxenctrl > > > > > > > > > > I''ve applied this, thanks. Although I don''t understand why the build > > > > > failed for Konrad and not me or my test system. > > > > > > > > Me neither. > > > > > > I am not sure either. Here is another with todays pull: > > > > > > gcc -o xl xl.o xl_cmdimpl.o xl_cmdtable.o libxlutil.so -L/home/konrad/ssd/xtt/xen-unstable/tools/libxl/../../tools/libxl -Wl,-rpath-link=/home/konrad/ssd/xtt/xen-unstable/tools/libxl/../../tools/libxc -Wl,-rpath-link=/home/konrad/ssd/xtt/xen-unstable/tools/libxl/../../tools/xenstore -Wl,-rpath-link=/home/konrad/ssd/xtt/xen-unstable/tools/libxl/../../tools/blktap2/control -lxenlight -L/home/konrad/ssd/xtt/xen-unstable/tools/libxl/../../tools/libxc -lxenctrl > > > /usr/bin/ld: xl_cmdimpl.o: undefined reference to symbol ''uuid_parse@@UUID_1.0'' > > > /usr/bin/ld: note: ''uuid_parse@@UUID_1.0'' is defined in DSO /lib64/libuuid.so.1 so try adding it to the linker command line > > > /lib64/libuuid.so.1: could not read symbols: Invalid operation > > > > This is due to the use of the uuid library being inlined in the libxl > > headers, so the user of libxl can end up with linking requirements due > > to libxl header internals. I think the right fix is to move these out of > > line like I did with essentially the same thing in blktap2. I''ll take a > > look shortly. > > Konrad, Jeremy, > > Does this help?Yes! _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Ian Jackson
2011-Mar-23 16:58 UTC
Re: [Xen-devel] Build problem: note: ''xtl_createlogger_stdiostream'' is defined in DSO .. so try adding it to the linker command line... libxenctrl.so.4.0: could not read symbols: Invalid operation
Ian Campbell writes ("Re: [Xen-devel] Build problem: note: ''xtl_createlogger_stdiostream'' is defined in DSO .. so try adding it to the linker command line... libxenctrl.so.4.0: could not read symbols: Invalid operation"):> tools/libxl: move uuid wrapper functions out of line. > > This isolates users of libxenlight from the need to know about the > different OS schemes for UUIDs, in particular the linkage > requirements. > > Signed-off-by: Ian Campbell <ian.campbell@citrix.com>Thanks for the test, Konrad. I''ve applied the patch. Ian. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Ian Campbell
2011-Mar-23 17:12 UTC
Re: [Xen-devel] Build problem: note: ''xtl_createlogger_stdiostream'' is defined in DSO .. so try adding it to the linker command line... libxenctrl.so.4.0: could not read symbols: Invalid operation
On Wed, 2011-03-23 at 16:58 +0000, Ian Jackson wrote:> Ian Campbell writes ("Re: [Xen-devel] Build problem: note: ''xtl_createlogger_stdiostream'' is defined in DSO .. so try adding it to the linker command line... libxenctrl.so.4.0: could not read symbols: Invalid operation"): > > tools/libxl: move uuid wrapper functions out of line. > > > > This isolates users of libxenlight from the need to know about the > > different OS schemes for UUIDs, in particular the linkage > > requirements. > > > > Signed-off-by: Ian Campbell <ian.campbell@citrix.com> > > Thanks for the test, Konrad. I''ve applied the patch.I think you forgot to hg add tools/libxl/libxl_uuid.c... _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel