[MacPorts] #33574: from PySide import QtCore fails
MacPorts
noreply at macports.org
Fri Mar 16 23:37:04 PDT 2012
#33574: from PySide import QtCore fails
--------------------------------+-------------------------------------------
Reporter: blair@… | Owner: mmoll@…
Type: defect | Status: new
Priority: Normal | Milestone:
Component: ports | Version: 2.0.3
Keywords: | Port: py-pyside
--------------------------------+-------------------------------------------
Comment(by blair@…):
Some progress in figuring this out. Looking at the output from 'port -d
-v install py27-shiboken' it appears that the correct flags are not making
it to the compiler, such as
-DPYTHON_EXECUTABLE=${prefix}/bin/python${python.branch}. In fact, this
is a cmake build so why are 'use_configure' and 'configure.args-append'
used?
Here's a snippet from the build where it's compiling sbkstring.cpp which
calls the offending PyUnicode_Compare() macro:
{{{
cd
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports
.org_release_ports_python_py-
shiboken/py27-shiboken/work/shiboken-1.1.0/libshiboken && /usr/bin/clang++
-DLIBSHIBOKEN_EXPORTS -DNDEBUG -pipe -O2 -arch x86_64 -Wall
-fvisibility=hidden -Wno-strict-aliasing -O3 -DNDEBUG -arch x86_64 -fPIC
-I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports
.org_release_ports_python_py-
shiboken/py27-shiboken/work/shiboken-1.1.0/libshiboken
-I/System/Library/Frameworks/Python.framework/Headers
-I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports
.org_release_ports_python_py-
shiboken/py27-shiboken/work/shiboken-1.1.0/ext/sparsehash -o
CMakeFiles/libshiboken.dir/sbkstring.cpp.o -c
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports
.org_release_ports_python_py-
shiboken/py27-shiboken/work/shiboken-1.1.0/libshiboken/sbkstring.cpp
}}}
Since the system's Python it built with ucs2 and my Python with ucs4, it
explains the link failure.
Doing a 'port -v build py27-shiboken' and then compiling sbkstring.cpp by
hand through cpp shows it's picking up the incorrect header files. I can
confirm this by running the compiler with -E so it shows the preprocessor
output:
{{{
$ /usr/bin/clang++ -DLIBSHIBOKEN_EXPORTS -DNDEBUG -pipe -O2 -arch x86_64
-Wall -fvisibility=hidden -Wno-strict-aliasing -O3 -DNDEBUG -arch x86_64
-fPIC
-I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports
.org_release_ports_python_py-
shiboken/py27-shiboken/work/shiboken-1.1.0/libshiboken
-I/System/Library/Frameworks/Python.framework/Headers
-I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports
.org_release_ports_python_py-
shiboken/py27-shiboken/work/shiboken-1.1.0/ext/sparsehash -E
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports
.org_release_ports_python_py-
shiboken/py27-shiboken/work/shiboken-1.1.0/libshiboken/sbkstring.cpp |
grep ^#|grep Python|head
# 1 "/System/Library/Frameworks/Python.framework/Headers/Python.h" 1
# 1 "/System/Library/Frameworks/Python.framework/Headers/patchlevel.h" 1
# 8 "/System/Library/Frameworks/Python.framework/Headers/Python.h" 2
# 1 "/System/Library/Frameworks/Python.framework/Headers/pyconfig.h" 1
# 9 "/System/Library/Frameworks/Python.framework/Headers/Python.h" 2
}}}
So it looks like fixing the port file to tell cmake the correct Python
will be sufficient.
--
Ticket URL: <https://trac.macports.org/ticket/33574#comment:6>
MacPorts <http://www.macports.org/>
Ports system for Mac OS
More information about the macports-tickets
mailing list