You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for the report. swig had problems generating the wrapper code for Python 3.5 (d183ab8) but version 3.0.8 claims to fix these (haven't had time to test yet). Are you running the latest version? (swig -version)
(side note: I will update docs to make these issues clearer)
python --version
Python 3.5.1
swig -version|grep -v ^$
SWIG Version 3.0.8
Compiled with g++ [x86_64-unknown-linux-gnu]
Configured options: +pcre
Please see http://www.swig.org for reporting bugs and further information
no problems with the C++ code itself, seems to build fine with:
git clone https://github.com/BLLIP/bllip-parser
cd bllip-parser
make
This code builds but I am new to python and not sure how to get it to install from pip.
sudo pip install bllipparser --no-cache-dir #couldn't figure out how to force it to redownload since I am new to python
gives the same or similar errors to wbecker.
tox appears to build a 2.7 (successfully) and 3.4 version but is unable to build the 3.4 since I don't have 3.4 on my system.
I think the issue is that the wrapper file bundled with the 2015.12.3 release uses SWIG 3.0.7 or earlier, which causes these build problems. I will make a new release soon using SWIG 3.0.8 to generate the wrapper file which will hopefully address this problem.
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -Ifirst-stage/PARSE/ -I/usr/include/python3.5m -c first-stage/PARSE/swig/wrapper.C -o build/temp.linux-x86_64-3.5/first-stage/PARSE/swig/wrapper.o
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
first-stage/PARSE/swig/wrapper.C:172:21: fatal error: Python.h: No such file or directory
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
/usr/bin/clang -fno-strict-aliasing -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -arch i386 -arch x86_64 -g -I/Library/Frameworks/Python.framework/Versions/3.5/include/python3.5m -c second-stage/programs/features/simple-api.cc -o build/temp.macosx-10.6-intel-3.5/second-stage/programs/features/simple-api.o -iquote second-stage/programs/features/ -DSWIGFIX -std=c++11
In file included from second-stage/programs/features/simple-api.cc:24:
In file included from second-stage/programs/features/sp-data.h:33:
In file included from second-stage/programs/features/sptree.h:22:
In file included from second-stage/programs/features/heads.h:36:
In file included from second-stage/programs/features/tree.h:144:
second-stage/programs/features/utility.h:56:10: fatal error: 'forward_list' file not found
#include <forward_list>
^
1 error generated.
error: command '/usr/bin/clang' failed with exit status 1
Activity
dmcc commentedon Feb 5, 2016
Thanks for the report.
swighad problems generating the wrapper code for Python 3.5 (d183ab8) but version 3.0.8 claims to fix these (haven't had time to test yet). Are you running the latest version? (swig -version)(side note: I will update docs to make these issues clearer)
wbecker commentedon Feb 5, 2016
I tried it with the latest version and it failed in just the same way.
I backed down and installed
python 3.4andswig 3.0.7and it's all working now!jarussell commentedon Feb 10, 2016
I am having the same (or a similar) problem.
no problems with the C++ code itself, seems to build fine with:
This code builds but I am new to python and not sure how to get it to install from pip.
gives the same or similar errors to wbecker.
toxappears to build a 2.7 (successfully) and 3.4 version but is unable to build the 3.4 since I don't have 3.4 on my system.dmcc commentedon Feb 10, 2016
I think the issue is that the wrapper file bundled with the 2015.12.3 release uses SWIG 3.0.7 or earlier, which causes these build problems. I will make a new release soon using SWIG 3.0.8 to generate the wrapper file which will hopefully address this problem.
In the meantime, here's a possible workaround::
The first command will wipe out the SWIG-generated wrapper files (among other things) which will be regenerated during building.
halfak commentedon Sep 7, 2016
I'm still running into this issue running python 3.5.1 on Ubuntu 16.04. pip pulls down
bllipparser-2015.12.3.tar.gz.dmcc commentedon Sep 9, 2016
Thanks for the note @halfak. Sorry, this fell off my plate. I'll try to get a new-enough version of SWIG working this weekend and cut a new release.
dmcc commentedon Sep 12, 2016
Alright, there's a new release (2016.9.11) which should work with Python 3.5/swig 3.0.8. Please let me know either way if it works or doesn't. Thanks!
anupamme commentedon Oct 23, 2016
Hello @dmcc
I tried installing it and it fails:
ubuntu - 16.04 (xenial)
python - 3.5.2
swig - 3.0.8
Can @halfak confirm whether you can install because you are able to install
halfak commentedon Oct 23, 2016
@anupamme, I am able to install bllipparser-2016.9.11 via pypi with pip.
ubuntu - 16.04
python - 3.5.1
swig - 3.0.8
anupamme commentedon Oct 23, 2016
Okay I am not able to install. These are the things I have tried:
I have tried it on 2 machines:
1.
ubuntu - 16.04 (xenial)
python - 3.5.2
swig - 3.0.8
Mac OS 10.11.5 (el capitan)
python - 3.5.0
swig - 3.0.10
So I am not sure what else I can try. So if someone can suggest that would be great.
dmcc commentedon Oct 24, 2016
@anupamme Which errors are you seeing?
anupamme commentedon Oct 25, 2016
On ubuntu 16.04 (installing using pypi):
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -Ifirst-stage/PARSE/ -I/usr/include/python3.5m -c first-stage/PARSE/swig/wrapper.C -o build/temp.linux-x86_64-3.5/first-stage/PARSE/swig/wrapper.o
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
first-stage/PARSE/swig/wrapper.C:172:21: fatal error: Python.h: No such file or directory
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
Command "/usr/bin/python3.5 -u -c "import setuptools, tokenize;file='/tmp/pip-build-vn848n2m/bllipparser/setup.py';exec(compile(getattr(tokenize, 'open', open)(file).read().replace('\r\n', '\n'), file, 'exec'))" install --record /tmp/pip-j_za0ero-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-vn848n2m/bllipparser/
On Mac 10.11.5 (installing using pypi):
/usr/bin/clang -fno-strict-aliasing -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -arch i386 -arch x86_64 -g -I/Library/Frameworks/Python.framework/Versions/3.5/include/python3.5m -c second-stage/programs/features/simple-api.cc -o build/temp.macosx-10.6-intel-3.5/second-stage/programs/features/simple-api.o -iquote second-stage/programs/features/ -DSWIGFIX -std=c++11
In file included from second-stage/programs/features/simple-api.cc:24:
In file included from second-stage/programs/features/sp-data.h:33:
In file included from second-stage/programs/features/sptree.h:22:
In file included from second-stage/programs/features/heads.h:36:
In file included from second-stage/programs/features/tree.h:144:
second-stage/programs/features/utility.h:56:10: fatal error: 'forward_list' file not found
#include <forward_list>
^
1 error generated.
error: command '/usr/bin/clang' failed with exit status 1
Command "/Library/Frameworks/Python.framework/Versions/3.5/bin/python3.5 -u -c "import setuptools, tokenize;file='/private/tmp/pip-build-m2ez9evu/bllipparser/setup.py';exec(compile(getattr(tokenize, 'open', open)(file).read().replace('\r\n', '\n'), file, 'exec'))" install --record /tmp/pip-ur28p0hx-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/tmp/pip-build-m2ez9evu/bllipparser/
dmcc commentedon Oct 25, 2016
For Ubuntu, looks like you're missing
Python.h. Try usingapt-getto installlibpython3.5-dev.http://stackoverflow.com/questions/16880571/why-does-clang-lack-forward-list might be part of what's going on with Mac OS 10.11.5, but it's not clear to me why this works for others.
anupamme commentedon Oct 25, 2016
Works on Ubuntu after installing libpython3.5-dev.
On mac I am unsure why this is not working but may be I have beta version of xcode 8 and that is causing it.
But I can live with it working on ubuntu so I am good to go. Thanks for the prompt help.