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 Xcode14 ITMS-90482: Invalid Executable contains bitcode #614

Closed
October-zhuo opened this issue Nov 3, 2022 · 3 comments
Closed

iOS Xcode14 ITMS-90482: Invalid Executable contains bitcode #614

October-zhuo opened this issue Nov 3, 2022 · 3 comments
Assignees
Labels
enhancement New feature or request fixed Fixed in main branch fixed-in-v6.0 fixed-on-development Fixed on the development branch. Not released yet. ios Affect iOS platform scripts Affect build scripts tvos Affect tvOS platform v5.1 Affects v5.1 release

Comments

@October-zhuo
Copy link

hi, I built framworks by ios.sh file with branch master(./ios.sh --disable-arm64-mac-catalyst --disable-arm64-simulator --disable-i386 --disable-x86-64 --disable-x86-64-mac-catalyst --enable-lame -l). The 8 frameworks located at prebuild/bundle-apple-framework-ios-lts

It worked well until I updated my Xcode to 14, because bitcode deprecated in Xcode14. So Apple rejected my APP for the follow reason:

ITMS-90482: Invalid Executable - The executable 'xxx/Frameworks/ffmpegkit.framework/ffmpegkit' contains bitcode.

ITMS-90482: Invalid Executable - The executable 'xxxFrameworks/libavcodec.framework/libavcodec' contains bitcode.

ITMS-90482: Invalid Executable - The executable 'xxx/Frameworks/libavdevice.framework/libavdevice' contains bitcode.

ITMS-90482: Invalid Executable - The executable 'xxx/Frameworks/libavfilter.framework/libavfilter' contains bitcode.

ITMS-90482: Invalid Executable - The executable 'xxx/Frameworks/libavformat.framework/libavformat' contains bitcode.

ITMS-90482: Invalid Executable - The executable 'xxx/Frameworks/libavutil.framework/libavutil' contains bitcode.

ITMS-90482: Invalid Executable - The executable 'xxx/Frameworks/libswresample.framework/libswresample' contains bitcode.

ITMS-90482: Invalid Executable - The executable 'xxx/Frameworks/libswscale.framework/libswscale' contains bitcode.

I've learned the option -fembed-bitcode made the frameworks contain bitcode. So I removed the -fembed-bitcode in scripts/fuction-ios.sh file line 117, and this line turn out to be echo "-fstrict-aliasing -DIOS ${LTS_BUILD_FLAG}${BUILD_DATE} -isysroot ${SDK_PATH}". But the building failed

Downloading sources: ok

Building armv7 platform targeting iOS SDK 10 and Mac Catalyst 13.0

lame: already built

ffmpeg: failed

See build.log for details

The log detail is:

INFO: System information

INFO: Darwin MacBook-Pro.local 21.6.0 Darwin Kernel Version 21.6.0: Wed Aug 10 14:28:23 PDT 2022; root:xnu-8020.141.5~2/RELEASE_ARM64_T6000 arm64

INFO: Enabling library lame

INFO: Enabling library ios-libiconv

INFO: Cleaning workspace for ffmpeg

Updated 0 paths from the index
Updated 0 paths from the index
Updated 0 paths from the index
Updated 0 paths from the index
clang is unable to create an executable file.
C compiler test failed.

If you think configure made a mistake, make sure you are using the latest
version from Git. If the latest version fails, report the problem to the
[email protected] mailing list or IRC #ffmpeg on irc.libera.chat.
Include the log file "ffbuild/config.log" produced by configure as this will help
solve the problem.

I wonder is there any way to build the frameworks not contain bitcode? Or how to solve the ITMS-90482: Invalid Executable - The executable 'xxx' contains bitcode problem?

Thanks for any help.
failed-build.log

@tanersener tanersener added the enhancement New feature or request label Nov 5, 2022
@tanersener tanersener moved this to In Progress in Next FFmpegKit Release Nov 8, 2022
@tanersener tanersener self-assigned this Nov 8, 2022
Repository owner moved this from In Progress to Done in Next FFmpegKit Release Nov 9, 2022
@tanersener
Copy link
Collaborator

tanersener commented Nov 9, 2022

We don't see this issue with our apps. But added the --no-bitcode option anyway. It will compile libraries without bitcode. main and development branches have it.

@tanersener tanersener added the fixed Fixed in main branch label Nov 9, 2022
@October-zhuo
Copy link
Author

I have tried --no-bitcode ./ios.sh --disable-arm64-mac-catalyst --disable-arm64-simulator --disable-i386 --disable-x86-64 --disable-x86-64-mac-catalyst --enable-lame -l -no-bitcode. But I got (*) Unknown option "-no-bitcode". See ./ios.sh --help for available options.

And I fixed it by strip all the libxxx.framework by xcrun bitcode_strip -r libxxx -o libxxx. It worked for me.

Anyway, thank you so much for your answer and your time. 😁

@joeholee
Copy link

Had the same problem and solved it by running bitcode_strip. Thank you @October-zhuo !

@tanersener tanersener added fixed-in-v6.0 tvos Affect tvOS platform ios Affect iOS platform scripts Affect build scripts v5.1 Affects v5.1 release fixed-on-development Fixed on the development branch. Not released yet. fixed Fixed in main branch and removed fixed Fixed in main branch labels Sep 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request fixed Fixed in main branch fixed-in-v6.0 fixed-on-development Fixed on the development branch. Not released yet. ios Affect iOS platform scripts Affect build scripts tvos Affect tvOS platform v5.1 Affects v5.1 release
Projects
No open projects
Development

No branches or pull requests

3 participants