Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 532202 - dev-python/matplotlib-1.3.0 with dev-python/numpy-1.9.0-r1 - src/_png.cpp:243:48: error: macro "npy_PyFile_DupClose" requires 3 arguments, but only 2 given
Summary: dev-python/matplotlib-1.3.0 with dev-python/numpy-1.9.0-r1 - src/_png.cpp:243...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Python Gentoo Team
URL:
Whiteboard:
Keywords:
: 533720 (view as bug list)
Depends on:
Blocks:
 
Reported: 2014-12-10 21:34 UTC by Steven Trogdon
Modified: 2015-01-05 14:40 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log.bz2 (build.log.bz2,18.40 KB, application/x-bzip)
2014-12-10 21:35 UTC, Steven Trogdon
Details
numpy-1.9.patch (numpy-1.9.patch,11.57 KB, patch)
2014-12-11 00:38 UTC, Steven Trogdon
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Steven Trogdon 2014-12-10 21:34:43 UTC
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.
Comment 1 Steven Trogdon 2014-12-10 21:35:45 UTC
Created attachment 391398 [details]
build.log.bz2
Comment 2 Steven Trogdon 2014-12-11 00:38:49 UTC
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.
Comment 3 Ian Delaney (RETIRED) gentoo-dev 2014-12-18 12:54:55 UTC
*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
Comment 4 Steven Trogdon 2014-12-18 14:33:32 UTC
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?
Comment 5 Steven Trogdon 2014-12-18 14:58:39 UTC
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
Comment 6 Mike Gilbert gentoo-dev 2014-12-24 18:24:36 UTC
Agreed. We should probably stabilize a newer matplotlib.
Comment 7 Mike Gilbert gentoo-dev 2014-12-24 18:38:31 UTC
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.
Comment 8 Steven Lai 2014-12-28 02:40:16 UTC
*** Bug 533720 has been marked as a duplicate of this bug. ***
Comment 9 Mike Gilbert gentoo-dev 2014-12-28 07:33:18 UTC
Looks like we already have bug 530538 open.
Comment 10 Julian Ospald 2015-01-03 21:12:36 UTC
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.
Comment 11 Mike Gilbert gentoo-dev 2015-01-04 03:18:36 UTC
(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.
Comment 12 Julian Ospald 2015-01-05 14:40:36 UTC
+*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