Skip to contentSkip to conversation

tools: build error

DISCUSSION Christoph Egger 2 participants 4 messages Sep 22, 2010 – Sep 23, 2010

lore
Share & tools
lore
#0 lore raw

Hi!

Changeset 22167:330c4d9010da breaks the build.

It adds blktapctl to link against in setup.py which isn't build on NetBSD.

Christoph

Signature · 6 lines
---to satisfy European Law for business letters:
Advanced Micro Devices GmbH
Einsteinring 24, 85609 Dornach b. Muenchen
Geschaeftsfuehrer: Alberto Bozzo, Andrew Bowd
Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen
Registergericht Muenchen, HRB Nr. 43632
#1 lore raw
Quoted 6 lines · Christoph Egger

Hi!

Changeset 22167:330c4d9010da breaks the build.

It adds blktapctl to link against in setup.py which isn't build on NetBSD.

Oops, Following ought to fix it:

----8<------------------------------------------------------ Link to libblktapctl in python setup only for platforms which build it

tools/python/setup.py +5 -3
diff -r 36420e35c65a tools/python/setup.py
@@ -14,8 +14,7 @@ include_dirs = [ XEN_ROOT + "/tools/libx
 
 library_dirs = [ XEN_ROOT + "/tools/libxc",
                  XEN_ROOT + "/tools/xenstore",
-                 XEN_ROOT + "/tools/libxl",
-                 XEN_ROOT + "/tools/blktap2/control",
+                 XEN_ROOT + "/tools/libxl"
                  ]
 
 libraries = [ "xenctrl", "xenguest", "xenstore" ]
@@ -23,8 +22,11 @@ libraries = [ "xenctrl", "xenguest", "xe
 plat = os.uname()[0]
 if plat == 'Linux':
     uuid_libs = ["uuid"]
+    blktap_ctl_libs = ["blktapctl"]
+    library_dirs.append(XEN_ROOT + "/tools/blktap2/control")
 else:
     uuid_libs = []
+    blktap_ctl_libs = []
 
 xc = Extension("xc",
                extra_compile_args = extra_compile_args,
@@ -96,7 +98,7 @@ xl = Extension("xl",
                extra_compile_args = extra_compile_args,
                include_dirs       = include_dirs + [ "xen/lowlevel/xl" ],
                library_dirs       = library_dirs,
-               libraries          = libraries + ["xenlight", "blktapctl" ] + uuid_libs,
+               libraries          = libraries + ["xenlight" ] + blktap_ctl_libs + uuid_libs,
                sources            = [ "xen/lowlevel/xl/xl.c", "xen/lowlevel/xl/_pyxl_types.c" ])
 
 modules = [ xc, xs, ptsname, acm, flask, xl ]
#2 lore raw
Quoted 9 lines · On Wednesday 22 September 2010 19:27:22 Gianni Tedesco wrote:
Quoted 6 lines · Christoph Egger

Hi!

Changeset 22167:330c4d9010da breaks the build.

It adds blktapctl to link against in setup.py which isn't build on NetBSD.

Oops, Following ought to fix it:

Confirmed, this fixes the build error. I am just wondering why do you want to link against blktapctl at all when it isn't used ?

Doesn't it build/work on Linux when you don't link against blktapctl ?

Christoph

Quoted 41 lines

----8<------------------------------------------------------ Link to libblktapctl in python setup only for platforms which build it

diff -r 36420e35c65a tools/python/setup.py

tools/python/setup.py +6 -3
@@ -14,8 +14,7 @@ include_dirs = [ XEN_ROOT + "/tools/libx
 
 library_dirs = [ XEN_ROOT + "/tools/libxc",
                  XEN_ROOT + "/tools/xenstore",
-                 XEN_ROOT + "/tools/libxl",
-                 XEN_ROOT + "/tools/blktap2/control",
+                 XEN_ROOT + "/tools/libxl"
                  ]
 
 libraries = [ "xenctrl", "xenguest", "xenstore" ]
@@ -23,8 +22,11 @@ libraries = [ "xenctrl", "xenguest", "xe
 plat = os.uname()[0]
 if plat == 'Linux':
     uuid_libs = ["uuid"]
+    blktap_ctl_libs = ["blktapctl"]
+    library_dirs.append(XEN_ROOT + "/tools/blktap2/control")
 else:
     uuid_libs = []
+    blktap_ctl_libs = []
 
 xc = Extension("xc",
                extra_compile_args = extra_compile_args,
@@ -96,7 +98,7 @@ xl = Extension("xl",
                extra_compile_args = extra_compile_args,
                include_dirs       = include_dirs + [ "xen/lowlevel/xl" ],
                library_dirs       = library_dirs,
-               libraries          = libraries + ["xenlight", "blktapctl" ]
+ uuid_libs, +               libraries          = libraries + ["xenlight" ]
+ blktap_ctl_libs + uuid_libs, sources            = [
 "xen/lowlevel/xl/xl.c", "xen/lowlevel/xl/_pyxl_types.c" ])
 
 modules = [ xc, xs, ptsname, acm, flask, xl ]
Signature · 6 lines
---to satisfy European Law for business letters:
Advanced Micro Devices GmbH
Einsteinring 24, 85609 Dornach b. Muenchen
Geschaeftsfuehrer: Alberto Bozzo, Andrew Bowd
Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen
Registergericht Muenchen, HRB Nr. 43632
#3 lore raw
Quoted 9 lines · Christoph Egger
Quoted 8 lines · On Wednesday 22 September 2010 19:27:22 Gianni Tedesco wrote:
Quoted 6 lines · Christoph Egger

Hi!

Changeset 22167:330c4d9010da breaks the build.

It adds blktapctl to link against in setup.py which isn't build on NetBSD.

Quoted 6 lines
Quoted 1 line

Oops, Following ought to fix it:

Confirmed, this fixes the build error. I am just wondering why do you want to link against blktapctl at all when it isn't used ?

Doesn't it build/work on Linux when you don't link against blktapctl ?

Actually you're probably right since libxenlight.so is linking against blktapctl for it's own uses however the extra link in xl.so is harmless (modulo the portability error I just fixed).