Compilation error about xcrun

This forum is about all development around libVLC.
linked
Blank Cone
Blank Cone
Posts: 41
Joined: 28 Nov 2014 09:12

Compilation error about xcrun

Postby linked » 02 Mar 2017 15:15

Hello,

I try to compile latest VLCKit for IOS and vlc compile fine until i add the -f option.
It produce this error:

Code: Select all

error: can't exec 'xcrun clang' (No such file or directory)
I have try command below but there is no change:

Code: Select all

sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer/
Steps to reproduce the error:

Code: Select all

git clone http://code.videolan.org/videolan/VLCKit.git cd VLCKit ./buildMobileVLCKit.sh -f
This is a more complete log of the error:

Code: Select all

[info] ...vlc_entry__grey_yuv [info] ...vlc_entry__gain [info] ...vlc_entry__g711 [info] ...vlc_entry__ftp [info] ...vlc_entry__freeze [info] ...vlc_entry__freetype [info] ...vlc_entry__fps [info] ...vlc_entry__folder [info] ...vlc_entry__float_mixer [info] ...vlc_entry__flaschen [info] ...vlc_entry__flacsys [info] ...vlc_entry__flac [info] ...vlc_entry__filesystem [info] ...vlc_entry__file [info] ...vlc_entry__es [info] ...vlc_entry__equalizer [info] ...vlc_entry__edgedetection [info] ...vlc_entry__dvbsub [info] ...vlc_entry__dsm [info] ...vlc_entry__dolby [info] ...vlc_entry__diracsys [info] ...vlc_entry__demux_stl [info] ...vlc_entry__demux_cdg [info] ...vlc_entry__deinterlace [info] ...vlc_entry__decomp [info] ...vlc_entry__cvpx_i420 [info] ...vlc_entry__cvdsub [info] ...vlc_entry__croppadd [info] ...vlc_entry__compressor [info] ...vlc_entry__chorus_flanger [info] ...vlc_entry__chain [info] ...vlc_entry__cdg [info] ...vlc_entry__cc [info] ...vlc_entry__canvas [info] ...vlc_entry__caf [info] ...vlc_entry__cache_read [info] ...vlc_entry__cache_block [info] ...vlc_entry__bonjour [info] ...vlc_entry__blend [info] ...vlc_entry__avio [info] ...vlc_entry__avi [info] ...vlc_entry__avformat [info] ...vlc_entry__avcodec [info] ...vlc_entry__audiounit_ios [info] ...vlc_entry__audio_format [info] ...vlc_entry__au [info] ...vlc_entry__attachment [info] ...vlc_entry__asf [info] ...vlc_entry__araw [info] ...vlc_entry__amem [info] ...vlc_entry__aiff [info] ...vlc_entry__afile [info] ...vlc_entry__aes3 [info] ...vlc_entry__adpcm [info] ...vlc_entry__adjust [info] ...vlc_entry__adf [info] ...vlc_entry__adaptive [info] ...vlc_entry__file [info] ...vlc_entry__access_mms [info] ...vlc_entry__concat [info] ...vlc_entry__access_archive [info] all done [info] Building static MobileVLCKit.framework [info] Building MobileVLCKit (MobileVLCKit, Debug, iphoneos) Build settings from command line: ARCHS = armv7 armv7s arm64 GCC_PREPROCESSOR_DEFINITIONS = IPHONEOS_DEPLOYMENT_TARGET = 7.0 SDKROOT = iphoneos10.2 === BUILD TARGET MobileVLCKit OF PROJECT MobileVLCKit WITH CONFIGURATION Debug === Check dependencies ProcessPCH build/SharedPrecompiledHeaders/MobilePrefix-frgvmhqddtgoqoccmfkleyqeocsc/MobilePrefix.pch.pch Headers/PCH/MobilePrefix.pch normal armv7 objective-c com.apple.compilers.llvm.clang.1_0.compiler cd /Users/leo/git/VLCKit export LANG=en_US.US-ASCII export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/Users/leo/git/VLCKit/libvlc/vlc/extras/tools/build/bin:/Users/leo/git/VLCKit/libvlc/vlc/contrib/x86_64-apple-darwin14/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin" xcrun\ clang -x objective-c-header -arch armv7 -fmessage-length=288 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -fcolor-diagnostics -std=gnu11 -fobjc-arc -Wno-trigraphs -fpascal-strings -Os -Wno-missing-field-initializers -Wno-missing-prototypes -Wno-implicit-atomic-properties -Wno-arc-repeated-use-of-weak -Wno-missing-braces -Wparentheses -Wswitch -Wno-unused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wno-empty-body -Wno-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wno-constant-conversion -Wno-int-conversion -Wno-bool-conversion -Wno-enum-conversion -Wno-shorten-64-to-32 -Wpointer-sign -Wno-newline-eof -Wno-selector -Wno-strict-selector-match -Wno-undeclared-selector -Wno-deprecated-implementations -DNS_BLOCK_ASSERTIONS=1 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.2.sdk -fstrict-aliasing -Wprotocol -Wdeprecated-declarations -miphoneos-version-min=7.0 -g -fvisibility=hidden -Wno-sign-conversion -Wno-infinite-recursion -fembed-bitcode-marker -iquote /Users/leo/git/VLCKit/build/MobileVLCKit.build/Debug-iphoneos/MobileVLCKit.build/MobileVLCKit-generated-files.hmap -I/Users/leo/git/VLCKit/build/MobileVLCKit.build/Debug-iphoneos/MobileVLCKit.build/MobileVLCKit-own-target-headers.hmap -I/Users/leo/git/VLCKit/build/MobileVLCKit.build/Debug-iphoneos/MobileVLCKit.build/MobileVLCKit-all-target-headers.hmap -iquote /Users/leo/git/VLCKit/build/MobileVLCKit.build/Debug-iphoneos/MobileVLCKit.build/MobileVLCKit-project-headers.hmap -I/Users/leo/git/VLCKit/build/Debug-iphoneos/include -I/Users/leo/git/VLCKit/libvlc/vlc/include -I/Users/leo/git/VLCKit/build/MobileVLCKit.build/Debug-iphoneos/MobileVLCKit.build/DerivedSources/armv7 -I/Users/leo/git/VLCKit/build/MobileVLCKit.build/Debug-iphoneos/MobileVLCKit.build/DerivedSources -F/Users/leo/git/VLCKit/build/Debug-iphoneos -MD -MT dependencies -MF /Users/leo/git/VLCKit/build/SharedPrecompiledHeaders/MobilePrefix-frgvmhqddtgoqoccmfkleyqeocsc/MobilePrefix.pch.d -c /Users/leo/git/VLCKit/Headers/PCH/MobilePrefix.pch -o /Users/leo/git/VLCKit/build/SharedPrecompiledHeaders/MobilePrefix-frgvmhqddtgoqoccmfkleyqeocsc/MobilePrefix.pch.pch --serialize-diagnostics /Users/leo/git/VLCKit/build/SharedPrecompiledHeaders/MobilePrefix-frgvmhqddtgoqoccmfkleyqeocsc/MobilePrefix.pch.dia error: can't exec 'xcrun clang' (No such file or directory) Command xcrun clang failed with exit code 71 ProcessPCH build/SharedPrecompiledHeaders/MobilePrefix-btuaegmsatitwnacxtcstlefbygv/MobilePrefix.pch.pch Headers/PCH/MobilePrefix.pch normal armv7s objective-c com.apple.compilers.llvm.clang.1_0.compiler cd /Users/leo/git/VLCKit export LANG=en_US.US-ASCII export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/Users/leo/git/VLCKit/libvlc/vlc/extras/tools/build/bin:/Users/leo/git/VLCKit/libvlc/vlc/contrib/x86_64-apple-darwin14/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin" xcrun\ clang -x objective-c-header -arch armv7s -fmessage-length=288 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -fcolor-diagnostics -std=gnu11 -fobjc-arc -Wno-trigraphs -fpascal-strings -Os -Wno-missing-field-initializers -Wno-missing-prototypes -Wno-implicit-atomic-properties -Wno-arc-repeated-use-of-weak -Wno-missing-braces -Wparentheses -Wswitch -Wno-unused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wno-empty-body -Wno-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wno-constant-conversion -Wno-int-conversion -Wno-bool-conversion -Wno-enum-conversion -Wno-shorten-64-to-32 -Wpointer-sign -Wno-newline-eof -Wno-selector -Wno-strict-selector-match -Wno-undeclared-selector -Wno-deprecated-implementations -DNS_BLOCK_ASSERTIONS=1 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.2.sdk -fstrict-aliasing -Wprotocol -Wdeprecated-declarations -miphoneos-version-min=7.0 -g -fvisibility=hidden -Wno-sign-conversion -Wno-infinite-recursion -fembed-bitcode-marker -iquote /Users/leo/git/VLCKit/build/MobileVLCKit.build/Debug-iphoneos/MobileVLCKit.build/MobileVLCKit-generated-files.hmap -I/Users/leo/git/VLCKit/build/MobileVLCKit.build/Debug-iphoneos/MobileVLCKit.build/MobileVLCKit-own-target-headers.hmap -I/Users/leo/git/VLCKit/build/MobileVLCKit.build/Debug-iphoneos/MobileVLCKit.build/MobileVLCKit-all-target-headers.hmap -iquote /Users/leo/git/VLCKit/build/MobileVLCKit.build/Debug-iphoneos/MobileVLCKit.build/MobileVLCKit-project-headers.hmap -I/Users/leo/git/VLCKit/build/Debug-iphoneos/include -I/Users/leo/git/VLCKit/libvlc/vlc/include -I/Users/leo/git/VLCKit/build/MobileVLCKit.build/Debug-iphoneos/MobileVLCKit.build/DerivedSources/armv7s -I/Users/leo/git/VLCKit/build/MobileVLCKit.build/Debug-iphoneos/MobileVLCKit.build/DerivedSources -F/Users/leo/git/VLCKit/build/Debug-iphoneos -MD -MT dependencies -MF /Users/leo/git/VLCKit/build/SharedPrecompiledHeaders/MobilePrefix-btuaegmsatitwnacxtcstlefbygv/MobilePrefix.pch.d -c /Users/leo/git/VLCKit/Headers/PCH/MobilePrefix.pch -o /Users/leo/git/VLCKit/build/SharedPrecompiledHeaders/MobilePrefix-btuaegmsatitwnacxtcstlefbygv/MobilePrefix.pch.pch --serialize-diagnostics /Users/leo/git/VLCKit/build/SharedPrecompiledHeaders/MobilePrefix-btuaegmsatitwnacxtcstlefbygv/MobilePrefix.pch.dia error: can't exec 'xcrun clang' (No such file or directory) Command xcrun clang failed with exit code 71 ProcessPCH build/SharedPrecompiledHeaders/MobilePrefix-dwrbloovyczvacbuzstlxmhqnezh/MobilePrefix.pch.pch Headers/PCH/MobilePrefix.pch normal arm64 objective-c com.apple.compilers.llvm.clang.1_0.compiler cd /Users/leo/git/VLCKit export LANG=en_US.US-ASCII export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/Users/leo/git/VLCKit/libvlc/vlc/extras/tools/build/bin:/Users/leo/git/VLCKit/libvlc/vlc/contrib/x86_64-apple-darwin14/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin" xcrun\ clang -x objective-c-header -arch arm64 -fmessage-length=288 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -fcolor-diagnostics -std=gnu11 -fobjc-arc -Wno-trigraphs -fpascal-strings -Os -Wno-missing-field-initializers -Wno-missing-prototypes -Wno-implicit-atomic-properties -Wno-arc-repeated-use-of-weak -Wno-missing-braces -Wparentheses -Wswitch -Wno-unused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wno-empty-body -Wno-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wno-constant-conversion -Wno-int-conversion -Wno-bool-conversion -Wno-enum-conversion -Wshorten-64-to-32 -Wpointer-sign -Wno-newline-eof -Wno-selector -Wno-strict-selector-match -Wno-undeclared-selector -Wno-deprecated-implementations -DNS_BLOCK_ASSERTIONS=1 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.2.sdk -fstrict-aliasing -Wprotocol -Wdeprecated-declarations -miphoneos-version-min=7.0 -g -fvisibility=hidden -Wno-sign-conversion -Wno-infinite-recursion -fembed-bitcode-marker -iquote /Users/leo/git/VLCKit/build/MobileVLCKit.build/Debug-iphoneos/MobileVLCKit.build/MobileVLCKit-generated-files.hmap -I/Users/leo/git/VLCKit/build/MobileVLCKit.build/Debug-iphoneos/MobileVLCKit.build/MobileVLCKit-own-target-headers.hmap -I/Users/leo/git/VLCKit/build/MobileVLCKit.build/Debug-iphoneos/MobileVLCKit.build/MobileVLCKit-all-target-headers.hmap -iquote /Users/leo/git/VLCKit/build/MobileVLCKit.build/Debug-iphoneos/MobileVLCKit.build/MobileVLCKit-project-headers.hmap -I/Users/leo/git/VLCKit/build/Debug-iphoneos/include -I/Users/leo/git/VLCKit/libvlc/vlc/include -I/Users/leo/git/VLCKit/build/MobileVLCKit.build/Debug-iphoneos/MobileVLCKit.build/DerivedSources/arm64 -I/Users/leo/git/VLCKit/build/MobileVLCKit.build/Debug-iphoneos/MobileVLCKit.build/DerivedSources -F/Users/leo/git/VLCKit/build/Debug-iphoneos -MD -MT dependencies -MF /Users/leo/git/VLCKit/build/SharedPrecompiledHeaders/MobilePrefix-dwrbloovyczvacbuzstlxmhqnezh/MobilePrefix.pch.d -c /Users/leo/git/VLCKit/Headers/PCH/MobilePrefix.pch -o /Users/leo/git/VLCKit/build/SharedPrecompiledHeaders/MobilePrefix-dwrbloovyczvacbuzstlxmhqnezh/MobilePrefix.pch.pch --serialize-diagnostics /Users/leo/git/VLCKit/build/SharedPrecompiledHeaders/MobilePrefix-dwrbloovyczvacbuzstlxmhqnezh/MobilePrefix.pch.dia error: can't exec 'xcrun clang' (No such file or directory) Command xcrun clang failed with exit code 71 ** BUILD FAILED ** The following build commands failed: ProcessPCH build/SharedPrecompiledHeaders/MobilePrefix-frgvmhqddtgoqoccmfkleyqeocsc/MobilePrefix.pch.pch Headers/PCH/MobilePrefix.pch normal armv7 objective-c com.apple.compilers.llvm.clang.1_0.compiler ProcessPCH build/SharedPrecompiledHeaders/MobilePrefix-btuaegmsatitwnacxtcstlefbygv/MobilePrefix.pch.pch Headers/PCH/MobilePrefix.pch normal armv7s objective-c com.apple.compilers.llvm.clang.1_0.compiler ProcessPCH build/SharedPrecompiledHeaders/MobilePrefix-dwrbloovyczvacbuzstlxmhqnezh/MobilePrefix.pch.pch Headers/PCH/MobilePrefix.pch normal arm64 objective-c com.apple.compilers.llvm.clang.1_0.compiler (3 failures)
Any help is very welcome.
I'm on latest MacOs Sierra with latest Xcode.

The command alone works fine:

Code: Select all

$ xcrun clang clang: error: no input files

linked
Blank Cone
Blank Cone
Posts: 41
Joined: 28 Nov 2014 09:12

Re: Compilation error about xcrun

Postby linked » 06 Mar 2017 21:53

Someone know where in the build process the SharedPrecompiledHeaders folder is build with MobileVLCKit_Prefix.pch.data file that contain this line:

Code: Select all

CommandLine xcrun\ clang -x objective-c-header -arch arm64 -fmessage-length=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -std=gnu11 -fobjc-arc -Wno-trigraphs -fpascal-strings -Os -Wno-missing-field-initializers -Wno-missing-prototypes -Wno-implicit-atomic-properties -Wno-arc-repeated-use-of-weak -Wno-missing-braces -Wparentheses -Wswitch -Wno-unused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wno-empty-body -Wno-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wno-constant-conversion -Wno-int-conversion -Wno-bool-conversion -Wno-enum-conversion -Wshorten-64-to-32 -Wpointer-sign -Wno-newline-eof -Wno-selector -Wno-strict-selector-match -Wno-undeclared-selector -Wno-deprecated-implementations -DNS_BLOCK_ASSERTIONS=1 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.2.sdk -fstrict-aliasing -Wprotocol -Wdeprecated-declarations -miphoneos-version-min=7.0 -g -fvisibility=hidden -Wno-sign-conversion -Wno-infinite-recursion -fembed-bitcode-marker -iquote /Users/leo/git/VLCKitMaster/build/MobileVLCKit.build/Release-iphoneos/MobileVLCKit.build/MobileVLCKit-generated-files.hmap -I/Users/leo/git/VLCKitMaster/build/MobileVLCKit.build/Release-iphoneos/MobileVLCKit.build/MobileVLCKit-own-target-headers.hmap -I/Users/leo/git/VLCKitMaster/build/MobileVLCKit.build/Release-iphoneos/MobileVLCKit.build/MobileVLCKit-all-target-headers.hmap -iquote /Users/leo/git/VLCKitMaster/build/MobileVLCKit.build/Release-iphoneos/MobileVLCKit.build/MobileVLCKit-project-headers.hmap -I/Users/leo/git/VLCKitMaster/build/Release-iphoneos/include -I/Users/leo/git/VLCKitMaster/libvlc/vlc/include -I/Users/leo/git/VLCKitMaster/build/MobileVLCKit.build/Release-iphoneos/MobileVLCKit.build/DerivedSources/arm64 -I/Users/leo/git/VLCKitMaster/build/MobileVLCKit.build/Release-iphoneos/MobileVLCKit.build/DerivedSources -F/Users/leo/git/VLCKitMaster/build/Release-iphoneos -MD -MT dependencies -MF /Users/leo/git/VLCKitMaster/build/SharedPrecompiledHeaders/MobilePrefix-fygsahlacqatsnedgcrevcttengw/MobilePrefix.pch.d -c /Users/leo/git/VLCKitMaster/Headers/PCH/MobilePrefix.pch -o /Users/leo/git/VLCKitMaster/build/SharedPrecompiledHeaders/MobilePrefix-fygsahlacqatsnedgcrevcttengw/MobilePrefix.pch.pch --serialize-diagnostics /Users/leo/git/VLCKitMaster/build/SharedPrecompiledHeaders/MobilePrefix-fygsahlacqatsnedgcrevcttengw/MobilePrefix.pch.dia
The start has a backslash that i want to remove:

Code: Select all

CommandLine xcrun\ clang
But after hours of search i can't find how to remove it at build time.
If i remove it in file created, when i compile again the file is generated again with this backslash.

linked
Blank Cone
Blank Cone
Posts: 41
Joined: 28 Nov 2014 09:12

Re: Compilation error about xcrun

Postby linked » 06 Mar 2017 22:52

Well, if i compile the project myself with command line, i now have this line that works:

Code: Select all

CommandLine /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x objective-c-header...
Don't know how to solve the problem but for people who want to compile it by hand and as a note for myself in the future, this how to do.

Clone the branch you need.

If you don't have it, install xz with brew(google for brew if need to install it):

Code: Select all

brew xz
Go into cloned repo and start a first build try:

Code: Select all

./buildMobileVLCKit.sh -f
The compilation probably fail because of some archive missing, download them and put them in vlc/contrib/tarballs.
Another archive is need but i don't know where to copy it then just edit the file in vlc/extras/tools/packages.mak and replace the ANT line with this:

Code: Select all

ANT_VERSION=1.9.7 ANT_URL=$(VIDEOLAN)/apache-ant-$(ANT_VERSION)-bin.tar.bz2
Compile again but with -n option added:

Code: Select all

./buildMobileVLCKit.sh -fn
Compilation may fail when build Framework, just do it by hand.

For Iphone:

Code: Select all

xcodebuild -project "MobileVLCKit.xcodeproj" -target "MobileVLCKit" -sdk iphoneos -configuration Release ARCHS="armv7 armv7s arm64" IPHONEOS_DEPLOYMENT_TARGET=8.0
For simulator:

Code: Select all

xcodebuild -project "MobileVLCKit.xcodeproj" -target "MobileVLCKit" -sdk iphonesimulator -configuration Release ARCHS="i386 x86_64" IPHONEOS_DEPLOYMENT_TARGET=8.0
And to build framework:

Code: Select all

cd build mkdir MobileVLCKit.framework lipo -create Release-iphoneos/libMobileVLCKit.a Release-iphonesimulator/libMobileVLCKit.a -o MobileVLCKit.framework/MobileVLCKit chmod a+x MobileVLCKit.framework/MobileVLCKit cp -pr Release-iphoneos/MobileVLCKit MobileVLCKit.framework/Headers


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 5 guests