ovalhub/pyicu

PyICU build fails since commit 7f6462

Belval opened this issue · 3 comments

This commit 7f64620 causes the compilation to fail when installing PyICU with CFLAGS="-std=gnu++11" python -m pip install git+https://github.com/ovalhub/pyicu. Installing with an earlier commit (15d2ba6) fixes the issue.

Sorry, the first message was not helpful.

OS: Ubuntu 18.04 (docker image)
ICU: 60.2

To repro, run docker build -t test . with the following as your Dockerfile:

FROM nvidia/cuda:10.2-devel-ubuntu18.04
RUN apt update
RUN apt install git python3-dev python3-pip libicu-dev -y --fix-missing
RUN CFLAGS="-std=gnu++11" python3 -m pip install git+https://github.com/ovalhub/pyicu

It does not seem to happen on my regular Ubuntu 18.04 server so it might be only on the Nvidia CUDA image for some reason. Feel free to close the issue.

Error:

    x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -std=gnu++11 -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.6m -c measureunit.cpp -o build/temp.linux-x86_64-3.6/measureunit.o -std=c++11 -I/usr/include -DPYICU_VER="2.6" -DPYICU_ICU_MAX_VER="68"
    measureunit.cpp: In function 'PyObject* t_measure_getUnit(t_measure*)':
    measureunit.cpp:1124:58: error: invalid conversion from 'icu_60::UObject*' to 'icu_60::MeasureUnit*' [-fpermissive]
         return wrap_MeasureUnit(self->object->getUnit().clone(), T_OWNED);
                                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
    In file included from measureunit.cpp:29:0:
    macros.h:199:11: note:   initializing argument 1 of 'PyObject* wrap_MeasureUnit(icu_60::MeasureUnit*, int)'
     PyObject *wrap_##name(icuClass *object, int flags)                        \
               ^
    measureunit.cpp:492:1: note: in expansion of macro 'DECLARE_TYPE'
     DECLARE_TYPE(MeasureUnit, t_measureunit, UObject, MeasureUnit,
     ^~~~~~~~~~~~
    error: command 'x86_64-linux-gnu-gcc' failed with exit status 1