Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

installation fails on OS X 10.9 #28

Open
NataliaKo opened this issue Apr 20, 2016 · 0 comments
Open

installation fails on OS X 10.9 #28

NataliaKo opened this issue Apr 20, 2016 · 0 comments

Comments

@NataliaKo
Copy link

NataliaKo commented Apr 20, 2016

I installed Openfst 1.5.1 with --enable-python flag, and then was trying to install Pyfst.
I was first following these instructions: http://demo.clab.cs.cmu.edu/fa2014-11711/index.php/PyFST_Setup_Mac
Then, when it failed on the step "python setup.py install --prefix=$PREFIX" with "fatal error: 'unordered_map' file not found", I tried what was described in this comment.
And, still, the setup.py install fails:

dhcp-wlan-uzh-89-206-67-143:pyfst username$ sudo python setup.py install
running install
running bdist_egg
running egg_info
writing requirements to pyfst.egg-info/requires.txt
writing pyfst.egg-info/PKG-INFO
writing top-level names to pyfst.egg-info/top_level.txt
writing dependency_links to pyfst.egg-info/dependency_links.txt
reading manifest file 'pyfst.egg-info/SOURCES.txt'
writing manifest file 'pyfst.egg-info/SOURCES.txt'
installing library code to build/bdist.macosx-10.5-x86_64/egg
running install_lib
running build_py
running build_ext
running pre_build_ext
Created template fst/_fst.pyx
Created template fst/libfst.pxd
cythoning fst/_fst.pyx to fst/_fst.cpp
building 'fst._fst' extension
gcc-4.9 -fno-strict-aliasing -I/Users/username/anaconda/include -arch x86_64 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/opt/local/include -I/Users/username/anaconda/include/python2.7 -c fst/_fst.cpp -o build/temp.macosx-10.5-x86_64-2.7/fst/_fst.o -std=c++11
cc1plus: warning: command line option '-Wstrict-prototypes' is valid for C/ObjC but not for C++
g++-4.9 -bundle -undefined dynamic_lookup -L/Users/username/anaconda/lib -arch x86_64 -arch x86_64 build/temp.macosx-10.5-x86_64-2.7/fst/_fst.o -L/opt/local/lib -L/Users/username/anaconda/lib -lfst -o build/lib.macosx-10.5-x86_64-2.7/fst/_fst.so -stdlib=libstdc++
g++-4.9: error: unrecognized command line option '-stdlib=libstdc++'
command 'g++-4.9' failed with exit status 1
error: command 'g++-4.9' failed with exit status 1

UPDATE
I tried to comment out the lines in setup.py which appended "-stdlib=libstdc++"

    # extra_compile_args.append('-stdlib=libstdc++')
    #extra_link_args.append('-stdlib=libstdc++')

After that, with the warning about '-Wstrict-prototypes' still remaining, it looked like the compilatio continued, but wasn't finished. First it yielded ld warning, and then failed to install PyYAML..

$ sudo python setup.py install
running install
running bdist_egg
running egg_info
writing requirements to pyfst.egg-info/requires.txt
writing pyfst.egg-info/PKG-INFO
writing top-level names to pyfst.egg-info/top_level.txt
writing dependency_links to pyfst.egg-info/dependency_links.txt
reading manifest file 'pyfst.egg-info/SOURCES.txt'
writing manifest file 'pyfst.egg-info/SOURCES.txt'
installing library code to build/bdist.macosx-10.5-x86_64/egg
running install_lib
running build_py
running build_ext
running pre_build_ext
Created template fst/_fst.pyx
Created template fst/libfst.pxd
cythoning fst/_fst.pyx to fst/_fst.cpp
building 'fst._fst' extension
gcc-4.9 -fno-strict-aliasing -I/Users/username/anaconda/include -arch x86_64 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/opt/local/include -I/Users/username/anaconda/include/python2.7 -c fst/_fst.cpp -o build/temp.macosx-10.5-x86_64-2.7/fst/_fst.o -std=c++11
cc1plus: warning: command line option '-Wstrict-prototypes' is valid for C/ObjC but not for C++
g++-4.9 -bundle -undefined dynamic_lookup -L/Users/username/anaconda/lib -arch x86_64 -arch x86_64 build/temp.macosx-10.5-x86_64-2.7/fst/_fst.o -L/opt/local/lib -L/Users/username/anaconda/lib -lfst -o build/lib.macosx-10.5-x86_64-2.7/fst/_fst.so
ld: warning: could not create compact unwind for void std::__make_heap<__gnu_cxx::__normal_iterator<fst::GallicArc<fst::ArcTpl<fst::TropicalWeightTpl<float> >, (fst::GallicType)0>*, std::vector<fst::GallicArc<fst::ArcTpl<fst::TropicalWeightTpl<float> >, (fst::GallicType)0>, std::allocator<fst::GallicArc<fst::ArcTpl<fst::TropicalWeightTpl<float> >, (fst::GallicType)0> > > >, __gnu_cxx::__ops::_Iter_comp_iter<fst::ArcUniqueMapper<fst::GallicArc<fst::ArcTpl<fst::TropicalWeightTpl<float> >, (fst::GallicType)0> >::Compare> >(__gnu_cxx::__normal_iterator<fst::GallicArc<fst::ArcTpl<fst::TropicalWeightTpl<float> >, (fst::GallicType)0>*, std::vector<fst::GallicArc<fst::ArcTpl<fst::TropicalWeightTpl<float> >, (fst::GallicType)0>, std::allocator<fst::GallicArc<fst::ArcTpl<fst::TropicalWeightTpl<float> >, (fst::GallicType)0> > > >, __gnu_cxx::__normal_iterator<fst::GallicArc<fst::ArcTpl<fst::TropicalWeightTpl<float> >, (fst::GallicType)0>*, std::vector<fst::GallicArc<fst::ArcTpl<fst::TropicalWeightTpl<float> >, (fst::GallicType)0>, std::allocator<fst::GallicArc<fst::ArcTpl<fst::TropicalWeightTpl<float> >, (fst::GallicType)0> > > >, __gnu_cxx::__ops::_Iter_comp_iter<fst::ArcUniqueMapper<fst::GallicArc<fst::ArcTpl<fst::TropicalWeightTpl<float> >, (fst::GallicType)0> >::Compare>): dwarf uses DW_CFA_GNU_args_size

...

creating build/bdist.macosx-10.5-x86_64
creating build/bdist.macosx-10.5-x86_64/egg
creating build/bdist.macosx-10.5-x86_64/egg/fst
copying build/lib.macosx-10.5-x86_64-2.7/fst/__init__.py -> build/bdist.macosx-10.5-x86_64/egg/fst
copying build/lib.macosx-10.5-x86_64-2.7/fst/_fst.so -> build/bdist.macosx-10.5-x86_64/egg/fst
byte-compiling build/bdist.macosx-10.5-x86_64/egg/fst/__init__.py to __init__.pyc
creating stub loader for fst/_fst.so
byte-compiling build/bdist.macosx-10.5-x86_64/egg/fst/_fst.py to _fst.pyc
creating build/bdist.macosx-10.5-x86_64/egg/EGG-INFO
copying pyfst.egg-info/PKG-INFO -> build/bdist.macosx-10.5-x86_64/egg/EGG-INFO
copying pyfst.egg-info/SOURCES.txt -> build/bdist.macosx-10.5-x86_64/egg/EGG-INFO
copying pyfst.egg-info/dependency_links.txt -> build/bdist.macosx-10.5-x86_64/egg/EGG-INFO
copying pyfst.egg-info/requires.txt -> build/bdist.macosx-10.5-x86_64/egg/EGG-INFO
copying pyfst.egg-info/top_level.txt -> build/bdist.macosx-10.5-x86_64/egg/EGG-INFO
writing build/bdist.macosx-10.5-x86_64/egg/EGG-INFO/native_libs.txt
zip_safe flag not set; analyzing archive contents...
creating dist
creating 'dist/pyfst-0.2.3dev-py2.7-macosx-10.5-x86_64.egg' and adding 'build/bdist.macosx-10.5-x86_64/egg' to it
removing 'build/bdist.macosx-10.5-x86_64/egg' (and everything under it)
Processing pyfst-0.2.3dev-py2.7-macosx-10.5-x86_64.egg
Copying pyfst-0.2.3dev-py2.7-macosx-10.5-x86_64.egg to /Users/username/anaconda/lib/python2.7/site-packages
Adding pyfst 0.2.3dev to easy-install.pth file

Installed /Users/username/anaconda/lib/python2.7/site-packages/pyfst-0.2.3dev-py2.7-macosx-10.5-x86_64.egg

...
And then there was a Cython-related compiler crash...

Compiler crash traceback from this point on:
  File "Visitor.py", line 170, in Cython.Compiler.Visitor.TreeVisitor._visit (Cython/Compiler/Visitor.c:4284)
  File "Visitor.py", line 286, in Cython.Compiler.Visitor.CythonTransform.visit_Node (Cython/Compiler/Visitor.c:6288)
  File "Visitor.py", line 238, in Cython.Compiler.Visitor.VisitorTransform.visitchildren (Cython/Compiler/Visitor.c:5294)
  File "Visitor.py", line 212, in Cython.Compiler.Visitor.TreeVisitor._visitchildren (Cython/Compiler/Visitor.c:5051)
AssertionError: Cannot insert list here: body in <Cython.Compiler.Nodes.PropertyNode object at 0x104588c90>
/tmp/easy_install-cvZXWf/Cython-0.24/Cython/Compiler/Scanning.c:1:2: error: #error Do not use this file, it is the result of a failed Cython compilation.
 #error Do not use this file, it is the result of a failed Cython compilation.
  ^
error: Setup script exited with error: command 'gcc-4.9' failed with exit status 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant