GregBowyer / cld2-cffi

Python bindings to the Compact Language Detector
Apache License 2.0
33 stars 10 forks source link

cld2-cffi does not build on new compilers (gcc8) #21

Open OneRaynyDay opened 6 years ago

OneRaynyDay commented 6 years ago

Currently building cld-cffi will fail on gcc8. To install it successfully, I used -Wno-narrowing as a CFLAG environment variable while pip install'ing. This is enforced in the new compilers because C++11 disallowed narrowing by default. For compilation, could you please add the flag during compilation so we can run pip install cld2-cffi and have it run without external environment variables?

Thank you.

Alex-Bogdanov commented 5 years ago

for Ubuntu 18.04 it works only in this way:

export CFLAGS="-Wno-narrowing"
pip install cld2-cffi
perklet commented 5 years ago

on a ubuntu 18.04 machine

Collecting cld2-cffi
Collecting cffi (from cld2-cffi)
  Using cached https://files.pythonhosted.org/packages/5f/bf/6aa1925384c23ffeb579e97a5569eb9abce41b6310b329352b8252cee1c3/cffi-1.12.3-cp36-cp36m-manylinux1_x86_64.whl
Collecting six (from cld2-cffi)
  Using cached https://files.pythonhosted.org/packages/73/fb/00a976f728d0d1fecfe898238ce23f502a721c0ac0ecfedb80e0d88c64e9/six-1.12.0-py2.py3-none-any.whl
Collecting pycparser (from cffi->cld2-cffi)
Installing collected packages: pycparser, cffi, six, cld2-cffi
Successfully installed cffi-1.12.3 cld2-cffi-0.1.4 pycparser-2.19 six-1.12.0
[1]    4406 segmentation fault  CFLAGS=-Wno-narrowing pip3 install cld2-cffi