PyICU build fails since commit 7f6462
Belval opened this issue · 3 comments
Belval commented
ovalhub commented
Please, include the error you saw, OS you're on, version of compiler you're using, ICU version you're building against as I'm not setup to reproduce it.
Better yet, include a patch that fixes the error, if you can.
Thanks !
… On Mar 29, 2021, at 07:54, Edouard Belval ***@***.***> wrote:
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.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
Belval commented
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
ovalhub commented
Thank you, this is much more useful !
I'm not setup with docker but the error you included is easy enough to
understand and my removing of the (MeasureUnit *) casts that were there
earlier was the wrong thing to do. I restored them in front of all the
.clone() calls.
I checked in a fix just now.
…On Mon, 29 Mar 2021, Edouard Belval wrote:
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
```
--
You are receiving this because you commented.
Reply to this email directly or view it on GitHub:
#144 (comment)