scrapinghub / python-crfsuite

A python binding for crfsuite
MIT License
770 stars 221 forks source link

problem building with conda #47

Closed fgregg closed 7 years ago

fgregg commented 7 years ago

Hi, I don't know if you are interested in supporting conda, but one of my users reported a failure to build python-crfsuite with conda



Running setup.py install for python-crfsuite
building 'pycrfsuite._pycrfsuite' extension
gcc -fno-strict-aliasing -I/Users/Copper/anaconda/include -arch x86_64 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -Icrfsuite/include/ -Icrfsuite/lib/cqdb/include -Iliblbfgs/include -Ipycrfsuite -I/Users/Copper/anaconda/include/python2.7 -c pycrfsuite/_pycrfsuite.cpp -o build/temp.macosx-10.5-x86_64-2.7/pycrfsuite/_pycrfsuite.o -std=c99
error: invalid argument '-std=c99' not allowed with 'C++/ObjC++'
error: command 'gcc' failed with exit status 1
Complete output from command /Users/Copper/anaconda/bin/python -c "import setuptools;file='/private/var/folders/2g/08224dlj455fs3tvmdqw0qr00000gn/T/pip_build_Copper/python-crfsuite/setup.py';exec(compile(open(file).read().replace('\r\n', '\n'), file, 'exec'))" install --record /var/folders/2g/08224dlj455fs3tvmdqw0qr00000gn/T/pip-D1iuWw-record/install-record.txt --single-version-externally-managed:
running install

running build

running build_py

creating build

creating build/lib.macosx-10.5-x86_64-2.7

creating build/lib.macosx-10.5-x86_64-2.7/pycrfsuite

copying pycrfsuite/init.py -> build/lib.macosx-10.5-x86_64-2.7/pycrfsuite

copying pycrfsuite/_dumpparser.py -> build/lib.macosx-10.5-x86_64-2.7/pycrfsuite

copying pycrfsuite/_logparser.py -> build/lib.macosx-10.5-x86_64-2.7/pycrfsuite

running build_ext

building 'pycrfsuite._pycrfsuite' extension

creating build/temp.macosx-10.5-x86_64-2.7

creating build/temp.macosx-10.5-x86_64-2.7/pycrfsuite

creating build/temp.macosx-10.5-x86_64-2.7/crfsuite

creating build/temp.macosx-10.5-x86_64-2.7/crfsuite/lib

creating build/temp.macosx-10.5-x86_64-2.7/crfsuite/lib/crf

creating build/temp.macosx-10.5-x86_64-2.7/crfsuite/lib/crf/src

creating build/temp.macosx-10.5-x86_64-2.7/crfsuite/swig

creating build/temp.macosx-10.5-x86_64-2.7/crfsuite/lib/cqdb

creating build/temp.macosx-10.5-x86_64-2.7/crfsuite/lib/cqdb/src

creating build/temp.macosx-10.5-x86_64-2.7/liblbfgs

creating build/temp.macosx-10.5-x86_64-2.7/liblbfgs/lib

gcc -fno-strict-aliasing -I/Users/Copper/anaconda/include -arch x86_64 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -Icrfsuite/include/ -Icrfsuite/lib/cqdb/include -Iliblbfgs/include -Ipycrfsuite -I/Users/Copper/anaconda/include/python2.7 -c pycrfsuite/_pycrfsuite.cpp -o build/temp.macosx-10.5-x86_64-2.7/pycrfsuite/_pycrfsuite.o -std=c99

error: invalid argument '-std=c99' not allowed with 'C++/ObjC++'

error: command 'gcc' failed with exit status 1```
kmike commented 7 years ago

This looks like another incarnation of https://github.com/scrapinghub/python-crfsuite/pull/46 and https://github.com/scrapinghub/python-crfsuite/pull/45.

rmax commented 7 years ago

Latest release is now available in the conda-forge channel: https://anaconda.org/conda-forge/python-crfsuite

kmike commented 7 years ago

I think the issue is still valid - likely you still can't install python-crfsuite to conda enviroment using pip. But as python-crfsuite is available on conda-forge and it is documented in README how to install it (thanks @rolando for both), I'm closing this ticket.