Summary: | math/py-numpy: Broken on 9.2-STABLE - gcc48/libgfortran.so.3 not found | ||||||
---|---|---|---|---|---|---|---|
Product: | Ports & Packages | Reporter: | vladimir.chukharev | ||||
Component: | Individual Port(s) | Assignee: | freebsd-python (Nobody) <python> | ||||
Status: | Closed FIXED | ||||||
Severity: | Affects Many People | CC: | demon, gerald, koobs, lbartoletti, nemysis, thierry | ||||
Priority: | Normal | ||||||
Version: | Latest | ||||||
Hardware: | Any | ||||||
OS: | Any | ||||||
See Also: |
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=196862 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=188327 |
||||||
Bug Depends on: | |||||||
Bug Blocks: | 193505 | ||||||
Attachments: |
|
Description
vladimir.chukharev
2014-03-31 08:40:01 UTC
Responsible Changed From-To: freebsd-ports-bugs->freebsd-python Over to maintainer (via the GNATS Auto Assign Tool) There is a workaround given in the discussions of similar problem with ipython. Just define an environment variable: LD_LIBRARY_PATH=/usr/local/lib/gcc48 python -c "import numpy" No errors. This is an indication that the problem might be easier to solve in lang/gcc* ports or in Mk/bsd.gcc.mk -- Vladimir Chukharev Note a related PR ports/188327 'math/py-numpy: Numpy is broken'. Seems that setting LD_LIBRARY_PATH variable helps in 10.0-RELEASE too. -- Vladimir Chukharev *** Bug 192598 has been marked as a duplicate of this bug. *** Canonicalize assignee, add gerald@ to CC for help/expertise *** Bug 188327 has been marked as a duplicate of this bug. *** Is LDFLAGS properly used by this port? Same problem with the port math/py-matplotlib: $ python -c "import matplotlib as m; print(m.__version__); print(m.__path__[0]);" Traceback (most recent call last): File "<string>", line 1, in <module> File "/usr/local/lib/python2.7/site-packages/matplotlib/__init__.py", line 151, in <module> from matplotlib.rcsetup import (defaultParams, File "/usr/local/lib/python2.7/site-packages/matplotlib/rcsetup.py", line 20, in <module> from matplotlib.colors import is_color_like File "/usr/local/lib/python2.7/site-packages/matplotlib/colors.py", line 52, in <module> import numpy as np File "/usr/local/lib/python2.7/site-packages/numpy/__init__.py", line 153, in <module> from . import add_newdocs File "/usr/local/lib/python2.7/site-packages/numpy/add_newdocs.py", line 13, in <module> from numpy.lib import add_newdoc File "/usr/local/lib/python2.7/site-packages/numpy/lib/__init__.py", line 18, in <module> from .polynomial import * File "/usr/local/lib/python2.7/site-packages/numpy/lib/polynomial.py", line 19, in <module> from numpy.linalg import eigvals, lstsq, inv File "/usr/local/lib/python2.7/site-packages/numpy/linalg/__init__.py", line 50, in <module> from .linalg import * File "/usr/local/lib/python2.7/site-packages/numpy/linalg/linalg.py", line 29, in <module> from numpy.linalg import lapack_lite, _umath_linalg ImportError: /lib/libgcc_s.so.1: version GCC_4.6.0 required by /usr/local/lib/gcc48/libgfortran.so.3 not found Created attachment 147418 [details]
This patch re-adds LDFLAGS to fix the problem.
$LDFLAGS was intentionally removed with the hereunder comment:
# ignore LDFLAGS from env, as it overrides internal flags (e.g. -shared) for some reason
This proposed patch re-adds it (with the needed '-shared'), so that it takes the value set by 'USES= fortran', which fixes the reported problem.
Indirectly this fixes some dependent ports like math/py-matplotlib and cad/freecad (resurrection in progress).
(In reply to Thierry Thomas from comment #9) > $LDFLAGS was intentionally removed with the hereunder comment: > > # ignore LDFLAGS from env, as it overrides internal flags (e.g. -shared) for > some reason Ouch! That was a truely bad move. No wonder this port, and some related ones, have been causing troubles for user various times since then. Thank you so much for catching and fixing this, Thierry! A commit references this bug: Author: demon Date: Sun Sep 28 10:40:55 UTC 2014 New revision: 369447 URL: https://svnweb.freebsd.org/changeset/ports/369447 Log: Fix ImportError: /lib/libgcc_s.so.1: version GCC_4.6.0 required by /usr/local/lib/gcc48/libgfortran.so.3 not found error when importing numpy module. PR: 188114 Patch by Thierry Thomas <thierry@FreeBSD.org> Changes: head/math/py-numpy/Makefile |