編寫(xiě)shell腳本編譯ffmpeg iOS靜態(tài)庫(kù)出錯(cuò)

錯(cuò)誤一:xcrun -sdk iphoneos clang is unable to create an executable file.

C compiler test failed.

xcrun -sdk iphoneos clang is unable to create an executable file.
C compiler test failed.

解決方法:
我最近更新了 Xcode 10,所以直接第三步就可以了

第一步
1)檢查你的 git 版本
2)確保你使用的是最新的 git 版本

第二步
1)在日志文件(ffmpeg-armv7/ffbuild/config.log)中使用關(guān)鍵字(xcrun: error)搜索錯(cuò)誤詳情
2)例如:你會(huì)發(fā)現(xiàn) “xcrun: error: SDK "iphoneos” 不能被定位到

第三步
1)在終端輸入 sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer/
2)輸入 mac 登錄密碼
3)重試
轉(zhuǎn)載自

來(lái)源:CSDN
原文:https://blog.csdn.net/qq910441958/article/details/82183840

錯(cuò)誤二 :GNU assembler not found, install/update gas-preprocessor

GNU assembler not found, install/update gas-preprocessor

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
ffmpeg-user@ffmpeg.org mailing list or IRC #ffmpeg on irc.freenode.net.
Include the log file "ffbuild/config.log" produced by configure as this will help
solve the problem.

解決辦法:(gas-preprocessor文件獲取鏈接: https://pan.baidu.com/s/1KtyBxSt0uiz2md3NZKFGdw 提取碼: p2hg)
1.根據(jù)提示將 git 升級(jí)至最新版本,重試(還是無(wú)效)
2.將 gas-preprocessor 文件添加至 /usr/local/bin/ 目錄下,如果沒(méi)有,請(qǐng)自行創(chuàng)建
3.將 gas-preprocessor 文件的權(quán)限修改為 可讀可寫(xiě)可執(zhí)行 777 或 可執(zhí)行

chmod 777 /usr/local/bin/gas-preprocessor.pl

chmod +x /usr/local/bin/gas-preprocessor.pl

4.重試 OK

錯(cuò)誤三: unknown directive .arch armv7-a

src/libavutil/arm/asm.S:50:9: error: unknown directive
        .arch armv7-a
        ^

解決方法:最新的 Xcode(Xcode 10) 已經(jīng)減弱了對(duì) 32 位的支持, 解決方法:
你就不要編譯 armv7 的版本嘍,要不然使用老版本的Xcode進(jìn)行編譯

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請(qǐng)結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡(jiǎn)書(shū)系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容