error building docker image: pip install polyglot
excerpt of the stack trace of docker build
43.65 ^~~
43.65 /usr/include/python2.7/unicodeobject.h:575:29: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
43.65 register const wchar_t *w, /* wchar_t buffer */
43.65 ^
43.65 /usr/include/python2.7/unicodeobject.h:593:23: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
43.65 register wchar_t *w, /* wchar_t buffer */
43.65 ^
43.65 In file included from /usr/include/python2.7/Python.h:97,
43.65 from common.h:44,
43.65 from tzinfo.cpp:24:
43.65 /usr/include/python2.7/stringobject.h:173:24: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
43.65 register PyObject *obj, /* string or Unicode object */
43.65 ^~~
43.65 /usr/include/python2.7/stringobject.h:174:21: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
43.65 register char **s, /* pointer to buffer variable */
43.65 ^
43.65 /usr/include/python2.7/stringobject.h:175:26: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
43.65 register Py_ssize_t *len /* pointer to length variable or NULL
43.65 ^~~
43.65 x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fdebug-prefix-map=/build/reproducible-path/python2.7-2.7.16=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c unicodeset.cpp -o build/temp.linux-x86_64-2.7/unicodeset.o -std=c++17 -DPYICU_VER="2.15" -DPYICU_ICU_MAX_VER="77"
43.65 cc1plus: warning: command line option '-Wstrict-prototypes' is valid for C/ObjC but not for C++
43.65 In file included from /usr/include/python2.7/Python.h:88,
43.65 from common.h:44,
43.65 from unicodeset.cpp:24:
43.65 /usr/include/python2.7/unicodeobject.h:534:24: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
43.65 register PyObject *obj, /* Object */
43.65 ^~~
43.65 /usr/include/python2.7/unicodeobject.h:553:24: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
43.65 register PyObject *obj /* Object */
43.65 ^~~
43.65 /usr/include/python2.7/unicodeobject.h:575:29: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
43.65 register const wchar_t *w, /* wchar_t buffer */
43.65 ^
43.65 /usr/include/python2.7/unicodeobject.h:593:23: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
43.65 register wchar_t *w, /* wchar_t buffer */
43.65 ^
43.65 In file included from /usr/include/python2.7/Python.h:97,
43.65 from common.h:44,
43.65 from unicodeset.cpp:24:
43.65 /usr/include/python2.7/stringobject.h:173:24: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
43.65 register PyObject *obj, /* string or Unicode object */
43.65 ^~~
43.65 /usr/include/python2.7/stringobject.h:174:21: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
43.65 register char **s, /* pointer to buffer variable */
43.65 ^
43.65 /usr/include/python2.7/stringobject.h:175:26: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
43.65 register Py_ssize_t *len /* pointer to length variable or NULL
43.65 ^~~
43.65 unicodeset.cpp: In function 'int t_unicodesetiterator_init(t_unicodesetiterator*, PyObject*, PyObject*)':
43.65 unicodeset.cpp:1334:31: error: 'class icu_63::UnicodeSetIterator' has no member named 'skipToStrings'; did you mean 'isString'?
43.65 self->object->skipToStrings();
43.65 ^~~~~~~~~~~~~
43.65 isString
43.65 error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
43.65 ----------------------------------------
43.65 ERROR: Failed building wheel for PyICU
43.65 Building wheel for morfessor (setup.py): started
43.80 Building wheel for morfessor (setup.py): finished with status 'done'
43.80 Created wheel for morfessor: filename=Morfessor-2.0.6-py2-none-any.whl size=35785 sha256=8ba9c65320a1820282df5f47979d6271f9718c8ca41d9981772829d4e4417640
43.80 Stored in directory: /root/.cache/pip/wheels/bf/2d/da/a5e080915371e146dda9ea4aabd6289c988a6b964ed0ef8f68
43.80 Building wheel for pycld2 (setup.py): started
54.22 Building wheel for pycld2 (setup.py): finished with status 'done'
54.25 Created wheel for pycld2: filename=pycld2-0.41-cp27-cp27mu-linux_x86_64.whl size=9913607 sha256=37c502805cc126cc5b193f1b8ec8e2ce5a3adecac2ffc129209d91790af96c12
54.25 Stored in directory: /root/.cache/pip/wheels/09/2d/55/dca157cfef854cd38503e7c8d549b29df8b9182b331f515f0d
54.25 Building wheel for nltk (setup.py): started
54.65 Building wheel for nltk (setup.py): finished with status 'done'
54.66 Created wheel for nltk: filename=nltk-3.4.5-py2-none-any.whl size=1449905 sha256=3075d4f65b01c5606bae65d222002b51baf080bcc3dc24860e4c84e93b3a2187
54.66 Stored in directory: /root/.cache/pip/wheels/ed/99/b5/b9af91b808a9e616179d0d3e8b2a8572231dc84886731d0651
54.66 Building wheel for grpcio (setup.py): started
114.7 Building wheel for grpcio (setup.py): still running...
174.9 Building wheel for grpcio (setup.py): still running...
189.8 Building wheel for grpcio (setup.py): finished with status 'done'
189.9 Created wheel for grpcio: filename=grpcio-1.41.1-cp27-cp27mu-linux_x86_64.whl size=47076128 sha256=dcaba2b91a93f08532adc868b55e94e82d1245877a949317d45d797799724053
189.9 Stored in directory: /root/.cache/pip/wheels/cb/f3/4f/6c8183d6a202219b73734536d58b67a983e6a9e7d287bccc36
189.9 Building wheel for dill (setup.py): started
190.1 Building wheel for dill (setup.py): finished with status 'done'
190.1 Created wheel for dill: filename=dill-0.2.9-py2-none-any.whl size=77404 sha256=dd1f9dbfd9e0359d947788c1af0c8625c0970a099cf1fc641dc3e437cebdfbbd
190.1 Stored in directory: /root/.cache/pip/wheels/1d/ed/6e/7de0d87447cb5364690d0b31cb52c422701005c85a9e7625c4
190.1 Building wheel for ply (setup.py): started
190.3 Building wheel for ply (setup.py): finished with status 'done'
190.3 Created wheel for ply: filename=ply-3.8-py2.py3-none-any.whl size=48248 sha256=2bbd2204bfcb22d07b55126d907295cd1e44e75e969a0914af862d958cbdf951
190.3 Stored in directory: /root/.cache/pip/wheels/da/b8/ff/2dd2bf1c71d3fea7b4654eca330b598477c361c28ac6aad61f
190.3 Building wheel for future (setup.py): started
190.6 Building wheel for future (setup.py): finished with status 'done'
190.6 Created wheel for future: filename=future-0.16.0-py2-none-any.whl size=499260 sha256=4b5ba8ccb8d4cddce48924494b94a08c18490fff1a73c24e4343d90c7b737515
190.6 Stored in directory: /root/.cache/pip/wheels/79/88/2d/28d52e54dae1d3efe7290c07acd32702dc08d368cdbcf47196
190.6 Successfully built afinn googleapis-common-protos polyglot httplib2 morfessor pycld2 nltk grpcio dill ply future
190.6 Failed to build PyICU
190.6 ERROR: Could not build wheels for PyICU which use PEP 517 and cannot be installed directly
------
Dockerfile:19
--------------------
18 | RUN python2 -m pip install --upgrade pip
19 | >>> RUN pip install \
20 | >>> afinn \
21 | >>> google-api-python-client==1.12.11 \
22 | >>> googleapis-common-protos==1.5.3 \
23 | >>> google-auth==1.1.1 \
24 | >>> google-cloud-language==0.29.0 \
25 | >>> polyglot \
26 | >>> protobuf==3.4.0 \
27 | >>> simplejson \
28 | >>> textblob
it looks like same error fixed on cortext-manager by cortext/cortext-manager!43
proposed solution
-
Add version to polyglot==16.7.4(this is the same version in productionlisis-wrk-01andlisis-wrk-02)
Edited by Joenio Marques da Costa