[SciPy-Dev] Symbol not found: __ZNSt8ios_base4InitD1Ev for scipy.sparse

Matthew Brett matthew.brett at gmail.com
Thu Jan 30 23:09:50 EST 2014


Hi,

On Wed, Jan 22, 2014 at 4:59 PM, Matthew Brett <matthew.brett at gmail.com> wrote:
> Hi,
>
> On Wed, Jan 22, 2014 at 11:33 AM, Ralf Gommers <ralf.gommers at gmail.com> wrote:
>>
>>
>>
>> On Mon, Jan 20, 2014 at 1:24 PM, Matthew Brett <matthew.brett at gmail.com>
>> wrote:
>>>
>>> Hi,
>>>
>>> I am trying to install scipy master on OSX 10.9.
>>>
>>> I'm using
>>>
>>> export CC=clang
>>> export CXX=clang
>>> export FFLAGS=--ff2c
>>>
>>> from http://www.scipy.org/scipylib/building/macosx.html
>>>
>>> I built and installed numpy with these flags, then scipy.
>>>
>>> scipy installs:
>>>
>>> >>> scipy.__version__
>>> '0.14.0.dev-6b18a3b'
>>>
>>> but then:
>>>
>>> >>> import scipy.sparse
>>> Traceback (most recent call last):
>>>   File "<stdin>", line 1, in <module>
>>>   File
>>> "/Users/mb312/.virtualenvs/py33-sp-devel/lib/python3.3/site-packages/scipy/sparse/__init__.py",
>>> line 206, in <module>
>>>     from .csr import *
>>>   File
>>> "/Users/mb312/.virtualenvs/py33-sp-devel/lib/python3.3/site-packages/scipy/sparse/csr.py",
>>> line 13, in <module>
>>>     from .sparsetools import csr_tocsc, csr_tobsr, csr_count_blocks, \
>>>   File
>>> "/Users/mb312/.virtualenvs/py33-sp-devel/lib/python3.3/site-packages/scipy/sparse/sparsetools/__init__.py",
>>> line 5, in <module>
>>>     from .csr import *
>>>   File
>>> "/Users/mb312/.virtualenvs/py33-sp-devel/lib/python3.3/site-packages/scipy/sparse/sparsetools/csr.py",
>>> line 26, in <module>
>>>     _csr = swig_import_helper()
>>>   File
>>> "/Users/mb312/.virtualenvs/py33-sp-devel/lib/python3.3/site-packages/scipy/sparse/sparsetools/csr.py",
>>> line 22, in swig_import_helper
>>>     _mod = imp.load_module('_csr', fp, pathname, description)
>>>   File "/Users/mb312/.virtualenvs/py33-sp-devel/lib/python3.3/imp.py",
>>> line 183, in load_module
>>>     return load_dynamic(name, filename, file)
>>> ImportError:
>>> dlopen(/Users/mb312/.virtualenvs/py33-sp-devel/lib/python3.3/site-packages/scipy/sparse/sparsetools/_csr.so,
>>> 2): Symbol not found: __ZNSt8ios_base4InitD1Ev
>>>   Referenced from:
>>>
>>> /Users/mb312/.virtualenvs/py33-sp-devel/lib/python3.3/site-packages/scipy/sparse/sparsetools/_csr.so
>>>   Expected in: flat namespace
>>>  in
>>> /Users/mb312/.virtualenvs/py33-sp-devel/lib/python3.3/site-packages/scipy/sparse/sparsetools/_csr.so
>>>
>>> Here's clang version info:
>>>
>>> $ clang -v
>>> Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
>>> Target: x86_64-apple-darwin13.0.0
>>> Thread model: posix
>>>
>>> I noticed a similar issue here:
>>>
>>> https://github.com/scipy/scipy/issues/3053
>>>
>>> but I think I have clean install (into a virtualenv).
>>>
>>> Any hints as to where to look next?
>>
>>
>> I can't reproduce this with the same OS and Clang versions, XCode 5.0.1 and
>> Homebrew Python 2.7.
>>
>> Do you get the same without a virtualenv? Maybe try ``git clean -xdf``
>> followed by an in-place build. Do you get this for Python 2.7 as well? And
>> which XCode and Python (version + how installed)?
>
> Thanks for checking.
>
> I do get the same with an in-place python 2.7 build, after git clean
> -fxd, and I get the same in a virtualenv with python 2.7.
>
> For both python 3.3 and python 2.7 I'm using the python.org binaries
> installed from the binary dmg installers.
>
> [mb312 at Kerbin ~]$ python2.7 --version
> Python 2.7.6
> [mb312 at Kerbin ~]$ python3.3 --version
> Python 3.3.2
> [mb312 at Kerbin ~]$ xcodebuild -version
> Xcode 5.0.2
> Build version 5A3005

Just as a data point - the build works fine for system python.

Cheers,

Matthew



More information about the SciPy-Dev mailing list