numpy headers in the include path

Bug #495537 reported by Gael Varoquaux
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-numpy (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: python-numpy

The numpy headers of the Ubuntu are symlinked in /usr/lib. As a result, a Python package compiling with numpy.distutils will always pick up these headers, even if the numpy used is not the system numpy, but a localy installed numpy. Indeed, numpy.distutils will use the following compilation options:

compile options: '-I/usr/include -I/home/varoquau/usr/lib/python2.6/site-packages/numpy/core/include -I/usr/include/python2.6 -c'

Where the second include path points to the numpy headers of the locally-installed numpy, but is overriden by the general include '/usr/include'.

See the following mailing list discussion for more information:
http://mail.scipy.org/pipermail/numpy-discussion/2009-December/047376.html

With the release of numpy 1.4, this problem will become especially crucial, as picking up the wrong header leads to binary incompatibilities.

Revision history for this message
WeatherGod (ben-v-root) wrote :

Gael, thank you for bringing this to our attention. Quickly looking through the posted discussion, am I right in assuming that this is a packaging problem, *not* an upstream problem?

Changed in python-numpy (Ubuntu):
status: New → Incomplete
Revision history for this message
Gael Varoquaux (gael-varoquaux) wrote : Re: [Bug 495537] Re: numpy headers in the include path

On Fri, Dec 11, 2009 at 10:53:46PM -0000, WeatherGod wrote:
> Gael, thank you for bringing this to our attention. Quickly looking
> through the posted discussion, am I right in assuming that this is a
> packaging problem, *not* an upstream problem?

It is. THe symlink is added by the debian packages. It should either be
removed, or turned into a symlink encoding the numpy version number, ie:

/usr/lib/numpy1.4

Cheers,

Gaël

Revision history for this message
WeatherGod (ben-v-root) wrote :

Slight correction to the above post: /usr/include/numpy1.4

Gael, I can confirm this issue with my Jaunty installation. I have also double-checked my Fedora 11 install, and there are no symlinks to the numpy headers from /usr/include. Personally, my vote would be to remove the symlink. But since it is there, it would imply that someone needed that symlink for some purpose and modifying that symlink would break things. I am not a packager, so I will leave it up to them to decide what is best.

Changed in python-numpy (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Julian Taylor (jtaylor) wrote :

this should be fixed in recent distributions.

Changed in python-numpy (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.