With numpy-1.9.0-r1 installed matplotlib-1.3.1 fails to build with building 'matplotlib._png' extension x86_64-pc-linux-gnu-g++ -march=native -O2 -pipe -fno-strict-aliasing -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_matplotlib__png_ARRAY_API -DPYCXX_ISO_CPP_LIB=1 -I/usr/lib64/python2.7/site- packages/numpy/core/include -I/usr/include -I. -I/usr/include/libpng16 -I/usr/include/python2.7 -c src/_png.cpp -o /var/tmp/portage/dev-python/matplotlib-1.3.1/work/matplotlib-1.3. 1-python2_7/build/temp.linux-x86_64-2.7/src/_png.o In file included from /usr/lib64/python2.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:1804:0, from /usr/lib64/python2.7/site-packages/numpy/core/include/numpy/ndarrayobject.h:17, from /usr/lib64/python2.7/site-packages/numpy/core/include/numpy/arrayobject.h:4, from src/_png.cpp:28: /usr/lib64/python2.7/site-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_DEPRECAT ED_API NPY_1_7_API_VERSION" [-Wcpp] src/_png.cpp:243:48: error: macro "npy_PyFile_DupClose" requires 3 arguments, but only 2 given src/_png.cpp:264:44: error: macro "npy_PyFile_DupClose" requires 3 arguments, but only 2 given src/_png.cpp:577:44: error: macro "npy_PyFile_DupClose" requires 3 arguments, but only 2 given In file included from src/file_compat.h:4:0, from src/_png.cpp:31: /usr/lib64/python2.7/site-packages/numpy/core/include/numpy/npy_3kcompat.h: In function âPyObject* npy_PyFile_OpenFile(PyObject*, const char*)â: /usr/lib64/python2.7/site-packages/numpy/core/include/numpy/npy_3kcompat.h:348:60: warning: deprecated conversion from string constant to âchar*â [-Wwrite-strings] /usr/lib64/python2.7/site-packages/numpy/core/include/numpy/npy_3kcompat.h: In function âint npy_PyFile_CloseFile(PyObject*)â: /usr/lib64/python2.7/site-packages/numpy/core/include/numpy/npy_3kcompat.h:356:50: warning: deprecated conversion from string constant to âchar*â [-Wwrite-strings] src/_png.cpp: In member function âPy::Object _png_module::write_png(const Py::Tuple&)â: src/_png.cpp:243:17: error: ânpy_PyFile_DupCloseâ was not declared in this scope src/_png.cpp:264:13: error: ânpy_PyFile_DupCloseâ was not declared in this scope src/_png.cpp: In member function âPyObject* _png_module::_read_png(const Py::Object&, bool, int)â: src/_png.cpp:329:43: warning: deprecated conversion from string constant to âchar*â [-Wwrite-strings] src/_png.cpp:577:13: error: ânpy_PyFile_DupCloseâ was not declared in this scope error: command 'x86_64-pc-linux-gnu-g++' failed with exit status 1 Building proceeds as expected with numpy-1.8.2. I presume this is numpy-related. It seems to be.
Created attachment 391398 [details] build.log.bz2
Created attachment 391406 [details, diff] numpy-1.9.patch It appears that this commit, which was for OS X, fixes things: https://github.com/matplotlib/matplotlib/commit/1ebe784c07e1c3d9c0baccbf0b288b368124d45d The commit, as far as I can determine, is in matplotlib-1.4.0. The attached patch also doesn't prevent matplotlib-1.3.1 from building against numpy-1.8.2. I haven't tested for any side effects, only that things build.
*matplotlib-1.3.1 (12 Dec 2013) a year old. 18 Dec 2014; Ian Delaney <idella4@gentoo.org> -matplotlib-1.2.0-r2.ebuild, -matplotlib-1.2.1.ebuild, -matplotlib-1.3.1.ebuild: remove some old puged
I'm not saying that the removed matplotlib shouldn't be removed, but numpy-1.9.0-r1 is the only stable numpy in the tree and the only stable matplotlib that builds against this numpy is matplotlib-1.1.1 which is really old it's odd that it does build. If matplotlib-1.3.x isn't patched then "perhaps" matplotlib-1.4.x should go stable?
Correction. I see numpy-1.8.0-r1 is also stable. The stable matplotlibs may work with it. But I'm not going there. This only surfaced because of Sage (sage-on-gentoo) which uses matplotlib-1.3.1 and numpy-1.8.2
Agreed. We should probably stabilize a newer matplotlib.
In the mean time... + 24 Dec 2014; Mike Gilbert <floppym@gentoo.org> matplotlib-1.3.0.ebuild: + Set upper-bound on numpy dep, bug 532202.
*** Bug 533720 has been marked as a duplicate of this bug. ***
Looks like we already have bug 530538 open.
This should not be done without a revision bump, because it breaks stuff for anyone who has dynamic dependencies disabled or uses an alternative PM.
(In reply to Julian Ospald (hasufell) from comment #10) > This should not be done without a revision bump, because it breaks stuff for > anyone who has dynamic dependencies disabled or uses an alternative PM. Sorry about that. Feel free to do so.
+*matplotlib-1.3.0-r1 (05 Jan 2015) + + 05 Jan 2015; Julian Ospald <hasufell@gentoo.org> -matplotlib-1.3.0.ebuild, + +matplotlib-1.3.0-r1.ebuild: + revbump, so we don't rely on dynamic deps