Skip to contentSkip to conversation

fix tools compile issue on sles 10

PATCH In review Ryan Grimm 2 participants 4 messages Apr 20, 2006 – Apr 23, 2006

lore
Share & tools
lore

Ryan Grimm

author
#0 lore raw

PATCH 1/1 fix tools compile issue on sles 10

With sles 10, 'make tools' produces the following:

CFLAGS="-O2 -fomit-frame-pointer -DNDEBUG -m32 -march=i686 -Wall -Wstrict-prototypes -Wdeclaration-after-statement -D__XEN_INTERFACE_VERSION__=0x00030101" python setup.py install --home="/root/xen/xen-unstable.hg/dist/install/usr" --force running install
error: must supply either home or prefix/exec-prefix -- not both make[2]: *** [install] Error 1
make[2]: Leaving directory `/root/xen/xen-unstable.hg/tools/python' make[1]: *** [install] Error 2
make[1]: Leaving directory `/root/xen/xen-unstable.hg/tools'
make: *** [install-tools] Error 2

there have been a couple other posts about this:

http://lists.xensource.com/archives/html/xen-devel/2006-03/msg00565.html
http://lists.xensource.com/archives/html/xen-devel/2006-04/msg00090.html

prefix is being passed along for some reason. this patch is a simple fix that will make sure prefix is not defined.

tools/pygrub/Makefile +1 -1
diff -r 72f9c751d3ea -r 683811163238 tools/pygrub/Makefile
@@ -11,7 +11,7 @@ build:
 .PHONY: install
 ifndef XEN_PYTHON_NATIVE_INSTALL
 install: all
-	CFLAGS="$(CFLAGS)" python setup.py install --home="$(DESTDIR)/usr"
+	CFLAGS="$(CFLAGS)" python setup.py install --home="$(DESTDIR)/usr" --prefix=""
 else
 install: all
 	CFLAGS="$(CFLAGS)" python setup.py install --root="$(DESTDIR)"
tools/python/Makefile +1 -1
diff -r 72f9c751d3ea -r 683811163238 tools/python/Makefile
@@ -11,7 +11,7 @@ build:
 .PHONY: install
 ifndef XEN_PYTHON_NATIVE_INSTALL
 install: all
-	CFLAGS="$(CFLAGS)" python setup.py install --home="$(DESTDIR)/usr" --force
+	CFLAGS="$(CFLAGS)" python setup.py install --home="$(DESTDIR)/usr" --prefix="" --force
 else
 install: all
 	CFLAGS="$(CFLAGS)" python setup.py install --root="$(DESTDIR)" --force
Signature · 3 lines
Thanks,
Ryan Grimm
IBM Linux Technology Center
#1 lore raw
Quoted 16 lines · Ryan Grimm

With sles 10, 'make tools' produces the following:

CFLAGS="-O2 -fomit-frame-pointer -DNDEBUG -m32 -march=i686 -Wall

(quoted diff) +0 -3
-Wstrict-prototypes -Wdeclaration-after-statement
-D__XEN_INTERFACE_VERSION__=0x00030101" python setup.py install
--home="/root/xen/xen-unstable.hg/dist/install/usr" --force

running install
error: must supply either home or prefix/exec-prefix -- not both make[2]: *** [install] Error 1
make[2]: Leaving directory `/root/xen/xen-unstable.hg/tools/python' make[1]: *** [install] Error 2
make[1]: Leaving directory `/root/xen/xen-unstable.hg/tools'
make: *** [install-tools] Error 2

there have been a couple other posts about this:

Quoted 7 lines

http://lists.xensource.com/archives/html/xen-devel/2006-03/msg00565.html
http://lists.xensource.com/archives/html/xen-devel/2006-04/msg00090.html

prefix is being passed along for some reason. this patch is a simple fix that will make sure prefix is not defined.

I'd rather we understood _where_ this mysterious new parameter is coming from, than just hiding it like this. Anyone got any ideas?

Ewan.

author
#2 lore raw
Quoted 24 lines · Ewan Mellor
Quoted 22 lines · Ryan Grimm

With sles 10, 'make tools' produces the following:

CFLAGS="-O2 -fomit-frame-pointer -DNDEBUG -m32 -march=i686 -Wall

(quoted diff) +0 -3
-Wstrict-prototypes -Wdeclaration-after-statement
-D__XEN_INTERFACE_VERSION__=0x00030101" python setup.py install
--home="/root/xen/xen-unstable.hg/dist/install/usr" --force

running install
error: must supply either home or prefix/exec-prefix -- not both make[2]: *** [install] Error 1
make[2]: Leaving directory `/root/xen/xen-unstable.hg/tools/python' make[1]: *** [install] Error 2
make[1]: Leaving directory `/root/xen/xen-unstable.hg/tools'
make: *** [install-tools] Error 2

there have been a couple other posts about this:

http://lists.xensource.com/archives/html/xen-devel/2006-03/msg00565.html
http://lists.xensource.com/archives/html/xen-devel/2006-04/msg00090.html

prefix is being passed along for some reason. this patch is a simple fix that will make sure prefix is not defined.

Quoted 6 lines
Quoted 1 line

I'd rather we understood _where_ this mysterious new parameter is coming from, than just hiding it like this. Anyone got any ideas?

Ewan.

sles 10 includes a distutils.cfg in /usr/lib/python/distutils/ that defines the following:

[install]
prefix=/usr/local

this can be overridden by including an empty --prefix in the Makefile or including a local setup.cfg in the tools/python directory that defines an empty prefix. since --home is already defined in the makefile, i think it makes sense to override --prefix in the makefile.

Signature · 3 lines
Thanks,
Ryan Grimm
IBM Linux Technology Center
#3 lore raw
Quoted 35 lines · Ryan Grimm
Quoted 24 lines · Ewan Mellor
Quoted 22 lines · Ryan Grimm

With sles 10, 'make tools' produces the following:

CFLAGS="-O2 -fomit-frame-pointer -DNDEBUG -m32 -march=i686 -Wall

(quoted diff) +0 -3
-Wstrict-prototypes -Wdeclaration-after-statement
-D__XEN_INTERFACE_VERSION__=0x00030101" python setup.py install
--home="/root/xen/xen-unstable.hg/dist/install/usr" --force

running install
error: must supply either home or prefix/exec-prefix -- not both make[2]: *** [install] Error 1
make[2]: Leaving directory `/root/xen/xen-unstable.hg/tools/python' make[1]: *** [install] Error 2
make[1]: Leaving directory `/root/xen/xen-unstable.hg/tools'
make: *** [install-tools] Error 2

there have been a couple other posts about this:

http://lists.xensource.com/archives/html/xen-devel/2006-03/msg00565.html
http://lists.xensource.com/archives/html/xen-devel/2006-04/msg00090.html

prefix is being passed along for some reason. this patch is a simple fix that will make sure prefix is not defined.

Quoted 6 lines
Quoted 1 line

I'd rather we understood _where_ this mysterious new parameter is coming from, than just hiding it like this. Anyone got any ideas?

Ewan.

sles 10 includes a distutils.cfg in /usr/lib/python/distutils/ that defines the following:

Quoted 7 lines

[install]
prefix=/usr/local

this can be overridden by including an empty --prefix in the Makefile or including a local setup.cfg in the tools/python directory that defines an empty prefix. since --home is already defined in the makefile, i think it makes sense to override --prefix in the makefile.

Thanks for that Ryan -- that all makes sense, and your patch has gone in.

Ewan.