#61196 closed defect (fixed)
root6: uses macOS 10.10/10.12 APIs
Reported by: | chrstphrchvz (Christopher Chavez) | Owned by: | cjones051073 (Chris Jones) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.6.3 |
Keywords: | Cc: | mojca (Mojca Miklavec), jasonliu-- (Jason Liu) | |
Port: | root6 |
Description
Does the cocoa build of root6 intend to remain compatible with macOS 10.11 and earlier, or has its minimum macOS requirement been raised? I notice that as of root6 @6.22.00
it no longer builds on 10.11 and earlier due to usage of NSWindowStyleMaskBorderless
(replacement for NSBorderlessWindowMask
), and additionally it no longer builds on 10.9 and earlier due to usage of the CGContext
property of NSGraphicsContext
(replacement for the graphicsPort
property):
[ 90%] Building CXX object graf2d/cocoa/CMakeFiles/GCocoa.dir/src/QuartzWindow.mm.o … /opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_science_root6/root6/work/root-6-22-00/graf2d/cocoa/src/QuartzWindow.mm:1135:40: error: property 'CGContext' not found on object of type 'NSGraphicsContext *' CGContextRef cgContext = nsContext.CGContext; ^ /opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_science_root6/root6/work/root-6-22-00/graf2d/cocoa/src/QuartzWindow.mm:1163:26: error: use of undeclared identifier 'NSWindowStyleMaskBorderless' self.styleMask = NSWindowStyleMaskBorderless; // No titlebar, buttons, etc. ^
Because these new APIs are replacements for existing ones, it might be possible to patch root6 and continue using it on older OS versions, assuming no other compatibility issues.
There is also an error I don't know the reason for:
/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_science_root6/root6/work/root-6-22-00/graf2d/cocoa/src/QuartzWindow.mm:1521:35: error: property 'frame' not found on object of type 'id' auto frame = self.contentView.frame; ^
Change History (8)
comment:1 Changed 4 years ago by cjones051073 (Chris Jones)
comment:2 Changed 4 years ago by cjones051073 (Chris Jones)
primarily as a test to see if X11 works (I have no other way right now to build on these platforms).
comment:3 Changed 4 years ago by kencu (Ken)
This is exactly where Jason's AppKit compatibility layer shows promise. <https://github.com/macports/macports-ports/blob/master/graphics/blender/files/old_appkit_compat/AppKit/AppKit.h>
He's using it in Blender with success. We're trying to see where it might be helpful, and whether it will be sufficiently more useful than harmful to include it in legacysupport someday perhaps.
comment:4 Changed 4 years ago by kencu (Ken)
Cc: | jasonliu-- added |
---|
comment:6 Changed 4 years ago by jasonliu-- (Jason Liu)
Not only is the file a success for Blender, but also MaterialX as well:
https://github.com/macports/macports-ports/pull/8438
I suspect that as time goes on, the number of software projects that completely get rid of any internal support for the deprecated AppKit enum constants will slowly increase.
comment:7 Changed 4 years ago by chrstphrchvz (Christopher Chavez)
I meant to add that I do not personally use this port. I merely saw it had build failures on https://ports.macports.org/port/root6/builds and am familiar with possible reasons why.
comment:8 Changed 4 years ago by cjones051073 (Chris Jones)
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Switching to X11 restores builds down to 10.9
https://ports.macports.org/port/root6/builds
For me, that resolves the issue well enough (I am not sure there is really much interest in this port on such old systems). If someone does come along who wishes to look into cocoa support, then great, but for now I'm going to close this.
I support older OSes as far as is practical, by using our own compilers etc., but I am not going to start patching the code to work around issues like this. Upstream themselves certainly do not support OSes as old as 10.11 (or older now). I personally don't use anything older than 10.13 (and that is itself an elderly 2011 mac mini that cannot run anything newer and I am likely to retire soon) so I am afraid I have no personal interest in these old systems.
If you really want to retain support on these platforms for the cocoa builds, then please go about seeing if upstream will accept patches.
otherwise, if the X11 variant still works on these platforms, that would be my preferred solution on these systems to retain some level of support.