PySide 安装问题

Problems with PySide installation

我的新 Xubuntu 安装上有 python2.7.9,尽管它是 14.04。 PySide 安装卡在 Shiboken

Linking CXX shared library libshiboken-python2.7.so
/usr/bin/ld: /usr/local/lib/libpython2.7.a(abstract.o): relocation R_X86_64_32S against `_Py_NotImplementedStruct' can not be used when making a shared object; recompile with -fPIC
/usr/local/lib/libpython2.7.a: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
make[2]: *** [libshiboken/libshiboken-python2.7.so.1.2.2] Error 1
make[1]: *** [libshiboken/CMakeFiles/libshiboken.dir/all] Error 2
make: *** [all] Error 2
error: Error compiling shiboken

经过一些 "googling" 之后,我得出结论,可以通过在 ./configure 选项中添加 --enable-shared 来解决问题。

以下文档尝试以多种方式安装 Shiboken,但失败后,我尝试在源文件中查找配置,但我找不到。

请帮忙。谢谢。

输出显示它正在尝试 link 针对静态 python 库,而不是共享库 - 即 libpython2。7.a,而不是 libpython2.7.so.

因此,需要用--enable-shared重新编译的是python,而不是shiboken