Bug#936932: libvigraimpex: Python2 removal in sid/bullseye

Andreas Metzler ametzler at bebt.de
Sat Dec 21 07:28:04 GMT 2019


On 2019-10-01 Andreas Tille <tille at debian.org> wrote:
> Control: tags -1 help

> Hi,

> I tried hard to port libvigraimpex to Python3 in Git[1] and think I
> managed.

Hello Andreas,

I did not get far trying to build what is currently on salsa:

make[1]: Entering directory '/tmp/VIGRA/libvigraimpex-1.11.1'
mkdir -p obj.python3.8/
cd obj.python3.8/ && CXXFLAGS=-fno-strict-aliasing cmake .. -DCMAKE_INSTALL_PREFIX=/usr -DLIB_SUFFIX="/x86_64-linux-gnu/" -DCMAKE_VERBOSE_MAKEFILE=ON -DWITH_OPENEXR=ON -DCMAKE_C_FLAGS_RELEASE="-g -O2 -fdebug-prefix-map=/tmp/VIGRA/libvigraimpex-1.11.1=. -fstack-protector-strong -Wformat -Werror=format-security -pipe -Wdate-time -D_FORTIFY_SOURCE=2" -DCMAKE_CXX_FLAGS_RELEASE="-g -O2 -fdebug-prefix-map=/tmp/VIGRA/libvigraimpex-1.11.1=. -fstack-protector-strong -Wformat -Werror=format-security -pipe -Wdate-time -D_FORTIFY_SOURCE=2" -DCMAKE_SHARED_LINKER_FLAGS_RELEASE="-Wl,-z,relro -Wl,--as-needed -Wl,-z,now"  -DPYTHON_EXECUTABLE=/usr/bin/python3.8 3.7 -DPYTHON_INCLUDE_DIR=/usr/include/python3.8 3.7/ -DPYTHON_LIBRARY=/usr/lib/x86_64-linux-gnu/libpython3.8 3.7.so -DBoost_PYTHON_LIBRARY_RELEASE=/usr/lib/x86_64-linux-gnu/libboost_python-py38 37.so
CMake Error: The source directory "/tmp/VIGRA/libvigraimpex-1.11.1/obj.python3.8/37.so" does not exist.
Specify --help for usage, or press the help button on the CMake GUI.
make[1]: *** [debian/rules:89: obj.python3.8/CMakeCache.txt] Error 1


> Unfortunately there is a C++ error uncovered which I feel
> unable to fix:

> ...
> /build/libvigraimpex-1.11.1+dfsg/vigranumpy/src/core/vigranumpycore.cxx: In function 'vigra::UInt32 vigra::pychecksum(const boost::python::str&)':
> /build/libvigraimpex-1.11.1+dfsg/vigranumpy/src/core/vigranumpycore.cxx:64:39: error: invalid conversion from 'const char*' to 'char*' [-fpermissive]
>    64 |  char * data = PyUnicode_AsUTF8AndSize(s.ptr(), &size);
>       |                ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~
>       |                                       |
>       |                                       const char*
> make[4]: *** [vigranumpy/src/core/CMakeFiles/vigranumpy_core.dir/build.make:66: vigranumpy/src/core/CMakeFiles/vigranumpy_core.dir/vigranumpycore.cxx.o] Error 1
> make[4]: Leaving directory '/build/libvigraimpex-1.11.1+dfsg/obj.python3.7'


> Any help would be welcome (or Daniel feel free to continue from here).

I suspect Fedora's patch would help.
https://src.fedoraproject.org/rpms/vigra/blob/master/f/vigra-1.11.1.py37.patch

cu Andreas
-- 
`What a good friend you are to him, Dr. Maturin. His other friends are
so grateful to you.'
`I sew his ears on from time to time, sure'



More information about the debian-science-maintainers mailing list