cxfksword / MPVKit

mpv library for iOS, macOS, tvOS applications
GNU General Public License v3.0
71 stars 19 forks source link

Build error when using `main` branch #12

Closed arekf closed 5 months ago

arekf commented 6 months ago

Hello, I tried to upgrade the library in Yattee, but it started failing during GitHub actions build:

local binary target 'Libshaderc_combined' does not contain expected binary artifact named 'Libshaderc_combined'local binary target 'Libplacebo' does not contain expected binary artifact named 'Libplacebo'2024-01-14 11:51:57.098 xcodebuild[6128:29339] Writing error result bundle to /var/folders/qv/pdh5wsgn0lq3dp77zj602b5c0000gn/T/ResultBundle_2024-14-01_11-51-0057.xcresult
fatalErrorxcodebuild: error: Could not resolve package dependencies:
  local binary target 'Libshaderc_combined' does not contain expected binary artifact named 'Libshaderc_combined'
  local binary target 'Libplacebo' does not contain expected binary artifact named 'Libplacebo'
  fatalError

Full build logs: logs_141.zip

For the time being I've locked MPVKit to the revision dca1e345a26d09a3d621d7656a94e6427f3f7b83 which works fine.

If you could look into this would be appreciated. Let me know if I can provide any more info.

cxfksword commented 6 months ago

swift run will check binaryTarget exists, you can delete new binaryTarget first in Package.swift, after build and add it back

arekf commented 6 months ago

Hi @cxfksword, sorry I might have confused you with this issue. I am not trying to build/run mpv using swift run. MPVKit is added as dependency to Yattee and the issue occurs while during Yattee build it is trying to resolve dependencies. It worked fine until one of recent changes. Not sure if/how should I apply the fix you mentioned in your comment. Please kindly explain if I need to do some changes Yattee-side or is this something that should be fixed with MPVKit.

cxfksword commented 6 months ago

Have you tried using latest commit id or version 0.37.0-alpha, not using main? it looks like xcodebuild uses an old cache and is not updated to the latest version

arekf commented 5 months ago

Unfortunately still running into this issue when trying to use 0.37.0. Reverting to 0.36.0 still works. I don't see xcodebuild being able to cache within GitHub Actions.

cxfksword commented 5 months ago

Unfortunately still running into this issue when trying to use 0.37.0. Reverting to 0.36.0 still works. I don't see xcodebuild being able to cache within GitHub Actions.

i have fix the typo, you can try again

arekf commented 5 months ago

Still one more to fix? Now getting only this:

local binary target 'Libluajit' does not contain expected binary artifact named 'Libluajit'

arekf commented 5 months ago

Hi @cxfksword, unfortunately still getting errors while trying to use 0.37.0:

Error: While building for iOS, no library for this platform was found in '/Users/runner/Library/Developer/Xcode/DerivedData/Yattee-ghklohtdsbiqoiefdbtlfsucecwh/SourcePackages/checkouts/MPVKit/Sources/Libbluray.xcframework'. (in target 'MPVKit' from project 'MPVKit')
cxfksword commented 5 months ago

Hi @cxfksword, unfortunately still getting errors while trying to use 0.37.0:

Error: While building for iOS, no library for this platform was found in '/Users/runner/Library/Developer/Xcode/DerivedData/Yattee-ghklohtdsbiqoiefdbtlfsucecwh/SourcePackages/checkouts/MPVKit/Sources/Libbluray.xcframework'. (in target 'MPVKit' from project 'MPVKit')

Look like also swift 5.7 bug: https://github.com/apple/swift-package-manager/issues/4388, you can try upgrade to xcode 14.3 and swift 5.8.

arekf commented 5 months ago

Look like also swift 5.7 bug: apple/swift-package-manager#4388, you can try upgrade to xcode 14.3 and swift 5.8.

Thank you, upgrade to Xcode 14.3.1 on macOS 13 fixed the issue.