OrcaSlicer icon indicating copy to clipboard operation
OrcaSlicer copied to clipboard

Feature/build target 10.15

Open kpishere opened this issue 1 year ago • 10 comments

These changes allow for OrcaSlicer to build on a MacOS Catalina machine (10.15).

They are not significant changes, just more explicit typing of a few templates that were missing this declaration.

k.

kpishere avatar Dec 23 '23 17:12 kpishere

The problem I had with 10.15 version is this error: [build] /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/System/Library/Frameworks/WebKit.framework/Headers/WKDownloadDelegate.h:88:1: note: annotate 'downloadDidFinish:' with an availability attribute to silence this warning [build] - (void)downloadDidFinish:(WKDownload *)download; [build] ^ [build] API_AVAILABLE(macos(11.3)) [build] /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/System/Library/Frameworks/WebKit.framework/Headers/WKDownloadDelegate.h:95:19: error: 'WKDownload' is only available on macOS 11.3 or newer [-Werror,-Wunguarded-availability-new] [build] - (void)download:(WKDownload *)download didFailWithError:(NSError *)error resumeData:(nullable NSData *)resumeData; [build] ^ [build] /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/System/Library/Frameworks/WebKit.framework/Headers/WKDownload.h:37:12: note: 'WKDownload' has been marked as being introduced in macOS 11.3 here, but the deployment target is macOS 10.15.0 [build] @interface WKDownload : NSObject<NSProgressReporting> [build] ^ [build] /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/System/Library/Frameworks/WebKit.framework/Headers/WKDownloadDelegate.h:95:1: note: annotate 'download:didFailWithError:resumeData:' with an availability attribute to silence this warning [build] - (void)download:(WKDownload *)download didFailWithError:(NSError *)error resumeData:(nullable NSData *)resumeData; [build] ^ [build] API_AVAILABLE(macos(11.3)) [build] /Users/lijac/oss/OrcaSlicer/src/slic3r/Utils/MacDarkMode.mm:54:86: warning: instance method '-titlebarViewController' not found (return type defaults to 'id') [-Wobjc-method-access] [build] NSEnumerator viewEnum = [[[[[[[(NSView) window window] contentView] superview] titlebarViewController] view] subviews] objectEnumerator]; [build] ^~~~~~~~~~~~~~~~~~~~~~ [build] /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSView.h:81:12: note: receiver is instance of class declared here [build] @interface NSView : NSResponder <NSAnimatablePropertyContainer, NSUserInterfaceItemIdentification, NSDraggingDestination, NSAppearanceCustomization, NSAccessibilityElement, NSAccessibility>

SoftFever avatar Dec 25 '23 05:12 SoftFever

@SoftFever I think I may have gotten that error too, when I'd only updated CMakeLists.txt in top folder, then I'd found the other in another folder, updated that too, then deleted ./build_x86_64, and re-built the entire thing. It was OK then.

kpishere avatar Dec 26 '23 19:12 kpishere

build.log

I've attached my build log for reference.

kpishere avatar Dec 26 '23 20:12 kpishere

build.log

I've attached my build log for reference.

The cause looks different. You have SDK 11.1 which seems fine with 10.15 target. On my machine, I only have these SDK MacOSX.sdk MacOSX14.2.sdk MacOSX14.sdk

Let me take a look how to install older SDKS

SoftFever avatar Dec 27 '23 07:12 SoftFever

build.log

I've attached my build log for reference.

It's tricky. SDK 13.1 onwards don't support 10.15 target. And SDK 13.1 doesn't support new OS X like Sonoma...

SoftFever avatar Dec 27 '23 08:12 SoftFever

I see. Apple's planned obsolescence. X_tards. Did your build server build it? it looked like it did in the past checks if I understand correctly. Could I upload my build binary somewhere? To verify it works on later systems if that were of interest?

kpishere avatar Dec 28 '23 22:12 kpishere

I see. Apple's planned obsolescence. X_tards. Did your build server build it? it looked like it did in the past checks if I understand correctly. Could I upload my build binary somewhere? To verify it works on later systems if that were of interest?

I have a solution :) Let me push some changes in this PR.

SoftFever avatar Dec 29 '23 12:12 SoftFever

Did your build server build it? it looked like it did in the past checks if I understand correctly.

Yes, I use Github Actions to build it. It's using an old version of OS X(macos 12) so it has no issues. Anyway, I made some changes so that the build farm will build for 10.15 while developers who's using latest OS can still target for 11.3.

I actually need your help to verify if it's indeed work on older Mac OS as I don't have them. You can get the built binaries here once it's done: https://github.com/SoftFever/OrcaSlicer/actions/runs/7357163156/job/20028356772?pr=3252

SoftFever avatar Dec 29 '23 13:12 SoftFever

It initially did not work (error below from console) but after applying the following change, it worked. The popup dialog error message is: "OrcaSlicer.app" is damaged and can't be opened. You should move it to the trash. This is a ridiculous message, after applying the xattr change below, it worked. For testing, I merely opened the app and loaded an STL file and that is it.

xattr -d com.apple.quarantine /Applications/OrcaSlicer.app

Notice that the parameter 'r' isn't needed or valid for 10.15.

15:42:24.708226-0500	default	lsd	Non-fatal error enumerating at <private>, continuing: Error Domain=NSCocoaErrorDomain Code=260 "The file “PlugIns” couldn’t be opened because there is no such file." UserInfo={NSURL=PlugIns/ -- file:///Applications/OrcaSlicer.app/Contents/, NSFilePath=/Applications/OrcaSlicer.app/Contents/PlugIns, NSUnderlyingError=0x7fdcd3c301e0 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}}
15:42:24.708563-0500	default	lsd	- 45683955: Checking whether application is managed at file:///Applications/OrcaSlicer.app/com.softfever3d.orca-slicer
15:42:24.769782-0500	default	Finder	LAUNCHING:0x0-0x7cfacf3 OrcaSlicer foreground=1 bringForward=1 seed=4452 userActivityCount=0
15:42:24.850811-0500	default	loginwindow	-[PersistentAppsSupport applicationReady:] | App: OrcaSlicer, ready, updating active tracking timer
15:42:24.857611-0500	default	runningboardd	Resolved pid 72793 to [executable<OrcaSlicer(501)>:72793]
15:42:24.851332-0500	default	loginwindow	-[ApplicationManager checkInAppContext:eventData:] | ApplicationManager: Checked in app : OrcaSlicer
15:42:24.871377-0500	default	runningboardd	[executable<OrcaSlicer(501)>:72793] This process will not be managed.
15:42:24.871675-0500	default	runningboardd	Now tracking process: [executable<OrcaSlicer(501)>:72793]
15:42:24.875017-0500	default	runningboardd	Acquiring assertion targeting executable<OrcaSlicer(501)> from originator [daemon<com.apple.coreservices.launchservicesd>:162] with description <RBSAssertionDescriptor; foregroundApp:72793; ID: 337-162-67833; target: 72793> attributes = {
    <RBSDomainAttribute: 0x7fb32951a430; domain: com.apple.launchservicesd; name: RoleUserInteractiveNonFocal; sourceEnvironment: 0x0>;
}
15:42:24.875823-0500	default	runningboardd	Assertion 337-162-67833 (target:executable<OrcaSlicer(501)>) will be created as active
15:42:24.877769-0500	default	runningboardd	Acquiring assertion targeting executable<OrcaSlicer(501)> from originator [daemon<com.apple.coreservices.launchservicesd>:162] with description <RBSAssertionDescriptor; foregroundApp:72793; ID: 337-162-67834; target: 72793> attributes = {
    <RBSDomainAttribute: 0x7fb32951a350; domain: com.apple.launchservicesd; name: RoleUserInteractiveNonFocal; sourceEnvironment: 0x0>;
}
15:42:24.878180-0500	default	runningboardd	Assertion 337-162-67834 (target:executable<OrcaSlicer(501)>) will be created as active
15:42:24.878806-0500	default	runningboardd	[executable<OrcaSlicer(501)>:72793] Ignoring jetsam update because this process is not memory-managed
15:42:24.878577-0500	default	runningboardd	Finished acquiring assertion 337-162-67833 (target:executable<OrcaSlicer(501)>)
15:42:24.879208-0500	default	runningboardd	[executable<OrcaSlicer(501)>:72793] Ignoring resume because this process is not lifecycle managed
15:42:24.879520-0500	default	runningboardd	[executable<OrcaSlicer(501)>:72793] Set darwin role to: UserInteractiveNonFocal
15:42:24.880465-0500	default	runningboardd	[executable<OrcaSlicer(501)>:72793] Ignoring GPU update because this process is not GPU managed
15:42:24.880817-0500	default	runningboardd	Finished acquiring assertion 337-162-67834 (target:executable<OrcaSlicer(501)>)
15:42:24.880824-0500	default	runningboardd	Invalidating assertion 337-162-67833 (target:executable<OrcaSlicer(501)>) from originator 162
15:43:00.705318-0500	default	runningboardd	[executable<OrcaSlicer(501)>:72793] Death sentinel fired!
15:43:00.750070-0500	default	runningboardd	Invalidating assertion 337-162-67834 (target:executable<OrcaSlicer(501)>) from originator 162
15:43:00.730568-0500	default	loginwindow	-[PersistentAppsSupport applicationQuit:] | for app:OrcaSlicer, _appTrackingState = 2
15:43:00.730618-0500	default	loginwindow	-[PersistentAppsSupport applicationQuit:] | App: OrcaSlicer, quit, updating active tracking timer
15:43:00.812151-0500	default	runningboardd	Removing process: [executable<OrcaSlicer(501)>:72793]
15:43:00.812613-0500	default	runningboardd	Removing assertions for terminated process: [executable<OrcaSlicer(501)>:72793]
15:43:00.874938-0500	error	runningboardd	RBSStateCapture remove item called for untracked item 337-162-67834 (target:executable<OrcaSlicer(501)>)

kpishere avatar Dec 29 '23 20:12 kpishere

It initially did not work (error below from console) but after applying the following change, it worked. The popup dialog error message is: "OrcaSlicer.app" is damaged and can't be opened. You should move it to the trash. This is a ridiculous message, after applying the xattr change below, it worked. For testing, I merely opened the app and loaded an STL file and that is it.

xattr -d com.apple.quarantine /Applications/OrcaSlicer.app

Notice that the parameter 'r' isn't needed or valid for 10.15.

15:42:24.708226-0500	default	lsd	Non-fatal error enumerating at <private>, continuing: Error Domain=NSCocoaErrorDomain Code=260 "The file “PlugIns” couldn’t be opened because there is no such file." UserInfo={NSURL=PlugIns/ -- file:///Applications/OrcaSlicer.app/Contents/, NSFilePath=/Applications/OrcaSlicer.app/Contents/PlugIns, NSUnderlyingError=0x7fdcd3c301e0 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}}
15:42:24.708563-0500	default	lsd	- 45683955: Checking whether application is managed at file:///Applications/OrcaSlicer.app/com.softfever3d.orca-slicer
15:42:24.769782-0500	default	Finder	LAUNCHING:0x0-0x7cfacf3 OrcaSlicer foreground=1 bringForward=1 seed=4452 userActivityCount=0
15:42:24.850811-0500	default	loginwindow	-[PersistentAppsSupport applicationReady:] | App: OrcaSlicer, ready, updating active tracking timer
15:42:24.857611-0500	default	runningboardd	Resolved pid 72793 to [executable<OrcaSlicer(501)>:72793]
15:42:24.851332-0500	default	loginwindow	-[ApplicationManager checkInAppContext:eventData:] | ApplicationManager: Checked in app : OrcaSlicer
15:42:24.871377-0500	default	runningboardd	[executable<OrcaSlicer(501)>:72793] This process will not be managed.
15:42:24.871675-0500	default	runningboardd	Now tracking process: [executable<OrcaSlicer(501)>:72793]
15:42:24.875017-0500	default	runningboardd	Acquiring assertion targeting executable<OrcaSlicer(501)> from originator [daemon<com.apple.coreservices.launchservicesd>:162] with description <RBSAssertionDescriptor; foregroundApp:72793; ID: 337-162-67833; target: 72793> attributes = {
    <RBSDomainAttribute: 0x7fb32951a430; domain: com.apple.launchservicesd; name: RoleUserInteractiveNonFocal; sourceEnvironment: 0x0>;
}
15:42:24.875823-0500	default	runningboardd	Assertion 337-162-67833 (target:executable<OrcaSlicer(501)>) will be created as active
15:42:24.877769-0500	default	runningboardd	Acquiring assertion targeting executable<OrcaSlicer(501)> from originator [daemon<com.apple.coreservices.launchservicesd>:162] with description <RBSAssertionDescriptor; foregroundApp:72793; ID: 337-162-67834; target: 72793> attributes = {
    <RBSDomainAttribute: 0x7fb32951a350; domain: com.apple.launchservicesd; name: RoleUserInteractiveNonFocal; sourceEnvironment: 0x0>;
}
15:42:24.878180-0500	default	runningboardd	Assertion 337-162-67834 (target:executable<OrcaSlicer(501)>) will be created as active
15:42:24.878806-0500	default	runningboardd	[executable<OrcaSlicer(501)>:72793] Ignoring jetsam update because this process is not memory-managed
15:42:24.878577-0500	default	runningboardd	Finished acquiring assertion 337-162-67833 (target:executable<OrcaSlicer(501)>)
15:42:24.879208-0500	default	runningboardd	[executable<OrcaSlicer(501)>:72793] Ignoring resume because this process is not lifecycle managed
15:42:24.879520-0500	default	runningboardd	[executable<OrcaSlicer(501)>:72793] Set darwin role to: UserInteractiveNonFocal
15:42:24.880465-0500	default	runningboardd	[executable<OrcaSlicer(501)>:72793] Ignoring GPU update because this process is not GPU managed
15:42:24.880817-0500	default	runningboardd	Finished acquiring assertion 337-162-67834 (target:executable<OrcaSlicer(501)>)
15:42:24.880824-0500	default	runningboardd	Invalidating assertion 337-162-67833 (target:executable<OrcaSlicer(501)>) from originator 162
15:43:00.705318-0500	default	runningboardd	[executable<OrcaSlicer(501)>:72793] Death sentinel fired!
15:43:00.750070-0500	default	runningboardd	Invalidating assertion 337-162-67834 (target:executable<OrcaSlicer(501)>) from originator 162
15:43:00.730568-0500	default	loginwindow	-[PersistentAppsSupport applicationQuit:] | for app:OrcaSlicer, _appTrackingState = 2
15:43:00.730618-0500	default	loginwindow	-[PersistentAppsSupport applicationQuit:] | App: OrcaSlicer, quit, updating active tracking timer
15:43:00.812151-0500	default	runningboardd	Removing process: [executable<OrcaSlicer(501)>:72793]
15:43:00.812613-0500	default	runningboardd	Removing assertions for terminated process: [executable<OrcaSlicer(501)>:72793]
15:43:00.874938-0500	error	runningboardd	RBSStateCapture remove item called for untracked item 337-162-67834 (target:executable<OrcaSlicer(501)>)

Cool, thanks.

Yeah we don't digi-sign and notary PR build hence the xttar command is required. I will do a sanity test on M1 and x86's newer OS, if all good we can merge this.

SoftFever avatar Dec 30 '23 00:12 SoftFever

All good now Merged 👍

SoftFever avatar Dec 30 '23 01:12 SoftFever