science/py27-scipy and ipython issue

I installed science/py27-scipy via portinstall on FreeBSD 9.2 with no issues, but when I start up Python and do import scipy, I get

Code:
ImportError: /lib/libgcc_s.so.1: version GCC_4.6.0 required by /usr/local/lib/gcc47/libgfortran.so.3 not found

I googled around, and it seems to be a linking issue where the Fortran code isn't linked against the right GCC lib version. I confirmed the issue by compiling and running a Fortran "Hello, World." The fix is adding
Code:
-rpath /usr/local/lib/gcc48
when I call gfortran. This doesn't work so well for ports, and it opens a can up worms because my ports are currently getting built with GCC 4.2.1, i.e. the version FreeBSD shipped with. There's no gfortran for it.

It looks like I want to rebuild all Python ports with gcc48, but that's a painful process. Am I missing something?
 
Re: science/py27-scipy build issue

Interesting discovery: this happens under ipython, but not python. I also did portupgrade -f python27 py27-scipy py27-ipython py27-numpy just to make sure those ports are clean and up-to-date. Here are my installed python packages:

Code:
# pkg info | grep py
py27-MySQLdb-1.2.3_4           Access a MySQL database through Python
py27-cairo-1.10.0_1            Python 2 bindings for Cairo
py27-carbon-0.9.12_1           Backend storage application for graphite
py27-django-1.6.2              High-level Python Web framework
py27-django-tagging-0.3.1_1    Generic tagging application for Django
py27-graphite-web-0.9.12_1     Enterprise scalable realtime graphing platform
py27-ipython-1.2.1_2           An enhanced Interactive Python shell
py27-isodate-0.5.0             ISO 8601 date/time/duration parser and formater
py27-libxml2-2.8.0             Python interface for XML parser library for GNOME
py27-nose-1.3.0_1              Discovery-based unittest extension
py27-numpy-1.8.0_1,1           The New Numeric Extension to Python
py27-pexpect-3.1               Pure Python Expect-like module
py27-pip-1.5.2                 Tool for installing and managing Python packages
py27-psycopg2-2.5.2            High performance Python adapter for PostgreSQL
py27-pygments-1.6_2            Syntax highlighter written in Python
py27-pyzmq-14.1.0              Python bindings for ZeroMQ
py27-qt4-core-4.10.3,1         Python bindings for the Qt4 toolkit, QtCore module
py27-qt4-gui-4.10.3,1          Python bindings for the Qt4 toolkit, QtGui module
py27-qt4-svg-4.10.3,1          Python bindings for the Qt4 toolkit, QtSvg module
py27-rdflib-4.1.1              Python library for RDF manipulation
py27-s3cmd-1.0.1_1             Unix-like tools to manipulate stored files from the command line
py27-scipy-0.13.3_1            Scientific tools for Python
py27-setuptools27-2.0.1        Python packages installer
py27-sip-4.15.2,1              Python to C and C++ bindings generator
py27-sqlite3-2.7.6_3           Standard Python binding to the SQLite3 library
py27-thrift-0.9.1,1            Python interface to Thrift
py27-twistedCore-13.2.0        Asynchronous networking framework for Python - Core module
py27-txamqp-0.3_2              Twisted Python library for the AMQP messaging protocol
py27-whisper-0.9.12            Fixed-size database, similar in design to RRD
py27-zope.interface-3.8.0_1    Interfaces for Python
python-2.7_1,2                 The "meta-port" for the default version of Python interpreter
python2-2_2                    The "meta-port" for version 2 of the Python interpreter
python27-2.7.6_4               Interpreted object-oriented programming language
 
Re: science/py27-scipy build issue

dehrmann said:
It looks like I want to rebuild all Python ports with gcc48, but that's a painful process. Am I missing something?
You want the latest gcc-4.8.2 to be precise as 2.7.6 or 3.4.0 was broken with earlier versions of GCC ;) I would like to work on the OpenBSD port of scipy and numpy but those things are a full time job. Unless you are completely taking the port over I would at least try to talk to the current FreeBSD porter.
 
You can modify /etc/libmap.conf and add
Code:
libgcc_s.so.1   gcc47/libgcc_s.so.1
libgomp.so.1    gcc47/libgomp.so.1
libssp.so.0     gcc47/libssp.so.0
libstdc++.so.6  gcc47/libstdc++.so.6
 
Back
Top