在Mac OS 10.9上编译VLCKit

Jul*_*vet 6 compilation vlc libvlc osx-mavericks

我正试图在这个维基上编译Mac OS 10.9上的VLCKit:https://wiki.videolan.org/VLCKit/

我有克隆git://git.videolan.org/vlc-bindings/VLCKit.git然后在Xcode 5.1中打开VLCKit.xcodeproj,最后运行"Build Everything".

但是由于问题导致构建失败:

运行VLC配置

PhaseScriptExecution bootstrap /Users/myname/Library/Developer/Xcode/DerivedData/VLCKit-       bktcaifqrsqwbodqlfdqgsmkkdeb/Build/Intermediates/VLCKit.build/Debug/Run\ VLC\     configure.build/Script-631A90420D5A007D0014A2CE.sh
cd /Users/myname/Documents/PhcDev/VLCKit
/bin/sh -c \"/Users/myname/Library/Developer/Xcode/DerivedData/VLCKit-   bktcaifqrsqwbodqlfdqgsmkkdeb/Build/Intermediates/VLCKit.build/Debug/Run\ VLC\    configure.build/Script-631A90420D5A007D0014A2CE.sh\"

/Users/myname/Library/Developer/Xcode/DerivedData/VLCKit-bktcaifqrsqwbodqlfdqgsmkkdeb/Build/Intermediates/VLCKit.build/Debug/Run VLC   configure.build/Script-631A90420D5A007D0014A2CE.sh: line 16: ./bootstrap: No such file or   directory
Run Code Online (Sandbox Code Playgroud)

设置VLC贡献

PhaseScriptExecution make /Users/myname/Library/Developer/Xcode/DerivedData/VLCKit-bktcaifqrsqwbodqlfdqgsmkkdeb/Build/Intermediates/VLCKit.build/Debug/Setup\ VLC\ contribs.build/Script-633BD6E30D2ADF030012A314.sh
cd /Users/myname/Documents/PhcDev/VLCKit
/bin/sh -c \"/Users/myname/Library/Developer/Xcode/DerivedData/VLCKit-bktcaifqrsqwbodqlfdqgsmkkdeb/Build/Intermediates/VLCKit.build/Debug/Setup\ VLC\ contribs.build/Script-633BD6E30D2ADF030012A314.sh\"

Building tools

/Users/myname/Library/Developer/Xcode/DerivedData/VLCKit-bktcaifqrsqwbodqlfdqgsmkkdeb/Build/Intermediates/VLCKit.build/Debug/Setup VLC contribs.build/Script-633BD6E30D2ADF030012A314.sh: line 10: cd:         /Users/myname/Documents/PhcDev/VLCKit/vlc-unstable/extras/tools: No such file or directory
/Users/myname/Library/Developer/Xcode/DerivedData/VLCKit-bktcaifqrsqwbodqlfdqgsmkkdeb/Build/Intermediates/VLCKit.build/Debug/Setup VLC contribs.build/Script-633BD6E30D2ADF030012A314.sh: line 11: ./bootstrap: No such file or directory
xcodebuild -project VLCKit.xcodeproj -target "Build Everything"
make: *** [build/Debug/VLCKit.framework] Interrupt: 2
Building a set of contribs for x86_64...

/Users/myname/Library/Developer/Xcode/DerivedData/VLCKit-bktcaifqrsqwbodqlfdqgsmkkdeb/Build/Intermediates/VLCKit.build/Debug/Setup VLC contribs.build/Script-633BD6E30D2ADF030012A314.sh: line 20: cd:     /Users/myname/Documents/PhcDev/VLCKit/vlc-unstable/contrib: No such file or directory
Making contribs for x86_64
/Users/myname/Library/Developer/Xcode/DerivedData/VLCKit-  bktcaifqrsqwbodqlfdqgsmkkdeb/Build/Intermediates/VLCKit.build/Debug/Setup VLC  contribs.build/Script-633BD6E30D2ADF030012A314.sh: line 32: ../bootstrap: No such file or  directory
make: *** No rule to make target `prebuilt'. Stop.
Run Code Online (Sandbox Code Playgroud)

我错过了什么 ?有人可以帮忙吗?

Jul*_*vet 19

我终于自己解决了我的问题.

这是我必须做的事情才能使它成功编译:

克隆项目

  • git clone git://git.videolan.org/vlc-bindings/VLCKit.git

修改xcode项目

  • 打开VLCKit.xcodeproj
  • 在Project VLCKit中将OS X Deployement Target更改为"10.9"
  • 在构建设置中将架构更改为"64位Intel(x86_64)"
  • 通过__attribute((objc_designated_initializer)查找并替换NS_DESIGNATED_INITIALIZER(在xcode 6中可用)
  • 关闭xcode并返回终端

改变编译器

  • export CC =/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
  • export CXX =/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c ++
  • export OBJC =/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc

清理

  • rm -fr ./vlc-unstable/contrib/x86_64-apple-darwin10

构建版本

  • xcodebuild -project VLCKit.xcodeproj -verbose -target"Fetch libvlc"
  • xcodebuild -project VLCKit.xcodeproj -verbose -target"Setup VLC contribs"-configuration Release
  • export PATH = $ PWD/vlc-unstable/extras/tools/build/bin:$ PATH
  • cd vlc-unstable
  • ./bootstrap
  • cd ..
  • xcodebuild -project VLCKit.xcodeproj -verbose -target"运行VLC配置" - 配置发布
  • xcodebuild -project VLCKit.xcodeproj -verbose -target"Make VLC"-configuration Release
  • xcodebuild -project VLCKit.xcodeproj -verbose -target"Build only VLCKit"-configuration Release
  • cd ./build/Release/

希望这可以提供帮助.

  • 对于上一个注释中的x265问题,您可能与XCode版本不匹配.您可能需要更改文件中的版本:contrib/x86_64-apple-darwin10/lib/pkgconfig/x265.pc以匹配您的XCode版本. (3认同)
  • 感谢您分享步骤.对于最新版本,我必须在``Configure.sh``文件中添加``args =" - disable-chromecast $ args"``. (2认同)
  • 我昨天通过在Configure.sh中禁用x265解决了我的问题,添加'args =" - disable-x265 $ args"' (2认同)