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

[iOS] Build of framework including WebP.framework for achitecture arm64 not working #815

Open
rafagan opened this issue Sep 2, 2021 · 6 comments
Assignees
Labels
iOS iOS issue

Comments

@rafagan
Copy link

rafagan commented Sep 2, 2021

Problem Description
When I compile a xcframework with WebP embedded with the headers, I receive the error bellow:

ld: in /Users/Projects/libs/ikolb-apps-libs/WebP.framework/WebP(libwebpencode_la-config_enc.o), building for iOS Simulator, but linking in object file built for iOS, for architecture arm64

clang: error: linker command failed with exit code 1 (use -v to see invocation)

** BUILD FAILED **


The following build commands failed:
	Ld /Users/rafagan/Library/Developer/Xcode/DerivedData/iKolbAppsLibs-aamrawtqkbohumbztkmrcnjeixgh/Build/Intermediates.noindex/iKolbAppsLibs.build/Release-iphonesimulator/iKolbAppsLibs.build/Objects-normal/arm64/Binary/iKolbAppsLibs normal arm64
(1 failure)

There's a way to provide this library with arm64 support?

Reproduction Steps
Run something like below in shell:

xcodebuild archive \
	-scheme $FRAMEWORK_NAME \
        -configuration Release \
	-project "${PROJECT_DIR}" \
	-archivePath "${TMP_DIR}/simulator/$FRAMEWORK_NAME" \
	-verbose \
	-sdk iphonesimulator \
	SKIP_INSTALL=NO \
	BUILD_LIBRARIES_FOR_DISTRIBUTION=YES \
	clean build

@rafagan rafagan added the iOS iOS issue label Sep 2, 2021
@rafagan rafagan changed the title [iOS] Build of xcframework including WebP.framework for achitecture arm64 not working [iOS] Build of framework including WebP.framework for achitecture arm64 not working Sep 2, 2021
@leonardo-ferreira07
Copy link

@rafagan @amrit-1901 hello, I'm having the same issue. Any updates on this?

@piscespieces
Copy link

Any workaround?

@ronnienv
Copy link

ronnienv commented Sep 30, 2022

Still running into this issue, can't run the app on my m1 mac

@nikolaigeorgie
Copy link

Got it working by just changing Architectures to x86_64 for your project at the root
image

@nikolaigeorgie
Copy link

Got it working by just changing Architectures to x86_64 for your project at the root
image

My solution only works for simulator :(

@nikolaigeorgie
Copy link

nikolaigeorgie commented Jul 4, 2023

Got it working by just changing Architectures to x86_64 for your project at the root
image

My solution only works for simulator :(

ok here you go , heres a little, this is just for local development to build to ios simulator but for deployment (say with expo) this script doesn't need to run so just make sure that the architecture is standard for deployment node.js script i created

`const fs = require("fs")

const filePath = "./ios/app.xcodeproj/project.pbxproj"

fs.readFile(filePath, "utf8", function (err, data) {
if (err) {
return console.log(err)
}

let result = data.replace(/ARCHS = "$(ARCHS_STANDARD)";/g, "ARCHS = x86_64;")

fs.writeFile(filePath, result, "utf8", function (err) {
if (err) return console.log(err)
console.log("File has been successfully updated")
})
})`

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

No branches or pull requests

6 participants