Compilation failure for 2.4 on multiple platforms
zunger-humu opened this issue · 10 comments
pip install is failing with this:
x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fstack-protector-strong -g -Wformat -Werror=format-security -fPIC -I/root/repo/venv/include -I/opt/python3.7/include/python3.7m -c _icu.cpp -o build/temp.linux-x86_64-3.7/_icu.o --std=c++0x -I/usr/include -DPYICU_VER="2.4"
_icu.cpp:54:19: fatal error: tries.h: No such file or directory
I've so far repro'ed this failure on CircleCI doing a gcc x86_64-linux build, and on OS X Mojave using clang.
Good news: That error no longer happens when trying to compile.
Bad news: Now this one happens instead, same circumstances as before:
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.7
copying PyICU.py -> build/lib.linux-x86_64-3.7
creating build/lib.linux-x86_64-3.7/icu
copying icu/__init__.py -> build/lib.linux-x86_64-3.7/icu
running build_ext
building '_icu' extension
creating build/temp.linux-x86_64-3.7
x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fstack-protector-strong -g -Wformat -Werror=format-security -fPIC -I/root/repo/venv/include -I/opt/python3.7/include/python3.7m -c _icu.cpp -o build/temp.linux-x86_64-3.7/_icu.o --std=c++0x -I/usr/include -DPYICU_VER="2.4.1"
In file included from _icu.cpp:29:0:
bases.h:51:12: error: conflicting return type specified for ‘virtual char16_t PythonReplaceable::getCharAt(int32_t) const’
char16_t getCharAt(int32_t offset) const override;
^
In file included from /usr/include/x86_64-linux-gnu/unicode/unistr.h:30:0,
from common.h:106,
from _icu.cpp:27:
/usr/include/x86_64-linux-gnu/unicode/rep.h:231:19: error: overriding ‘virtual UChar icu_55::Replaceable::getCharAt(int32_t) const’
virtual UChar getCharAt(int32_t offset) const = 0;
^
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
There is a fix in trunk for this. Can you please try it out and let me know if your build completes then ?
Thanks !
Sorry this took so long to run -- I just retried it from trunk on CircleCI, and it's now failing with
tries.cpp: In function ‘PyObject* t_ucharstrie_getNextUChars(t_ucharstrie*)’:
tries.cpp:711:32: error: variable ‘icu_55::UnicodeStringAppendable a’ has initializer but incomplete type
UnicodeStringAppendable a(u);
^
It works! Thank you!
Excellent, thank you. I'm closing this and releasing 2.4.2.
Again, thank you for your help and patience. I wish this exercise were
easier but I can't possibly test all combinations of ICU versions,
compilers, OS, python, etc... I develop on a mac and build on macos and
linux, with the latest ICU version (or close), with python 2.7.16 and python
3.8.0)
I notice you are using Travis CI. With this, you can test against Linux, macos, and Windows, and test across multiple versions of ICU. If you would like help setting this up, I can try to draft a PR. Doing so will GREATLY reduce stress in making a new release (it did for my python C extension).