Bug 241503 - graphics/opencv-core doesn't build
Summary: graphics/opencv-core doesn't build
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-10-26 14:00 UTC by D'Arcy J.M. Cain
Modified: 2019-12-27 13:58 UTC (History)
2 users (show)

See Also:


Attachments
graphics/opencv python 3.7 support (464 bytes, patch)
2019-11-29 21:17 UTC, Vladimir Druzenko
vvd: maintainer-approval?
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description D'Arcy J.M. Cain 2019-10-26 14:00:56 UTC
With warnings as errors it fails to build due to const/non-const difference.  Needs this patch:


 --- /tmp/cv2.cpp        2019-10-26 09:53:41.521527000 -0400
 +++ /usr/obj/usr/ports/graphics/opencv-core/work/opencv-3.4.1/modules/python/src2/cv2.cpp       2019-10-26 09:54:00.718930000 -0400
 @@ -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);
Comment 1 D'Arcy J.M. Cain 2019-11-24 16:40:41 UTC
Upgrading to a current version of opencv may fix this.
Comment 2 Vladimir Druzenko freebsd_committer freebsd_triage 2019-11-29 20:56:38 UTC
(In reply to D'Arcy J.M. Cain from comment #1)
I got same failure with python 3.7 as default instead 3.6. Upstream have the same patch in sources already. 
Can anybody commit this patch as temporary woraround before opencv 4 landed in ports?
Comment 3 Vladimir Druzenko freebsd_committer freebsd_triage 2019-11-29 21:17:38 UTC
Created attachment 209537 [details]
graphics/opencv python 3.7 support
Comment 5 Alexey Dokuchaev freebsd_committer freebsd_triage 2019-12-27 13:58:02 UTC
Fixed with ports r520008.