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

Cannot patch libGoogleAnalyticsServices.a since Xcode 13.3 #20

Open
albertocsouto opened this issue Aug 22, 2022 · 2 comments
Open

Cannot patch libGoogleAnalyticsServices.a since Xcode 13.3 #20

albertocsouto opened this issue Aug 22, 2022 · 2 comments

Comments

@albertocsouto
Copy link

albertocsouto commented Aug 22, 2022

Hi, since Xcode 13.3 I cannot patch this library:

lipo -detailed_info libGoogleAnalyticsServices.a
Fat header in: libGoogleAnalyticsServices.a
fat_magic 0xcafebabe
nfat_arch 5
architecture armv7
    cputype CPU_TYPE_ARM
    cpusubtype CPU_SUBTYPE_ARM_V7
    capabilities 0x0
    offset 108
    size 6872432
    align 2^2 (4)
architecture armv7s
    cputype CPU_TYPE_ARM
    cpusubtype CPU_SUBTYPE_ARM_V7S
    capabilities 0x0
    offset 6872540
    size 6879928
    align 2^2 (4)
architecture i386
    cputype CPU_TYPE_I386
    cpusubtype CPU_SUBTYPE_I386_ALL
    capabilities 0x0
    offset 13752468
    size 7031728
    align 2^2 (4)
architecture x86_64
    cputype CPU_TYPE_X86_64
    cpusubtype CPU_SUBTYPE_X86_64_ALL
    capabilities 0x0
    offset 20784200
    size 7180160
    align 2^3 (8)
architecture arm64
    cputype CPU_TYPE_ARM64
    cpusubtype CPU_SUBTYPE_ARM64_ALL
    capabilities 0x0
    offset 27964360
    size 7499168
    align 2^3 (8)

Script is failing due this fatal error:

Arm64ToSimLib/Transmogrifier.swift:49: Fatal error: The file is not a correct arm64 binary. Try thinning (via lipo) or unarchiving (via ar) first.

Using 13.2.1 and arm64-to-sim old version previous to #9 patch worked before. Any clues on how to solve this issue?

I've tried thinning first, but same error result:

lipo -detailed_info libGoogleAnalyticsServices.a.arm64                                  
input file libGoogleAnalyticsServices.a.arm64 is not a fat file
Non-fat file: libGoogleAnalyticsServices.a.arm64 is architecture: arm64

Thanks!

@markst
Copy link

markst commented Jun 1, 2023

Also having this drama with SpotifyMetadata.framework:

mt@mt-mba arm64-to-sim % ./.build/apple/Products/Release/arm64-to-sim ./SpotifyMetadata 
Arm64ToSimLib/Transmogrifier.swift:49: Fatal error: The file is not a correct arm64 binary. Try thinning (via lipo) or unarchiving (via ar) first.
zsh: trace trap  ./.build/apple/Products/Release/arm64-to-sim 

mt@mt-mba SpotifyMetadata.framework % lipo -i ./SpotifyMetadata 
Architectures in the fat file: ./SpotifyMetadata are: armv7 i386 x86_64 arm64 
mt@mt-mba SpotifyMetadata.framework % lipo -thin arm64 ./SpotifyMetadata -output ./SpotifyMetadata2
mt@mt-mba SpotifyMetadata.framework % lipo -i ./SpotifyMetadata2                                   
Non-fat file: ./SpotifyMetadata2 is architecture: arm64

mt@mt-mba arm64-to-sim % ./.build/apple/Products/Release/arm64-to-sim ./SpotifyMetadata2
Arm64ToSimLib/Transmogrifier.swift:49: Fatal error: The file is not a correct arm64 binary. Try thinning (via lipo) or unarchiving (via ar) first.
zsh: trace trap  ./.build/apple/Products/Release/arm64-to-sim 

@albertocsouto
Copy link
Author

In our specific scenario, this is no longer an issue, thanks to Xcode 14.3. We're able to target the Rosetta simulator while working with these legacy libraries.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants