[MacPorts] #72593: opencv4 @4.5.0: error: no viable overloaded '=' (was: opencv4 fails to build on OS X 10.6.8)

MacPorts noreply at macports.org
Tue Jun 10 09:30:31 UTC 2025


#72593: opencv4 @4.5.0: error: no viable overloaded '='
-------------------------+-------------------------
  Reporter:  NucleaPeon  |      Owner:  mascguy
      Type:  defect      |     Status:  assigned
  Priority:  Normal      |  Milestone:
 Component:  ports       |    Version:  2.10.7
Resolution:              |   Keywords:  snowleopard
      Port:  opencv4     |
-------------------------+-------------------------
Changes (by ryandesign):

 * status:  new => assigned
 * keywords:  opencv, build => snowleopard
 * owner:  (none) => mascguy


Comment:

 The log says the reason for the failure was:

 {{{
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_graphics_opencv4/opencv4/work/opencv4-4.5.0/modules/highgui/src/window_cocoa.mm:249:65:
 warning: instance method '-convertSizeFromBacking:' not found (return type
 defaults to 'id') [-Wobjc-method-access]
                         scaledImageSize = [[window contentView]
 convertSizeFromBacking:imageSize];
 ^~~~~~~~~~~~~~~~~~~~~~
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_graphics_opencv4/opencv4/work/opencv4-4.5.0/modules/highgui/src/window_cocoa.mm:85:12:
 note: receiver is instance of class declared here
 @interface CVView : NSView
            ^
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_graphics_opencv4/opencv4/work/opencv4-4.5.0/modules/highgui/src/window_cocoa.mm:249:41:
 error: no viable overloaded '='
                         scaledImageSize = [[window contentView]
 convertSizeFromBacking:imageSize];
                         ~~~~~~~~~~~~~~~ ^
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 /System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGGeometry.h:21:8:
 note: candidate function (the implicit copy assignment operator) not
 viable: no known conversion from 'id' to 'const CGSize' for 1st argument
 struct CGSize {
        ^
 /System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGGeometry.h:21:8:
 note: candidate function (the implicit move assignment operator) not
 viable: no known conversion from 'id' to 'CGSize' for 1st argument
 1 warning and 1 error generated.
 make[2]: ***
 [modules/highgui/CMakeFiles/opencv_highgui.dir/src/window_cocoa.mm.o]
 Error 1
 make[2]: Leaving directory
 `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_graphics_opencv4/opencv4/work/build'
 make[1]: *** [modules/highgui/CMakeFiles/opencv_highgui.dir/all] Error 2
 make[1]: *** Waiting for unfinished jobs....
 }}}

 (Followed by many more errors.) We see the same on our 10.6 build machine:

 https://build.macports.org/builders/ports-10.6_x86_64-builder/builds/238774

-- 
Ticket URL: <https://trac.macports.org/ticket/72593#comment:2>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list