Ijkplayer: C compiler test failed.

Created on 29 May 2018  ·  7Comments  ·  Source: bilibili/ijkplayer

--enable-cross-compile --disable-stripping --arch=armv7 --target-os=darwin --enable-static --disable-shared --enable-pic --enable-neon --enable-optimizations --enable-debug --enable-small --prefix=/Users/primecloud/Desktop/ijkPlayer/ijkplayer-master/ios/build/ffmpeg-armv7/output xcrun -sdk iphoneos clang
xcrun -sdk iphoneos 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.freenode.net.
Include the log file "ffbuild/config.log" produced by configure as this will help
solve the problem.

我在执行./compile-ffmpeg.sh all时候出的错,xcode版本是9.3,有知道的吗?怎么解决那,git是最新版本的

Most helpful comment

1)terminal input "sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer/"
2)input password
3)try again

All 7 comments

查看一下 ffbuild/config.log

降低xcode版本到9.0及以下

已经解决了,看的这个回答里面一个人的回答,我给复制过来了,不知道这个怎么能链接到他的回答上,就给复制了,
➜ ios git:(master) ✗ ./compile-ffmpeg.sh all

====================

[*] check xcode version

FF_ALL_ARCHS = armv7 arm64 i386 x86_64

[*] check host

FF_ARCH=armv7
FF_BUILD_OPT=

build_root: /Users/momo/video/ijkplayer/ios

[*] check gas-preprocessor

gasp: /Users/momo/video/ijkplayer/ios/../extra/gas-preprocessor/gas-preprocessor.pl

[*] config arch armv7

build_name: ffmpeg-armv7
platform: iPhoneOS

osversion: -miphoneos-version-min=6.0

[*] make ios toolchain ffmpeg-armv7

build_source: /Users/momo/video/ijkplayer/ios/ffmpeg-armv7
build_prefix: /Users/momo/video/ijkplayer/ios/build/ffmpeg-armv7/output


[*] configurate ffmpeg


[*] check OpenSSL


[*] configure

config: --disable-gpl --disable-nonfree --enable-runtime-cpudetect --disable-gray --disable-swscale-alpha --disable-programs --disable-ffmpeg --disable-ffplay --disable-ffprobe --disable-ffserver --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-avdevice --enable-avcodec --enable-avformat --enable-avutil --enable-swresample --enable-swscale --disable-postproc --enable-avfilter --disable-avresample --enable-network --disable-dxva2 --disable-vaapi --disable-vda --disable-vdpau --disable-encoders --disable-hwaccels --disable-muxers --disable-devices --disable-iconv --enable-protocol=async --enable-cross-compile --disable-stripping --arch=armv7 --target-os=darwin --enable-static --disable-shared --enable-pic --enable-neon --enable-optimizations --enable-debug --enable-small --prefix=/Users/momo/video/ijkplayer/ios/build/ffmpeg-armv7/output xcrun -sdk iphoneos clang
xcrun -sdk iphoneos 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.freenode.net.
Include the log file "config.log" produced by configure as this will help
solve the problem.

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

1)terminal input "sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer/"
2)input password
3)try again

上面的方法不行的话 可能是 安转 anaconda 的时候把环境变破坏了 卸载掉试试

1)terminal input "sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer/"
2)input password
3)try again

worked like charm

1)terminal input "sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer/"
2)input password
3)try again

not work for me. Xcode12.0

Was this page helpful?
0 / 5 - 0 ratings