Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 279487 - dev-python/numpy-1.3.0: ebuild patch to avoid #include <fenv.h>
Summary: dev-python/numpy-1.3.0: ebuild patch to avoid #include <fenv.h>
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Prefix Support (show other bugs)
Hardware: x86 FreeBSD
: High normal (vote)
Assignee: Gentoo Prefix
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-07-28 15:50 UTC by Michael Yang
Modified: 2010-07-10 18:25 UTC (History)
0 users

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


Attachments
ebuild patch to dev-python/numpy-1.3.0 (numpy-1.3.0.ebuild.patch,362 bytes, patch)
2009-07-28 15:54 UTC, Michael Yang
Details | Diff
files patch to dev-python/numpy-1.3.0 (numpy-1.3.0-fenv-freebsd.patch,1.15 KB, patch)
2009-07-28 15:55 UTC, Michael Yang
Details | Diff
files patch to dev-python/numpy-1.3.0 updated (numpy-1.3.0-fenv-freebsd.patch,1.52 KB, patch)
2009-08-03 23:02 UTC, Michael Yang
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Yang 2009-07-28 15:50:38 UTC
numpy-1.3.0 ebuild is pulling in /usr/include/fenv.h through #include <fenv.h>
This causes a problem building umathmodule.o and _capi.o since /usr/include/fenv.h declares __status variable as int whereas __uint16_t should be used.  Attached ebuild patch alters _capi.c and ufuncobject.h to #include fenv.h in the numpy distribution, avoiding <fenv.h>

Reproducible: Always

Steps to Reproduce:
1. emerge =numpy-1.3.0

Actual Results:  
build/src.freebsd-7.2-RELEASE-i386-2.6/numpy/core/src/umathmodule.c
/usr/include/fenv.h: Assembler messages:
/usr/include/fenv.h:156: Error: suffix or operands invalid for `fnstsw'

Expected Results:  
success

Using FreeBSD 7.2-Release.  Related to the numpy issue on
http://projects.scipy.org/numpy/ticket/811
Comment 1 Michael Yang 2009-07-28 15:54:35 UTC
Created attachment 199453 [details, diff]
ebuild patch to dev-python/numpy-1.3.0
Comment 2 Michael Yang 2009-07-28 15:55:07 UTC
Created attachment 199454 [details, diff]
files patch to dev-python/numpy-1.3.0
Comment 3 Fabian Groffen gentoo-dev 2009-07-31 15:48:53 UTC
patch added, thanks
Comment 4 Michael Yang 2009-08-03 22:58:40 UTC
This patchset is OK for building numpy-1.3.0 but needs another patch to satisfy a further emerging of >=sci-libs/scipy-0.7.0

scipy pulls in the patched ufuncobject.h through line 13 in _cephesmodule.h:

#include "numpy/ufuncobject.h"

which fails during compile to find fenv/fenv.h or fenv/fenv.c.  The -I include flags in scipy attempt to scan $EPREFIX/usr/lib/python2.6/site-packages/numpy/core/include/numpy and fails since numpy/core/setup.py in numpy didn't install the fenv directory.

The attached patch alters setup.py to install the fenv directory. 
Comment 5 Michael Yang 2009-08-03 23:02:53 UTC
Created attachment 200073 [details, diff]
files patch to dev-python/numpy-1.3.0 updated

patches numpy/core/setup.py to install include/numpy/fenv
Comment 6 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2010-01-27 15:40:02 UTC
what still needs to be done for 1.4.0?