This version (and some older versions) don't compile (with Python3.7) due to /var/tmp/portage/media-libs/opencv-3.4.1-r6/work/opencv-3.4.1/modules/python/src2/cv2.cpp: In function 'bool pyopencv_to(PyObject*, T&, const char*) [with T = cv::String; PyObject = _object]': /var/tmp/portage/media-libs/opencv-3.4.1-r6/work/opencv-3.4.1/modules/python/src2/cv2.cpp:889:34: error: invalid conversion from 'const char*' to 'char*' [-fpermissive] This can be fixed by --- a/modules/python/src2/cv2.cpp.ORIG 2019-04-23 18:21:34.011908756 +0200 +++ b/modules/python/src2/cv2.cpp 2019-04-23 18:28:52.520932776 +0200 @@ -886,7 +886,7 @@ (void)name; if(!obj || obj == Py_None) return true; - char* str = PyString_AsString(obj); + const char* str = PyString_AsString(obj); if(!str) return false; value = String(str);
i am unable to apply your suggested patch http://dpaste.com/0BQFGT0 build log http://dpaste.com/06AEWXF --info http://dpaste.com/2KMZKJ6 -pqv
it works, thanks! @picarica: I've placed the patch in /etc/portage/patches/media-libs/opencv-3.4.1-r6/ , too - compiles fine.
(In reply to Alex from comment #2) > it works, thanks! > > @picarica: I've placed the patch in > /etc/portage/patches/media-libs/opencv-3.4.1-r6/ , too - compiles fine. I can also confirm the patch works .
(In reply to Alex from comment #2) > it works, thanks! > > @picarica: I've placed the patch in > /etc/portage/patches/media-libs/opencv-3.4.1-r6/ , too - compiles fine. ACK. Works for me, too.
Thanks for your patch, but when did we stop attaching build.log to bugs?
*** Bug 691558 has been marked as a duplicate of this bug. ***
Created attachment 586104 [details] opencv build.log
Yes, the proposed patch works
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f94b3d13ae8e6a49cea026ee62d70f2b07f9d2d7 commit f94b3d13ae8e6a49cea026ee62d70f2b07f9d2d7 Author: Alexey Shvetsov <alexxy@gentoo.org> AuthorDate: 2019-08-10 20:13:38 +0000 Commit: Alexey Shvetsov <alexxy@gentoo.org> CommitDate: 2019-08-10 20:14:51 +0000 media-libs/opencv: Fix py3.7 build Follwoup to ac064acc48d43d7bfbf12c0985c5b0667454600b Closes: https://bugs.gentoo.org/691480 Package-Manager: Portage-2.3.71, Repoman-2.3.17 Signed-off-by: Alexey Shvetsov <alexxy@gentoo.org> media-libs/opencv/files/opencv-3.4.1-python37.patch | 12 ++++++++++++ media-libs/opencv/opencv-3.4.1-r6.ebuild | 1 + 2 files changed, 13 insertions(+)