[PySide] --enable-unicode=ucs4 on Mac fails to import shiboken
blair at orcaware.com
Fri Mar 16 18:19:26 CET 2012
On 03/16/2012 02:05 AM, Sebastian Wiesner wrote:
> Am 15. März 2012 23:19 schrieb Blair Zajac<blair at orcaware.com>:
>> For consistency with our Linux distro's, I've built Python 2.7 in
>> MacPorts using the --enable-unicode=ucs4 flag, but with this flag, the
>> import fails with:
>> >>> from PySide import QtGui
>> Traceback (most recent call last):
>> File "<stdin>", line 1, in<module>
>> 2): Symbol not found: _PyUnicodeUCS2
>> Referenced from: /opt/local/lib/libshiboken-python126.96.36.199.dylib
>> Expected in: flat namespace
>> in /opt/local/lib/libshiboken-python188.8.131.52.dylib
>> Any idea why this would be the case? There's no code in PySide that
>> explicitly lists PyUnicodeUCS2.
> UCS2 vs. UCS4 changes the ABI of the CPython library, hence extension
> modules built against an UCS2 build of CPython will not work in an
> UCS4 build of CPython and vice versa.
> Re-build shiboken against the UCS 4 build and everything should work
> as expected.
Right, I'm aware that you need to recompile everything. This failure is
after a complete recompile. Here are the commands I ran:
$ sudo port uninstall -v --follow-dependents python27
$ sudo port install -v py27-pyside
And then I get the link error.
More information about the PySide