$ OPT='-march=native' python setup.py install ============================================================================ Edit setup.cfg to change the build options BUILDING MATPLOTLIB matplotlib: yes [1.3.1] python: yes [2.7.5+ (default, Feb 27 2014, 19:37:08) [GCC 4.8.1]] platform: yes [linux2] REQUIRED DEPENDENCIES AND EXTENSIONS numpy: yes [version 1.8.1rc1] dateutil: yes [using dateutil version 1.5] tornado: yes [using tornado version 2.4.1] pyparsing: yes [using pyparsing version 2.0.1] pycxx: yes [Couldn't import. Using local copy.] libagg: yes [pkg-config information for 'libagg' could not be found. Using local copy.] freetype: yes [version 16.1.10] png: yes [version 1.2.49] OPTIONAL SUBPACKAGES sample_data: yes [installing] toolkits: yes [installing] tests: yes [using nose version 1.3.0] OPTIONAL BACKEND EXTENSIONS macosx: no [Mac OS-X only] qt4agg: yes [installing, Qt: 4.8.4, PyQt4: 4.10.3] gtk3agg: yes [installing, version 3.6.8] gtk3cairo: yes [installing, version 3.6.8] gtkagg: yes [installing, Gtk: 2.24.20 pygtk: 2.24.0] tkagg: no [The C/C++ header for Tk (tk.h) could not be found. You may need to install the development package.] wxagg: yes [installing, version 2.8.12.1] gtk: yes [installing, Gtk: 2.24.20 pygtk: 2.24.0] agg: yes [installing] cairo: yes [installing, version 1.8.8] windowing: no [Microsoft Windows only] OPTIONAL LATEX DEPENDENCIES dvipng: yes [version 1.14] ghostscript: yes [version 9.10] latex: yes [version 3.1415926] pdftops: yes [version 0.24.1] running install Checking .pth file support in /usr/local/lib/python2.7/dist-packages/ /usr/bin/python -E -c pass TEST PASSED: /usr/local/lib/python2.7/dist-packages/ appears to support .pth files running bdist_egg running egg_info writing requirements to lib/matplotlib.egg-info/requires.txt writing lib/matplotlib.egg-info/PKG-INFO writing namespace_packages to lib/matplotlib.egg-info/namespace_packages.txt writing top-level names to lib/matplotlib.egg-info/top_level.txt writing dependency_links to lib/matplotlib.egg-info/dependency_links.txt reading manifest file 'lib/matplotlib.egg-info/SOURCES.txt' reading manifest template 'MANIFEST.in' writing manifest file 'lib/matplotlib.egg-info/SOURCES.txt' installing library code to build/bdist.linux-x86_64/egg running install_lib running build_py copying lib/matplotlib/mpl-data/matplotlibrc -> build/lib.linux-x86_64-2.7/matplotlib/mpl-data running build_ext building 'matplotlib._png' extension x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -march=native -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_matplotlib__png_ARRAY_API -DPYCXX_ISO_CPP_LIB=1 -I/usr/local/lib/python2.7/dist-packages/numpy/core/include -I/usr/local/include -I/usr/include -I. -I/usr/include/libpng12 -I/usr/include/python2.7 -c src/_png.cpp -o build/temp.linux-x86_64-2.7/src/_png.o In file included from /usr/local/lib/python2.7/dist-packages/numpy/core/include/numpy/ndarraytypes.h:1761:0, from /usr/local/lib/python2.7/dist-packages/numpy/core/include/numpy/ndarrayobject.h:17, from /usr/local/lib/python2.7/dist-packages/numpy/core/include/numpy/arrayobject.h:4, from src/_png.cpp:28: /usr/local/lib/python2.7/dist-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:15:2: warning: #warning "Using deprecated NumPy API, disable it by " "#defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp] #warning "Using deprecated NumPy API, disable it by " \ ^ src/_png.cpp:147:51: error: macro "npy_PyFile_Dup" requires 3 arguments, but only 2 given if ((fp = npy_PyFile_Dup(py_file, (char *)"wb"))) ^ src/_png.cpp:243:48: error: macro "npy_PyFile_DupClose" requires 3 arguments, but only 2 given if (npy_PyFile_DupClose(py_file, fp)) { ^ src/_png.cpp:264:44: error: macro "npy_PyFile_DupClose" requires 3 arguments, but only 2 given if (npy_PyFile_DupClose(py_file, fp)) { ^ src/_png.cpp:329:43: error: macro "npy_PyFile_Dup" requires 3 arguments, but only 2 given if ((fp = npy_PyFile_Dup(py_file, "rb"))) ^ src/_png.cpp:577:44: error: macro "npy_PyFile_DupClose" requires 3 arguments, but only 2 given if (npy_PyFile_DupClose(py_file, fp)) { ^ In file included from src/file_compat.h:4:0, from src/_png.cpp:31: /usr/local/lib/python2.7/dist-packages/numpy/core/include/numpy/npy_3kcompat.h: In function ‘PyObject* npy_PyFile_OpenFile(PyObject*, const char*)’: /usr/local/lib/python2.7/dist-packages/numpy/core/include/numpy/npy_3kcompat.h:288:60: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings] return PyObject_CallFunction(open, "Os", filename, mode); ^ /usr/local/lib/python2.7/dist-packages/numpy/core/include/numpy/npy_3kcompat.h: In function ‘int npy_PyFile_CloseFile(PyObject*)’: /usr/local/lib/python2.7/dist-packages/numpy/core/include/numpy/npy_3kcompat.h:296:50: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings] ret = PyObject_CallMethod(file, "close", NULL); ^ src/_png.cpp: In member function ‘Py::Object _png_module::write_png(const Py::Tuple&)’: src/_png.cpp:147:15: error: ‘npy_PyFile_Dup’ was not declared in this scope if ((fp = npy_PyFile_Dup(py_file, (char *)"wb"))) ^ src/_png.cpp:243:17: error: ‘npy_PyFile_DupClose’ was not declared in this scope if (npy_PyFile_DupClose(py_file, fp)) { ^ src/_png.cpp:264:13: error: ‘npy_PyFile_DupClose’ was not declared in this scope if (npy_PyFile_DupClose(py_file, fp)) { ^ src/_png.cpp: In member function ‘PyObject* _png_module::_read_png(const Py::Object&, bool, int)’: src/_png.cpp:329:15: error: ‘npy_PyFile_Dup’ was not declared in this scope if ((fp = npy_PyFile_Dup(py_file, "rb"))) ^ src/_png.cpp:577:13: error: ‘npy_PyFile_DupClose’ was not declared in this scope if (npy_PyFile_DupClose(py_file, fp)) { ^ error: command 'x86_64-linux-gnu-gcc' failed with exit status 1