Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Cannot build native iOS libSkiaSharp with cake #2675

Closed
1 task done
bogdan799 opened this issue Nov 26, 2023 · 1 comment · Fixed by #2703
Closed
1 task done

[BUG] Cannot build native iOS libSkiaSharp with cake #2675

bogdan799 opened this issue Nov 26, 2023 · 1 comment · Fixed by #2703
Labels

Comments

@bogdan799
Copy link

bogdan799 commented Nov 26, 2023

Description

Upon trying to build native libSkiaSharp for iOS native lib got following linker error. I suppose I may have made a mistake somewhere, but the only change I've made was to set IOS_DEPLOYMENT_TARGET_VERSION in build.cake to 12 as long as I don't have 11 toolchain support anymore on macos sonoma.

PLEASE NOTE: I'm building from custom branch dev/glview as I want to get HW on MAUI. Actually I was successful even integrating Metal support for apple devices into MAUI, now I'm trying to expose more native skia to get tesselation to SKVertices, for which I have to have access to GrTriangulator

Steps to reproduce:

~/SkiaSharp/native/ios $ dotnet cake

Please see the output of linker below

Code

--

Expected Behavior

Expect the iOS skia native to build successfully

Actual Behavior

Building iOS native for skia fails at the linker stage

Version of SkiaSharp

Other (Please indicate in the description)

Last Known Good Version of SkiaSharp

Other (Please indicate in the description)

IDE / Editor

Other (Please indicate in the description)

Platform / Operating System

iOS

Platform / Operating System Version

No response

Devices

No response

Relevant Screenshots

No response

Relevant Log Output

duplicate symbol '__ZNK11skresources23CachingResourceProvider14loadImageAssetEPKcS2_S2_' in:
    ../../../externals/skia/out/iossimulator/x86_64/libskottie.a[73](libskresources.SkResources.o)
    ../../../externals/skia/out/iossimulator/x86_64/libskresources.a[2](libskresources.SkResources.o)
duplicate symbol '__ZNK11skresources28DataURIResourceProviderProxy14loadImageAssetEPKcS2_S2_' in:
    ../../../externals/skia/out/iossimulator/x86_64/libskottie.a[73](libskresources.SkResources.o)
    ../../../externals/skia/out/iossimulator/x86_64/libskresources.a[2](libskresources.SkResources.o)
duplicate symbol '__ZN11skresources20MultiFrameImageAsset12isMultiFrameEv' in:
    ../../../externals/skia/out/iossimulator/x86_64/libskottie.a[73](libskresources.SkResources.o)
    ../../../externals/skia/out/iossimulator/x86_64/libskresources.a[2](libskresources.SkResources.o)
duplicate symbol '__ZN11skresources23CachingResourceProviderC2E5sk_spINS_16ResourceProviderEE' in:
    ../../../externals/skia/out/iossimulator/x86_64/libskottie.a[73](libskresources.SkResources.o)
    ../../../externals/skia/out/iossimulator/x86_64/libskresources.a[2](libskresources.SkResources.o)
duplicate symbol '__ZN11skresources20FileResourceProvider4MakeE8SkStringb' in:
    ../../../externals/skia/out/iossimulator/x86_64/libskottie.a[73](libskresources.SkResources.o)
    ../../../externals/skia/out/iossimulator/x86_64/libskresources.a[2](libskresources.SkResources.o)
duplicate symbol '__ZN11skresources25ResourceProviderProxyBaseC2E5sk_spINS_16ResourceProviderEE' in:
    ../../../externals/skia/out/iossimulator/x86_64/libskottie.a[73](libskresources.SkResources.o)
    ../../../externals/skia/out/iossimulator/x86_64/libskresources.a[2](libskresources.SkResources.o)
duplicate symbol '__ZN11skresources23CachingResourceProviderC1E5sk_spINS_16ResourceProviderEE' in:
    ../../../externals/skia/out/iossimulator/x86_64/libskottie.a[73](libskresources.SkResources.o)
    ../../../externals/skia/out/iossimulator/x86_64/libskresources.a[2](libskresources.SkResources.o)
duplicate symbol '__ZNK11skresources25ResourceProviderProxyBase8loadFontEPKcS2_' in:
    ../../../externals/skia/out/iossimulator/x86_64/libskottie.a[73](libskresources.SkResources.o)
    ../../../externals/skia/out/iossimulator/x86_64/libskresources.a[2](libskresources.SkResources.o)
duplicate symbol '__ZTVN11skresources23CachingResourceProviderE' in:
    ../../../externals/skia/out/iossimulator/x86_64/libskottie.a[73](libskresources.SkResources.o)
    ../../../externals/skia/out/iossimulator/x86_64/libskresources.a[2](libskresources.SkResources.o)
duplicate symbol '__ZN11skresources10ImageAsset8getFrameEf' in:
    ../../../externals/skia/out/iossimulator/x86_64/libskottie.a[73](libskresources.SkResources.o)
    ../../../externals/skia/out/iossimulator/x86_64/libskresources.a[2](libskresources.SkResources.o)
duplicate symbol '__ZTVN11skresources25ResourceProviderProxyBaseE' in:
    ../../../externals/skia/out/iossimulator/x86_64/libskottie.a[73](libskresources.SkResources.o)
    ../../../externals/skia/out/iossimulator/x86_64/libskresources.a[2](libskresources.SkResources.o)
duplicate symbol '__ZNK11skresources28DataURIResourceProviderProxy12loadTypefaceEPKcS2_' in:
    ../../../externals/skia/out/iossimulator/x86_64/libskottie.a[73](libskresources.SkResources.o)
    ../../../externals/skia/out/iossimulator/x86_64/libskresources.a[2](libskresources.SkResources.o)
duplicate symbol '__ZNK11skresources25ResourceProviderProxyBase12loadTypefaceEPKcS2_' in:
    ../../../externals/skia/out/iossimulator/x86_64/libskottie.a[73](libskresources.SkResources.o)
    ../../../externals/skia/out/iossimulator/x86_64/libskresources.a[2](libskresources.SkResources.o)
duplicate symbol '__ZN11skresources25ResourceProviderProxyBaseC1E5sk_spINS_16ResourceProviderEE' in:
    ../../../externals/skia/out/iossimulator/x86_64/libskottie.a[73](libskresources.SkResources.o)
    ../../../externals/skia/out/iossimulator/x86_64/libskresources.a[2](libskresources.SkResources.o)
duplicate symbol '__ZN11skresources20MultiFrameImageAsset13generateFrameEf' in:
    ../../../externals/skia/out/iossimulator/x86_64/libskottie.a[73](libskresources.SkResources.o)
    ../../../externals/skia/out/iossimulator/x86_64/libskresources.a[2](libskresources.SkResources.o)
duplicate symbol '__ZTVN11skresources28DataURIResourceProviderProxyE' in:
    ../../../externals/skia/out/iossimulator/x86_64/libskottie.a[73](libskresources.SkResources.o)
    ../../../externals/skia/out/iossimulator/x86_64/libskresources.a[2](libskresources.SkResources.o)
duplicate symbol '__ZN11skresources20FileResourceProviderC2E8SkStringb' in:
    ../../../externals/skia/out/iossimulator/x86_64/libskottie.a[73](libskresources.SkResources.o)
    ../../../externals/skia/out/iossimulator/x86_64/libskresources.a[2](libskresources.SkResources.o)
duplicate symbol '__ZN11skresources20MultiFrameImageAssetC2ENSt3__110unique_ptrI17SkAnimCodecPlayerNS1_14default_deleteIS3_EEEEb' in:
    ../../../externals/skia/out/iossimulator/x86_64/libskottie.a[73](libskresources.SkResources.o)
    ../../../externals/skia/out/iossimulator/x86_64/libskresources.a[2](libskresources.SkResources.o)
duplicate symbol '__ZNK11skresources20FileResourceProvider4loadEPKcS2_' in:
    ../../../externals/skia/out/iossimulator/x86_64/libskottie.a[73](libskresources.SkResources.o)
    ../../../externals/skia/out/iossimulator/x86_64/libskresources.a[2](libskresources.SkResources.o)
duplicate symbol '__ZTVN11skresources10ImageAssetE' in:
    ../../../externals/skia/out/iossimulator/x86_64/libskottie.a[73](libskresources.SkResources.o)
    ../../../externals/skia/out/iossimulator/x86_64/libskresources.a[2](libskresources.SkResources.o)
duplicate symbol '__ZN11skresources28DataURIResourceProviderProxyC2E5sk_spINS_16ResourceProviderEEb' in:
    ../../../externals/skia/out/iossimulator/x86_64/libskottie.a[73](libskresources.SkResources.o)
    ../../../externals/skia/out/iossimulator/x86_64/libskresources.a[2](libskresources.SkResources.o)
duplicate symbol '__ZN11skresources20FileResourceProviderC1E8SkStringb' in:
    ../../../externals/skia/out/iossimulator/x86_64/libskottie.a[73](libskresources.SkResources.o)
    ../../../externals/skia/out/iossimulator/x86_64/libskresources.a[2](libskresources.SkResources.o)
duplicate symbol '__ZNK11skresources25ResourceProviderProxyBase4loadEPKcS2_' in:
    ../../../externals/skia/out/iossimulator/x86_64/libskottie.a[73](libskresources.SkResources.o)
    ../../../externals/skia/out/iossimulator/x86_64/libskresources.a[2](libskresources.SkResources.o)
duplicate symbol '__ZN11skresources25ResourceProviderProxyBase14loadAudioAssetEPKcS2_S2_' in:
    ../../../externals/skia/out/iossimulator/x86_64/libskottie.a[73](libskresources.SkResources.o)
    ../../../externals/skia/out/iossimulator/x86_64/libskresources.a[2](libskresources.SkResources.o)
duplicate symbol '__ZN11skresources10ImageAsset12getFrameDataEf' in:
    ../../../externals/skia/out/iossimulator/x86_64/libskottie.a[73](libskresources.SkResources.o)
    ../../../externals/skia/out/iossimulator/x86_64/libskresources.a[2](libskresources.SkResources.o)
duplicate symbol '__ZNK11skresources25ResourceProviderProxyBase14loadImageAssetEPKcS2_S2_' in:
    ../../../externals/skia/out/iossimulator/x86_64/libskottie.a[73](libskresources.SkResources.o)
    ../../../externals/skia/out/iossimulator/x86_64/libskresources.a[2](libskresources.SkResources.o)
duplicate symbol '__ZN11skresources28DataURIResourceProviderProxyC1E5sk_spINS_16ResourceProviderEEb' in:
    ../../../externals/skia/out/iossimulator/x86_64/libskottie.a[73](libskresources.SkResources.o)
    ../../../externals/skia/out/iossimulator/x86_64/libskresources.a[2](libskresources.SkResources.o)
duplicate symbol '__ZTVN11skresources20FileResourceProviderE' in:
    ../../../externals/skia/out/iossimulator/x86_64/libskottie.a[73](libskresources.SkResources.o)
    ../../../externals/skia/out/iossimulator/x86_64/libskresources.a[2](libskresources.SkResources.o)
duplicate symbol '__ZNK11skresources20FileResourceProvider14loadImageAssetEPKcS2_S2_' in:
    ../../../externals/skia/out/iossimulator/x86_64/libskottie.a[73](libskresources.SkResources.o)
    ../../../externals/skia/out/iossimulator/x86_64/libskresources.a[2](libskresources.SkResources.o)
duplicate symbol '__ZN11skresources20MultiFrameImageAsset8getFrameEf' in:
    ../../../externals/skia/out/iossimulator/x86_64/libskottie.a[73](libskresources.SkResources.o)
    ../../../externals/skia/out/iossimulator/x86_64/libskresources.a[2](libskresources.SkResources.o)
duplicate symbol '__ZN11skresources28DataURIResourceProviderProxy4MakeE5sk_spINS_16ResourceProviderEEb' in:
    ../../../externals/skia/out/iossimulator/x86_64/libskottie.a[73](libskresources.SkResources.o)
    ../../../externals/skia/out/iossimulator/x86_64/libskresources.a[2](libskresources.SkResources.o)
duplicate symbol '__ZN11skresources20MultiFrameImageAsset4MakeE5sk_spI6SkDataEb' in:
    ../../../externals/skia/out/iossimulator/x86_64/libskottie.a[73](libskresources.SkResources.o)
    ../../../externals/skia/out/iossimulator/x86_64/libskresources.a[2](libskresources.SkResources.o)
duplicate symbol '__ZN11skresources20MultiFrameImageAssetC1ENSt3__110unique_ptrI17SkAnimCodecPlayerNS1_14default_deleteIS3_EEEEb' in:
    ../../../externals/skia/out/iossimulator/x86_64/libskottie.a[73](libskresources.SkResources.o)
    ../../../externals/skia/out/iossimulator/x86_64/libskresources.a[2](libskresources.SkResources.o)
duplicate symbol '__ZTVN11skresources20MultiFrameImageAssetE' in:
    ../../../externals/skia/out/iossimulator/x86_64/libskottie.a[73](libskresources.SkResources.o)
    ../../../externals/skia/out/iossimulator/x86_64/libskresources.a[2](libskresources.SkResources.o)
ld: 34 duplicate symbols
clang: error: linker command failed with exit code 1 (use -v to see invocation)

/Users/bogdan/Repositories/SkiaSharp/native/ios/libSkiaSharp/libSkiaSharp.xcodeproj: warning: DEFINES_MODULE was set, but no umbrella header could be found to generate the module map (in target 'libSkiaSharp' from project 'libSkiaSharp')
** ARCHIVE FAILED **


The following build commands failed:
	Ld /Users/bogdan/Repositories/SkiaSharp/native/ios/libSkiaSharp/obj/Release/iphonesimulator/x86_64/Build/Intermediates.noindex/ArchiveIntermediates/libSkiaSharp/InstallationBuildProductsLocation/Library/Frameworks/libSkiaSharp.framework/libSkiaSharp normal (in target 'libSkiaSharp' from project 'libSkiaSharp')
(1 failure)
An error occurred when executing task 'libSkiaSharp'.
Error: xcodebuild: Process returned an error (exit code 65).

Code of Conduct

  • I agree to follow this project's Code of Conduct
@mattleibow
Copy link
Contributor

Thanks for reporting. I am not sure why Xcode 14 and 15 do the build differently with the same args, but I have corrected the build.

@ghost ghost locked as resolved and limited conversation to collaborators Feb 9, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants