twof / osxdotool

xdotool for macOS
10 stars 0 forks source link

Does not build on Mojave #1

Open Niek opened 6 years ago

Niek commented 6 years ago
Showing Recent Issues

Prepare build
note: Using new build systemnote: Planning buildnote: Using build description from memory

Build target osxdotoolPackageDescription of project osxdotool with configuration Debug

CompileSwiftSources normal x86_64 com.apple.xcode.tools.swift.compiler (in target: osxdotoolPackageDescription)
    cd /Users/n/Documents/Code/osxdotool
    export DEVELOPER_DIR=/Applications/Xcode.app/Contents/Developer
    export SDKROOT=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc -incremental -module-name osxdotoolPackageDescription -Onone -enable-batch-mode -enforce-exclusivity=checked -DSWIFT_PACKAGE -swift-version 4 -I /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/pm/4 -target x86_64-apple-macosx10.10 -sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk -sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -target x86_64-apple-macosx10.10 -g -module-cache-path /Users/n/Library/Developer/Xcode/DerivedData/ModuleCache.noindex -Xfrontend -serialize-debugging-options -index-store-path /Users/n/Library/Developer/Xcode/DerivedData/osxdotool-gjtiwuuamlxhgcciseyodtmgvhmi/Index/DataStore -swift-version 4 -I /Users/n/Library/Developer/Xcode/DerivedData/osxdotool-gjtiwuuamlxhgcciseyodtmgvhmi/Build/Products/Debug -F /Users/n/Library/Developer/Xcode/DerivedData/osxdotool-gjtiwuuamlxhgcciseyodtmgvhmi/Build/Products/Debug -c -j4 /Users/n/Documents/Code/osxdotool/Sources/osxdotoolCore/Helpers/AccessibilityHelper.swift /Users/n/Documents/Code/osxdotool/Package.swift -output-file-map /Users/n/Library/Developer/Xcode/DerivedData/osxdotool-gjtiwuuamlxhgcciseyodtmgvhmi/Build/Intermediates.noindex/osxdotool.build/Debug/osxdotoolPackageDescription.build/Objects-normal/x86_64/osxdotoolPackageDescription-OutputFileMap.json -parseable-output -serialize-diagnostics -emit-dependencies -emit-module -emit-module-path /Users/n/Library/Developer/Xcode/DerivedData/osxdotool-gjtiwuuamlxhgcciseyodtmgvhmi/Build/Intermediates.noindex/osxdotool.build/Debug/osxdotoolPackageDescription.build/Objects-normal/x86_64/osxdotoolPackageDescription.swiftmodule -Xcc -I/Users/n/Library/Developer/Xcode/DerivedData/osxdotool-gjtiwuuamlxhgcciseyodtmgvhmi/Build/Intermediates.noindex/osxdotool.build/Debug/osxdotoolPackageDescription.build/swift-overrides.hmap -Xcc -I/Users/n/Library/Developer/Xcode/DerivedData/osxdotool-gjtiwuuamlxhgcciseyodtmgvhmi/Build/Products/Debug/include -Xcc -I/Users/n/Library/Developer/Xcode/DerivedData/osxdotool-gjtiwuuamlxhgcciseyodtmgvhmi/Build/Intermediates.noindex/osxdotool.build/Debug/osxdotoolPackageDescription.build/DerivedSources/x86_64 -Xcc -I/Users/n/Library/Developer/Xcode/DerivedData/osxdotool-gjtiwuuamlxhgcciseyodtmgvhmi/Build/Intermediates.noindex/osxdotool.build/Debug/osxdotoolPackageDescription.build/DerivedSources -emit-objc-header -emit-objc-header-path /Users/n/Library/Developer/Xcode/DerivedData/osxdotool-gjtiwuuamlxhgcciseyodtmgvhmi/Build/Intermediates.noindex/osxdotool.build/Debug/osxdotoolPackageDescription.build/Objects-normal/x86_64/osxdotoolPackageDescription-Swift.h -Xcc -working-directory/Users/n/Documents/Code/osxdotool

CompileSwift normal x86_64 /Users/n/Documents/Code/osxdotool/Sources/osxdotoolCore/Helpers/AccessibilityHelper.swift (in target: osxdotoolPackageDescription)
    cd /Users/n/Documents/Code/osxdotool
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift -frontend -c -primary-file /Users/n/Documents/Code/osxdotool/Sources/osxdotoolCore/Helpers/AccessibilityHelper.swift /Users/n/Documents/Code/osxdotool/Package.swift -emit-module-path /Users/n/Library/Developer/Xcode/DerivedData/osxdotool-gjtiwuuamlxhgcciseyodtmgvhmi/Build/Intermediates.noindex/osxdotool.build/Debug/osxdotoolPackageDescription.build/Objects-normal/x86_64/AccessibilityHelper~partial.swiftmodule -emit-module-doc-path /Users/n/Library/Developer/Xcode/DerivedData/osxdotool-gjtiwuuamlxhgcciseyodtmgvhmi/Build/Intermediates.noindex/osxdotool.build/Debug/osxdotoolPackageDescription.build/Objects-normal/x86_64/AccessibilityHelper~partial.swiftdoc -serialize-diagnostics-path /Users/n/Library/Developer/Xcode/DerivedData/osxdotool-gjtiwuuamlxhgcciseyodtmgvhmi/Build/Intermediates.noindex/osxdotool.build/Debug/osxdotoolPackageDescription.build/Objects-normal/x86_64/AccessibilityHelper.dia -emit-dependencies-path /Users/n/Library/Developer/Xcode/DerivedData/osxdotool-gjtiwuuamlxhgcciseyodtmgvhmi/Build/Intermediates.noindex/osxdotool.build/Debug/osxdotoolPackageDescription.build/Objects-normal/x86_64/AccessibilityHelper.d -emit-reference-dependencies-path /Users/n/Library/Developer/Xcode/DerivedData/osxdotool-gjtiwuuamlxhgcciseyodtmgvhmi/Build/Intermediates.noindex/osxdotool.build/Debug/osxdotoolPackageDescription.build/Objects-normal/x86_64/AccessibilityHelper.swiftdeps -target x86_64-apple-macosx10.10 -enable-objc-interop -sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -I /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/pm/4 -I /Users/n/Library/Developer/Xcode/DerivedData/osxdotool-gjtiwuuamlxhgcciseyodtmgvhmi/Build/Products/Debug -F /Users/n/Library/Developer/Xcode/DerivedData/osxdotool-gjtiwuuamlxhgcciseyodtmgvhmi/Build/Products/Debug -g -module-cache-path /Users/n/Library/Developer/Xcode/DerivedData/ModuleCache.noindex -swift-version 4 -enforce-exclusivity=checked -Onone -D SWIFT_PACKAGE -serialize-debugging-options -Xcc -I/Users/n/Library/Developer/Xcode/DerivedData/osxdotool-gjtiwuuamlxhgcciseyodtmgvhmi/Build/Intermediates.noindex/osxdotool.build/Debug/osxdotoolPackageDescription.build/swift-overrides.hmap -Xcc -I/Users/n/Library/Developer/Xcode/DerivedData/osxdotool-gjtiwuuamlxhgcciseyodtmgvhmi/Build/Products/Debug/include -Xcc -I/Users/n/Library/Developer/Xcode/DerivedData/osxdotool-gjtiwuuamlxhgcciseyodtmgvhmi/Build/Intermediates.noindex/osxdotool.build/Debug/osxdotoolPackageDescription.build/DerivedSources/x86_64 -Xcc -I/Users/n/Library/Developer/Xcode/DerivedData/osxdotool-gjtiwuuamlxhgcciseyodtmgvhmi/Build/Intermediates.noindex/osxdotool.build/Debug/osxdotoolPackageDescription.build/DerivedSources -Xcc -working-directory/Users/n/Documents/Code/osxdotool -module-name osxdotoolPackageDescription -o /Users/n/Library/Developer/Xcode/DerivedData/osxdotool-gjtiwuuamlxhgcciseyodtmgvhmi/Build/Intermediates.noindex/osxdotool.build/Debug/osxdotoolPackageDescription.build/Objects-normal/x86_64/AccessibilityHelper.o -index-store-path /Users/n/Library/Developer/Xcode/DerivedData/osxdotool-gjtiwuuamlxhgcciseyodtmgvhmi/Index/DataStore -index-system-modules

/Users/n/Documents/Code/osxdotool/Sources/osxdotoolCore/Helpers/AccessibilityHelper.swift:28:58: error: cannot convert value of type 'AnyObject?' to expected argument type 'AXUIElement'
        AXUIElementCopyAttributeValue(applicationElement.pointee,
                                      ~~~~~~~~~~~~~~~~~~~^~~~~~~
                                                                 as! AXUIElement
/Users/n/Documents/Code/osxdotool/Sources/osxdotoolCore/Helpers/AccessibilityHelper.swift:35:53: warning: forced cast from 'AXUIElement?' to 'AXUIElement' only unwraps optionals; did you mean to use '!'?
        AXUIElementGetPid(elementAtPosition.pointee as! AXUIElement, windowPID)
                          ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
                                                   ! 
/Users/n/Documents/Code/osxdotool/Sources/osxdotoolCore/Helpers/AccessibilityHelper.swift:38:51: error: 'CFString' is not implicitly convertible to 'String'; did you mean to use 'as' to explicitly convert?
        let _window: String = windowTitle.pointee as! CFString
                                                  ^
                              (                               ) as String
/Users/n/Documents/Code/osxdotool/Sources/osxdotoolCore/Helpers/AccessibilityHelper.swift:39:60: error: 'CFString' is not implicitly convertible to 'String'; did you mean to use 'as' to explicitly convert?
        let _application: String = applicationName.pointee as! CFString
                                                           ^
                                   (                                   ) as String

Build failed    18/10/2018, 22:48    0.3 seconds
twof commented 6 years ago

I'm honestly not sure if this was building on earlier versions of macOS. Were you using it previously? Apple may have updated their accessibility APIs, but I'm not sure. I'd be very happy if they did because the old ones were a huge pain.