Skip to contentSkip to conversation

python-native: configure unicode to ucs4

PATCH In review Eric Bénard 2 participants 3 messages Sep 14, 2010 – Sep 17, 2010

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 python-native: configure unicode to ucs4

* while trying to run gdb from an SDK created by OE, I got the following
errors: /usr/local/angstrom/arm/bin/arm-angstrom-linux-gnueabi-gdb: undefined symbol:
PyUnicodeUCS2_FromEncodedObject

* the reason is that the workstation (ubuntu 10.04 or 9.01)'s Python is compiled using ucs4 and the python-native used to create arm-angstrom-linux-gnueabi-gdb is using ucs2, the problem is detailed here :
http://docs.python.org/faq/extending#when-importing-module-x-why-do-i-get-undefined-symbol-pyunicodeucs2

* configuring python-native with ucs=4 solves this problem.

---
 recipes/python/python-native_2.6.5.bb |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
recipes/python/python-native_2.6.5.bb +4 -0
index 66573e9..999335c 100644
@@ -20,6 +20,10 @@ S = "${WORKDIR}/Python-${PV}"
 
 inherit native
 
+EXTRA_OECONF_append = '\
+  --enable-unicode=ucs4 \
+'
+
 EXTRA_OEMAKE = '\
   BUILD_SYS="" \
   HOST_SYS="" \
Signature · 1 line
1.6.3.3
#1 lore raw
Quoted 4 lines · Eric Bénard

* while trying to run gdb from an SDK created by OE, I got the following
errors: /usr/local/angstrom/arm/bin/arm-angstrom-linux-gnueabi-gdb: undefined symbol:
PyUnicodeUCS2_FromEncodedObject

Quoted 8 lines

* the reason is that the workstation (ubuntu 10.04 or 9.01)'s Python is compiled using ucs4 and the python-native used to create arm-angstrom-linux-gnueabi-gdb is using ucs2, the problem is detailed here :
http://docs.python.org/faq/extending#when-importing-module-x-why-do-i-get-undefined-symbol-pyunicodeucs2

* configuring python-native with ucs=4 solves this problem.

Can you test this out on some form of Red Hat? Thanks!

Quoted 19 lines
---
 recipes/python/python-native_2.6.5.bb |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
recipes/python/python-native_2.6.5.bb +4 -0
index 66573e9..999335c 100644
@@ -20,6 +20,10 @@ S = "${WORKDIR}/Python-${PV}"
 
 inherit native
 
+EXTRA_OECONF_append = '\
+  --enable-unicode=ucs4 \
+'
+
 EXTRA_OEMAKE = '\
   BUILD_SYS="" \
   HOST_SYS="" \
Signature · 2 lines
Tom Rini
Mentor Graphics Corporation
#2 lore raw

Hi,

Quoted 14 lines · Tom Rini
Quoted 13 lines · Eric Bénard

* while trying to run gdb from an SDK created by OE, I got the following
errors: /usr/local/angstrom/arm/bin/arm-angstrom-linux-gnueabi-gdb:
undefined symbol:
PyUnicodeUCS2_FromEncodedObject

* the reason is that the workstation (ubuntu 10.04 or 9.01)'s Python is compiled using ucs4
and the python-native used to create arm-angstrom-linux-gnueabi-gdb is using ucs2, the
problem is detailed here :
http://docs.python.org/faq/extending#when-importing-module-x-why-do-i-get-undefined-symbol-pyunicodeucs2

Quoted 6 lines
Quoted 3 lines

* configuring python-native with ucs=4 solves this problem.

Can you test this out on some form of Red Hat? Thanks!

generated SDK tested on Fedora Core 10 : it works.

As discussed on IRC, I RedHat is compiling it's python wuth ucs=4 at least since RedHat 7 from what I saw in the SRPMS.

Eric