Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#50632 closed defect (fixed)

py34-kiwisolver: build fails with multiple errors

Reported by: dbevans (David B. Evans) Owned by: jjstickel (Jonathan Stickel)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc:
Port: py34-kiwisolver

Description

Although py27-kiwisolver builds without error, py34-kiwisolver fails during build as follows

:notice:build --->  Building py34-kiwisolver
:debug:build Executing proc-pre-org.macports.build-build-0
:debug:build Executing org.macports.build (py34-kiwisolver)
:debug:build Environment:
CC='/usr/bin/clang'
CC_PRINT_OPTIONS='YES'
CC_PRINT_OPTIONS_FILE='/opt/local/var/macports/build/_opt_macports_trunk_dports_python_py-kiwisolver/py34-kiwisolver/work/.CC_PRINT_OPTIONS'
CFLAGS='-arch x86_64'
CPATH='/opt/local/include'
CXX='/usr/bin/clang++'
CXXFLAGS='-arch x86_64'
F90FLAGS='-m64'
FCFLAGS='-m64'
FFLAGS='-m64'
LDFLAGS='-arch x86_64'
LIBRARY_PATH='/opt/local/lib'
MACOSX_DEPLOYMENT_TARGET='10.10'
OBJC='/usr/bin/clang'
OBJCFLAGS='-arch x86_64'
:debug:build Assembled command: 'cd "/opt/local/var/macports/build/_opt_macports_trunk_dports_python_py-kiwisolver/py34-kiwisolver/work/kiwi-0.1.3" && /opt/local/Library/Frameworks/Python.framework/Versions/3.4/bin/python3.4 setup.py --no-user-cfg build'
:debug:build Executing command line:  cd "/opt/local/var/macports/build/_opt_macports_trunk_dports_python_py-kiwisolver/py34-kiwisolver/work/kiwi-0.1.3" && /opt/local/Library/Frameworks/Python.framework/Versions/3.4/bin/python3.4 setup.py --no-user-cfg build
:info:build running build
:info:build running build_ext
:info:build building 'kiwisolver' extension
:info:build creating build
:info:build creating build/temp.macosx-10.10-x86_64-3.4
:info:build creating build/temp.macosx-10.10-x86_64-3.4/py
:info:build /usr/bin/clang -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -arch x86_64 -I. -I/opt/local/Library/Frameworks/Python.framework/Versions/3.4/include/python3.4m -c py/kiwisolver.cpp -o build/temp.macosx-10.10-x86_64-3.4/py/kiwisolver.o
:info:build In file included from py/kiwisolver.cpp:10:
:info:build py/pythonhelpers.h:722:53: error: use of undeclared identifier 'PyMethod_GET_CLASS'
:info:build         return PyObjectPtr( PythonHelpers::xnewref( PyMethod_GET_CLASS( m_pyobj ) ) );
:info:build                                                     ^
:info:build py/kiwisolver.cpp:28:21: error: use of undeclared identifier 'Py_InitModule'
:info:build     PyObject* mod = Py_InitModule( "kiwisolver", kiwisolver_methods );
:info:build                     ^
:info:build py/kiwisolver.cpp:30:9: error: non-void function 'initkiwisolver' should return a value [-Wreturn-type]
:info:build         return;
:info:build         ^
:info:build py/kiwisolver.cpp:32:9: error: non-void function 'initkiwisolver' should return a value [-Wreturn-type]
:info:build         return;
:info:build         ^
:info:build py/kiwisolver.cpp:34:9: error: non-void function 'initkiwisolver' should return a value [-Wreturn-type]
:info:build         return;
:info:build         ^
:info:build py/kiwisolver.cpp:36:9: error: non-void function 'initkiwisolver' should return a value [-Wreturn-type]
:info:build         return;
:info:build         ^
:info:build py/kiwisolver.cpp:38:9: error: non-void function 'initkiwisolver' should return a value [-Wreturn-type]
:info:build         return;
:info:build         ^
:info:build py/kiwisolver.cpp:40:9: error: non-void function 'initkiwisolver' should return a value [-Wreturn-type]
:info:build         return;
:info:build         ^
:info:build py/kiwisolver.cpp:42:9: error: non-void function 'initkiwisolver' should return a value [-Wreturn-type]
:info:build         return;
:info:build         ^
:info:build py/kiwisolver.cpp:43:29: error: use of undeclared identifier 'PyString_FromString'
:info:build     PyObject* kiwiversion = PyString_FromString( KIWI_VERSION );
:info:build                             ^
:info:build py/kiwisolver.cpp:45:9: error: non-void function 'initkiwisolver' should return a value [-Wreturn-type]
:info:build         return;
:info:build         ^
:info:build py/kiwisolver.cpp:46:27: error: use of undeclared identifier 'PyString_FromString'
:info:build     PyObject* pyversion = PyString_FromString( PY_KIWI_VERSION );
:info:build                           ^
:info:build py/kiwisolver.cpp:48:9: error: non-void function 'initkiwisolver' should return a value [-Wreturn-type]
:info:build         return;
:info:build         ^
:info:build py/kiwisolver.cpp:51:9: error: non-void function 'initkiwisolver' should return a value [-Wreturn-type]
:info:build         return;
:info:build         ^
:info:build 14 errors generated.
:info:build error: command '/usr/bin/clang' failed with exit status 1
:info:build Command failed:  cd "/opt/local/var/macports/build/_opt_macports_trunk_dports_python_py-kiwisolver/py34-kiwisolver/work/kiwi-0.1.3" && /opt/local/Library/Frameworks/Python.framework/Versions/3.4/bin/python3.4 setup.py --no-user-cfg build

Possibly a python3 compatibility issue? Full build log attached.

Attachments (1)

py34-kiwisolver.main.log (21.7 KB) - added by dbevans (David B. Evans) 9 years ago.
Build log showing error

Download all attachments as: .zip

Change History (6)

Changed 9 years ago by dbevans (David B. Evans)

Attachment: py34-kiwisolver.main.log added

Build log showing error

comment:1 Changed 9 years ago by jjstickel (Jonathan Stickel)

I don't have kiwisolver installed anymore, and I am still on Python-2.7. Someone else will need to resolve this (it is openmaintainer). Thanks.

comment:2 Changed 9 years ago by dbevans (David B. Evans)

As I suggested in the original description, it looks like this module is written specifically using Python2 API and is not Python3 compatible. For instance, Py_InitModule() is replaced by PyModule_Create() in Python3 extensions, similarly the PyString_*() functions are replaced by PyBytes_*() and/or PyUnicode_*().

See Porting Extension Modules to Python 3.

I'm suggesting the best solution, short of rewriting the extension entirely, is to just drop the python34 subport. Is this acceptable to you?

comment:3 in reply to:  2 Changed 9 years ago by jjstickel (Jonathan Stickel)

Replying to devans@…:

I'm suggesting the best solution, short of rewriting the extension entirely, is to just drop the python34 subport. Is this acceptable to you?

Yes, let's do this. I poked around a bit more and now remember I added the py-kiwisolver port because it is now a dependency of py-enable. As py-enable is not yet 3.x compatible, let's do the same for py-kiwisolver. (actually, it looks like kiwisolver is the blocker for python 3 compatibility of enable https://github.com/enthought/enable/pull/209 -- we can let them sort it out upstream)

comment:4 Changed 9 years ago by dbevans (David B. Evans)

Resolution: fixed
Status: newclosed

Done in r145797.

comment:5 Changed 9 years ago by jjstickel (Jonathan Stickel)

Thanks!

Note: See TracTickets for help on using tickets.