Open gianlucascoccia opened 6 years ago
I am having similar issues. It was fine installing on my Mac but ubuntu does not appear to function properly.
This should probably be filed upstream at https://github.com/CLD2Owners/cld2 (if at all).
It says that scoreonescriptspan.h uses #include <stdio.h>
, which via /usr/include/features.h
tries to include sys/cdefs.h
and can't find it.
On Ubuntu 18.04.3 LTS, this header is present at /usr/include/x86_64-linux-gnu/sys/cdefs.h
. On other versions of Ubuntu, you might need to install one of several development libraries.
As the title says, log below:
pip install pycld2 Collecting pycld2 Downloading pycld2-0.31.tar.gz (14.3MB) 100% |████████████████████████████████| 14.3MB 41kB/s Building wheels for collected packages: pycld2 Running setup.py bdist_wheel for pycld2 ... error Complete output from command /home/gian/anaconda3/bin/python -u -c "import setuptools, tokenize;file='/tmp/pip-build-6y1fki_a/pycld2/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" bdist_wheel -d /tmp/tmppj6zt3mdpip-wheel- --python-tag cp36: running bdist_wheel running build running build_py creating build creating build/lib.linux-i686-3.6 creating build/lib.linux-i686-3.6/pycld2 copying pycld2/init.py -> build/lib.linux-i686-3.6/pycld2 running build_ext building 'pycld2._pycld2' extension creating build/temp.linux-i686-3.6 creating build/temp.linux-i686-3.6/cld2 creating build/temp.linux-i686-3.6/cld2/internal creating build/temp.linux-i686-3.6/bindings gcc -pthread -B /home/gian/anaconda3/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -Icld2/internal -Icld2/public -I/home/gian/anaconda3/include/python3.6m -c cld2/internal/cldutil.cc -o build/temp.linux-i686-3.6/cld2/internal/cldutil.o -w -O2 -m64 -fPIC cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++ In file included from /usr/include/stdio.h:27:0, from cld2/internal/scoreonescriptspan.h:76, from cld2/internal/cldutil.h:25, from cld2/internal/cldutil.cc:20: /usr/include/features.h:367:25: fatal error: sys/cdefs.h: File o directory non esistente compilation terminated. error: command 'gcc' failed with exit status 1
Failed building wheel for pycld2 Running setup.py clean for pycld2 Failed to build pycld2 Installing collected packages: pycld2 Running setup.py install for pycld2 ... error Complete output from command /home/gian/anaconda3/bin/python -u -c "import setuptools, tokenize;file='/tmp/pip-build-6y1fki_a/pycld2/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /tmp/pip-y95qy6up-record/install-record.txt --single-version-externally-managed --compile: running install running build running build_py creating build creating build/lib.linux-i686-3.6 creating build/lib.linux-i686-3.6/pycld2 copying pycld2/init.py -> build/lib.linux-i686-3.6/pycld2 running build_ext building 'pycld2._pycld2' extension creating build/temp.linux-i686-3.6 creating build/temp.linux-i686-3.6/cld2 creating build/temp.linux-i686-3.6/cld2/internal creating build/temp.linux-i686-3.6/bindings gcc -pthread -B /home/gian/anaconda3/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -Icld2/internal -Icld2/public -I/home/gian/anaconda3/include/python3.6m -c cld2/internal/cldutil.cc -o build/temp.linux-i686-3.6/cld2/internal/cldutil.o -w -O2 -m64 -fPIC cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++ In file included from /usr/include/stdio.h:27:0, from cld2/internal/scoreonescriptspan.h:76, from cld2/internal/cldutil.h:25, from cld2/internal/cldutil.cc:20: /usr/include/features.h:367:25: fatal error: sys/cdefs.h: File o directory non esistente compilation terminated. error: command 'gcc' failed with exit status 1
Command "/home/gian/anaconda3/bin/python -u -c "import setuptools, tokenize;file='/tmp/pip-build-6y1fki_a/pycld2/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /tmp/pip-y95qy6up-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-6y1fki_a/pycld2/