Skip to contentSkip to conversation

tools: fix --enable-xenapi typo error

PATCH In review Yixun Lan (dlan) 2 participants 2 messages Mar 20, 2014 – Mar 21, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tools: fix --enable-xenapi typo error

typo in tools/configure.ac cause --enable-xenapi does not works lead to variables XML2_CONFIG, CURL_CONFIG not set

---

x86_64-pc-linux-gnu-gcc -L../common/ -shared -o fsimage.so ext2fs-lib.opic -lfsimage -lext2fs
make[4]: Leaving directory '/var/tmp/portage/app-emulation/xen-tools-4.4.0/work/xen-4.4.0/tools/libfsimage/ext2fs-lib' make[3]: Leaving directory '/var/tmp/portage/app-emulation/xen-tools-4.4.0/work/xen-4.4.0/tools/libfsimage' make[2]: Leaving directory '/var/tmp/portage/app-emulation/xen-tools-4.4.0/work/xen-4.4.0/tools/libfsimage' make[1]: Leaving directory '/var/tmp/portage/app-emulation/xen-tools-4.4.0/work/xen-4.4.0/tools' make[1]: Entering directory '/var/tmp/portage/app-emulation/xen-tools-4.4.0/work/xen-4.4.0/tools' make -C libxen all
make[2]: Entering directory '/var/tmp/portage/app-emulation/xen-tools-4.4.0/work/xen-4.4.0/tools/libxen' make[2]: --cflags: Command not found
make[2]: --cflags: Command not found
x86_64-pc-linux-gnu-gcc -O1 -fno-omit-frame-pointer -m64 -g -fno-strict-aliasing -std=gnu99 -Wall -Wstrict-prototypes
-Wdeclaration-after-statement -Wno-unused-but-set-variable -Wno-unused-local-typedefs -D__XEN_TOOLS__ -MMD -MF
.src@xen_string_string_map.o.d -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -fno-optimize-sibling-calls -Iinclude -fPIC -c -o
src/xen_string_string_map.o src/xen_string_string_map.c
make[2]: --cflags: Command not found
make[2]: --cflags: Command not found
x86_64-pc-linux-gnu-gcc -O1 -fno-omit-frame-pointer -m64 -g -fno-strict-aliasing -std=gnu99 -Wall -Wstrict-prototypes
-Wdeclaration-after-statement -Wno-unused-but-set-variable -Wno-unused-local-typedefs -D__XEN_TOOLS__ -MMD -MF
.src@xen_vbd_mode.o.d -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -fno-optimize-sibling-calls -Iinclude -fPIC -c -o
src/xen_vbd_mode.o src/xen_vbd_mode.c
make[2]: --cflags: Command not found
make[2]: --cflags: Command not found
x86_64-pc-linux-gnu-gcc -O1 -fno-omit-frame-pointer -m64 -g -fno-strict-aliasing -std=gnu99 -Wall -Wstrict-prototypes
-Wdeclaration-after-statement -Wno-unused-but-set-variable -Wno-unused-local-typedefs -D__XEN_TOOLS__ -MMD -MF
.src@xen_vbd_type.o.d -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -fno-optimize-sibling-calls -Iinclude -fPIC -c -o
src/xen_vbd_type.o src/xen_vbd_type.c
make[2]: --cflags: Command not found
make[2]: --cflags: Command not found
x86_64-pc-linux-gnu-gcc -O1 -fno-omit-frame-pointer -m64 -g -fno-strict-aliasing -std=gnu99 -Wall -Wstrict-prototypes
-Wdeclaration-after-statement -Wno-unused-but-set-variable -Wno-unused-local-typedefs -D__XEN_TOOLS__ -MMD -MF .src@xen_vdi.o.d
-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -fno-optimize-sibling-calls -Iinclude -fPIC -c -o src/xen_vdi.o src/xen_vdi.c
make[2]: --cflags: Command not found
make[2]: --cflags: Command not found
x86_64-pc-linux-gnu-gcc -O1 -fno-omit-frame-pointer -m64 -g -fno-strict-aliasing -std=gnu99 -Wall -Wstrict-prototypes
-Wdeclaration-after-statement -Wno-unused-but-set-variable -Wno-unused-local-typedefs -D__XEN_TOOLS__ -MMD -MF .src@xen_pif.o.d
-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -fno-optimize-sibling-calls -Iinclude -fPIC -c -o src/xen_pif.o src/xen_pif.c
make[2]: --cflags: Command not found
make[2]: --cflags: Command not found
x86_64-pc-linux-gnu-gcc -O1 -fno-omit-frame-pointer -m64 -g -fno-strict-aliasing -std=gnu99 -Wall -Wstrict-prototypes
-Wdeclaration-after-statement -Wno-unused-but-set-variable -Wno-unused-local-typedefs -D__XEN_TOOLS__ -MMD -MF
.src@xen_vdi_type.o.d -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -fno-optimize-sibling-calls -Iinclude -fPIC -c -o
src/xen_vdi_type.o src/xen_vdi_type.c
make[2]: --cflags: Command not found
make[2]: --cflags: Command not found
x86_64-pc-linux-gnu-gcc -O1 -fno-omit-frame-pointer -m64 -g -fno-strict-aliasing -std=gnu99 -Wall -Wstrict-prototypes
-Wdeclaration-after-statement -Wno-unused-but-set-variable -Wno-unused-local-typedefs -D__XEN_TOOLS__ -MMD -MF
.src@xen_on_normal_exit.o.d -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -fno-optimize-sibling-calls -Iinclude -fPIC -c -o
src/xen_on_normal_exit.o src/xen_on_normal_exit.c
make[2]: --cflags: Command not found
make[2]: --cflags: Command not found
x86_64-pc-linux-gnu-gcc -O1 -fno-omit-frame-pointer -m64 -g -fno-strict-aliasing -std=gnu99 -Wall -Wstrict-prototypes
-Wdeclaration-after-statement -Wno-unused-but-set-variable -Wno-unused-local-typedefs -D__XEN_TOOLS__ -MMD -MF .src@xen_vbd.o.d
-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -fno-optimize-sibling-calls -Iinclude -fPIC -c -o src/xen_vbd.o src/xen_vbd.c
make[2]: --cflags: Command not found
make[2]: --cflags: Command not found
x86_64-pc-linux-gnu-gcc -O1 -fno-omit-frame-pointer -m64 -g -fno-strict-aliasing -std=gnu99 -Wall -Wstrict-prototypes
-Wdeclaration-after-statement -Wno-unused-but-set-variable -Wno-unused-local-typedefs -D__XEN_TOOLS__ -MMD -MF .src@xen_vif.o.d
-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -fno-optimize-sibling-calls -Iinclude -fPIC -c -o src/xen_vif.o src/xen_vif.c
make[2]: --cflags: Command not found
make[2]: --cflags: Command not found
x86_64-pc-linux-gnu-gcc -O1 -fno-omit-frame-pointer -m64 -g -fno-strict-aliasing -std=gnu99 -Wall -Wstrict-prototypes
-Wdeclaration-after-statement -Wno-unused-but-set-variable -Wno-unused-local-typedefs -D__XEN_TOOLS__ -MMD -MF .src@xen_user.o.d
-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -fno-optimize-sibling-calls -Iinclude -fPIC -c -o src/xen_user.o src/xen_user.c
make[2]: --cflags: Command not found
make[2]: --cflags: Command not found
x86_64-pc-linux-gnu-gcc -O1 -fno-omit-frame-pointer -m64 -g -fno-strict-aliasing -std=gnu99 -Wall -Wstrict-prototypes
-Wdeclaration-after-statement -Wno-unused-but-set-variable -Wno-unused-local-typedefs -D__XEN_TOOLS__ -MMD -MF
.src@xen_int_int_map.o.d -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -fno-optimize-sibling-calls -Iinclude -fPIC -c -o
src/xen_int_int_map.o src/xen_int_int_map.c
make[2]: --cflags: Command not found
make[2]: --cflags: Command not found
x86_64-pc-linux-gnu-gcc -O1 -fno-omit-frame-pointer -m64 -g -fno-strict-aliasing -std=gnu99 -Wall -Wstrict-prototypes
-Wdeclaration-after-statement -Wno-unused-but-set-variable -Wno-unused-local-typedefs -D__XEN_TOOLS__ -MMD -MF .src@xen_common.o.d
-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -fno-optimize-sibling-calls -Iinclude -fPIC -c -o src/xen_common.o src/xen_common.c
make[2]: --cflags: Command not found
make[2]: --cflags: Command not found
x86_64-pc-linux-gnu-gcc -O1 -fno-omit-frame-pointer -m64 -g -fno-strict-aliasing -std=gnu99 -Wall -Wstrict-prototypes
-Wdeclaration-after-statement -Wno-unused-but-set-variable -Wno-unused-local-typedefs -D__XEN_TOOLS__ -MMD -MF
.src@xen_string_set.o.d -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -fno-optimize-sibling-calls -Iinclude -fPIC -c -o
src/xen_string_set.o src/xen_string_set.c
make[2]: --cflags: Command not found
make[2]: --cflags: Command not found
src/xen_common.c:28:27: fatal error: libxml/parser.h: No such file or directory

 #include <libxml/parser.h>
                           ^
compilation terminated.
---
 tools/configure       | 2 +-
 tools/configure.ac    | 2 +-
 tools/libxen/Makefile | 7 +++++--
 3 files changed, 7 insertions(+), 4 deletions(-)
tools/configure +1 -1
index e974c5d..5c2fa14 100755
@@ -4702,7 +4702,7 @@ if test x"${PERL}" = x"no"
 then
     as_fn_error $? "Unable to find perl, please install perl" "$LINENO" 5
 fi
-if test "x$xapi" = "xy"; then :
+if test "x$xenapi" = "xy"; then :
 
     # Extract the first word of "curl-config", so it can be a program name with args.
 set dummy curl-config; ac_word=$2
tools/configure.ac +1 -1
index 884d63d..a62faf8 100644
@@ -151,7 +151,7 @@ AC_PROG_INSTALL
 AC_PATH_PROG([BISON], [bison])
 AC_PATH_PROG([FLEX], [flex])
 AX_PATH_PROG_OR_FAIL([PERL], [perl])
-AS_IF([test "x$xapi" = "xy"], [
+AS_IF([test "x$xenapi" = "xy"], [
     AX_PATH_PROG_OR_FAIL([CURL], [curl-config])
     AX_PATH_PROG_OR_FAIL([XML], [xml2-config])
 ])
tools/libxen/Makefile +5 -2
index b66f0bc..262412d 100644
@@ -22,12 +22,15 @@ MAJOR = 1.0
 MINOR = 0
 
 CFLAGS += -Iinclude                     \
-          $(shell $(XML2_CONFIG) --cflags) \
-          $(shell $(CURL_CONFIG) --cflags) \
           -fPIC
 
+ifeq ($(LIBXENAPI_BINDINGS),y)
+CFLAGS += $(shell $(XML2_CONFIG) --cflags) \
+          $(shell $(CURL_CONFIG) --cflags)
+
 LDFLAGS += $(shell $(XML2_CONFIG) --libs) \
            $(shell $(CURL_CONFIG) --libs)
+endif
 
 LIBXENAPI_HDRS = $(wildcard include/xen/api/*.h) include/xen/api/xen_all.h
 LIBXENAPI_OBJS = $(patsubst %.c, %.o, $(wildcard src/*.c))
Signature · 1 line
1.8.5.2
Acked-by on v1 1/1
#1 lore raw
Quoted 4 lines · Yixun Lan (dlan)

typo in tools/configure.ac cause --enable-xenapi does not works lead to variables XML2_CONFIG, CURL_CONFIG not set

and applied, thanks.

However I would strongly recommend that you do not build or package libxen, it contains an obsolete version of the XenAPI which cannot communicate with contemporary XenAPI implementations (e.g. xapi). I think we should probably remove it for Xen 4.5, along with xend.

Ian.