Skip to contentSkip to conversation

qemu-native: Point python to python2 on build host

PATCH In review Khem Raj 3 participants 4 messages Feb 16, 2017 – Feb 17, 2017

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH v2 1/1 qemu-native: Point python to python2 on build host

On buildhosts where default python has switched to using python3 qemu-native fails configure like this

| ERROR: Cannot use 'python', Python 2.6 or later is required.
|        Note that Python 3 or later is not yet supported.
|        Use --python=/path/to/python to specify a supported Python.
|

we still expect build host to have python2 pre-installed and is always available.

---
 meta/recipes-devtools/qemu/qemu.inc | 1 +
 1 file changed, 1 insertion(+)
meta/recipes-devtools/qemu/qemu.inc +1 -0
index ef5d75c450..cdbb7f1671 100644
@@ -29,6 +29,7 @@ SRC_URI_append_class-native = "\
 EXTRA_OECONF += "--target-list=${@get_qemu_target_list(d)} --disable-werror  --disable-bluez --disable-libiscsi --with-system-pixman --extra-cflags='${CFLAGS}'"
 
 EXTRA_OECONF_class-nativesdk = "--target-list=${@get_qemu_target_list(d)} --disable-werror"
+EXTRA_OECONF_append_class-native = " --python=${USRBINPATH}/python2"
 
 EXTRA_OEMAKE_append_class-native = " LD='${LD}' AR='${AR}' OBJCOPY='${OBJCOPY}' LDFLAGS='${LDFLAGS}'"
 
Signature · 1 line
2.11.1
#1 lore raw
Quoted 3 lines · Khem Raj

On buildhosts where default python has switched to using python3 qemu-native fails configure like this

What distro is this that ships python as python3?

Ross

#2 lore raw
Quoted 8 lines · Ross
Quoted 3 lines · Khem Raj

On buildhosts where default python has switched to using python3 qemu-native fails configure like this

What distro is this that ships python as python3?

Arch for instance:

maciek@corsair:~ ls -l /usr/bin/python
lrwxrwxrwx 1 root root 7 01-16 12:14 /usr/bin/python -> python3

Signature · 2 lines
Maciej Borzecki
RnDity
#3 lore raw
Quoted 3 lines · Maciej Borzęcki

maciek@corsair:~ ls -l /usr/bin/python
lrwxrwxrwx 1 root root 7 01-16 12:14 /usr/bin/python -> python3

Pretty sure that it's only Arch here as everyone else listens to Python instead of thinking they know best...

(reads PEP-394 and sighs)

Ross