On arch-linux, with python-3 the compilation is failing. This is OK with python-2. The compiler is gcc-5.1.0.
~~~~~~
[ 30%] Building CXX object pymoose/CMakeFiles/moosepython.dir/vec.cpp.o
cd /home/dilawar/moose3.0.1/_build/pymoose && /usr/bin/c++ -DARGS_CHECK -DDO_UNIT_TESTS -DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION -DPYMOOSE -DRESULT_CHECK -DSANITY_CHECK -DUSE_GENESIS_PARSER -DUSE_GSL -DUSE_NUMPY -DVALUE_CHECK -DVERBOSITY=ON -std=c++11 -g -I/home/dilawar/moose3.0.1/msg -I/home/dilawar/moose3.0.1/basecode -I/home/dilawar/moose3.0.1/moogli/include -I/usr/lib/python3.4/site-packages/numpy/core/include -I/usr/include/python3.4m -I/home/dilawar/moose3.0.1/pymoose/../basecode -I/home/dilawar/moose3.0.1/pymoose/../msg -Wall -Wno-unused-variable -Wno-unused-function -fPIC -UUSE_SBML -DCYMOOSE -DCYTHON -o CMakeFiles/moosepython.dir/vec.cpp.o -c /home/dilawar/moose3.0.1/pymoose/vec.cpp
/home/dilawar/moose3.0.1/pymoose/vec.cpp:141:5: error: invalid conversion from 'objobjproc {aka int ()(_object, _object)}' to 'ssizeobjargproc {aka int ()(_object, long int, _object)}' [-fpermissive]
};
~~~~~~~
Anonymous
It is not clear what CMake is doing, please compare with the Makefile results.
Please check if your Python headers are correct. Python 3 header should define PY_MAJOR_VERSION >= 3, which is checked in moosemodule.h:Line#64. However, you need to update your sources to get fixes in PyRun to handle Python3.
Last edit: Subhasis Ray 2015-06-19
Please check revision 6721. It works with Python 3 for me. You need to convert the .py files in python/moose directory to Python 3 though:
2to3 -w *.py.