Skip to contentSkip to conversation

tools: fix python install with "xentoollog"

PATCH In review Konrad Rzeszutek Wilk 2 participants 2 messages Jan 13, 2016 – Jan 15, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tools: fix python install with "xentoollog"

commit 5d3dc8671521ea4a4f753e77d3e7fb3a3a6f5f80 "tools: Refactor "xentoollog" into its own library" with older python versions (2.6.4) will fail to the build if attempted to be done twice (which happens due to pygrub dependencies).

make -C python DESTDIR=/tmp
make -C python DESTDIR=/tmp

The second one will fail with:
error: -Wl, -rpath-link=../../tools/libs/toollog: No such file or directory

even thought the directory is there (with the libs).

Andrew pointed out that the linker additions should be in the "extra_link_args" rather than "depends".

And true enough - with that modification it builds.

---
 tools/python/setup.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
tools/python/setup.py +2 -1
index 9771cc4..604b314 100644
@@ -17,7 +17,8 @@ xc = Extension("xc",
                include_dirs       = [ PATH_XEN, PATH_LIBXENTOOLLOG + "/include", PATH_LIBXC + "/include", "xen/lowlevel/xc" ],
                library_dirs       = [ PATH_LIBXC ],
                libraries          = [ "xenctrl", "xenguest" ],
-               depends            = [ PATH_LIBXC + "/libxenctrl.so", PATH_LIBXC + "/libxenguest.so",  "-Wl,-rpath-link="+PATH_LIBXENTOOLLOG ],
+               depends            = [ PATH_LIBXC + "/libxenctrl.so", PATH_LIBXC + "/libxenguest.so" ],
+               extra_link_args    = [ "-Wl,-rpath-link="+PATH_LIBXENTOOLLOG ],
                sources            = [ "xen/lowlevel/xc/xc.c" ])
 
 xs = Extension("xs",
Signature · 1 line
2.5.0
#1 lore raw
Quoted 6 lines · Konrad Rzeszutek Wilk

commit 5d3dc8671521ea4a4f753e77d3e7fb3a3a6f5f80 "tools: Refactor "xentoollog" into its own library" with older python versions (2.6.4) will fail to the build if attempted to be done twice (which happens due to pygrub dependencies).

Quoted 8 lines

make -C python DESTDIR=/tmp
make -C python DESTDIR=/tmp

The second one will fail with:
error: -Wl, -rpath-link=../../tools/libs/toollog: No such file or directory

even thought the directory is there (with the libs).

"though"

Quoted 4 lines

Andrew pointed out that the linker additions should be in the "extra_link_args" rather than "depends".

Quoted 8 lines

And true enough - with that modification it builds.

Acked + applied, with typo fixed.