Compile VLCKit on Mac OS 10.9
Asked Answered
P

1

6

I'm trying to compile VLCKit on Mac OS 10.9 following this wiki : https://wiki.videolan.org/VLCKit/

I have clone git://git.videolan.org/vlc-bindings/VLCKit.git then open VLCKit.xcodeproj in Xcode 5.1 and finally run "Build Everything".

But build failed with thoses issues :

Run VLC configure

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

Setup VLC contribs

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.

Did I miss something ? Can someone help please ?

Pintsize answered 4/8, 2014 at 16:34 Comment(0)
P
20

I finally solved my issues by myself.

Here's what I had to do to make it compile successfully :

Clone project

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

Modify xcode project

  • open VLCKit.xcodeproj
  • In Project VLCKit change OS X Deployement Target to “10.9”
  • In Build Settings change Architectures to “64-bit Intel (x86_64)“
  • Find and replace NS_DESIGNATED_INITIALIZER (available in xcode 6) by __attribute((objc_designated_initializer))
  • Close xcode and go back to the terminal

Change compiler

  • 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

Cleanup

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

Build Release

  • 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 "Run VLC configure" -configuration Release
  • xcodebuild -project VLCKit.xcodeproj -verbose -target "Make VLC" -configuration Release
  • xcodebuild -project VLCKit.xcodeproj -verbose -target "Build just VLCKit" -configuration Release
  • cd ./build/Release/

Hope this can help.

Pintsize answered 5/8, 2014 at 13:24 Comment(6)
Thanks for sharing the steps. For the latest build I had to add args="--disable-chromecast $args"to the Configure.sh file.Marjana
I am all the way down to "Make VLC" but I get a build command error 'PhaseScriptExecution make build/VLCKit.build/Release/Make\ VLC.build/Script-6337548010ED091D0072A0D9.sh' Seems to be because clang: error: no such file or directory: '/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/4.2/lib/darwin/libclang_rt.osx.a' where I only have ...clang/6.0/... I'm not sure what to do.Expend
I solved my issue yesterday by disabing x265 in Configure.sh, adding 'args="--disable-x265 $args"'Expend
For the x265 problem in the previous comment, you may have a version mismatch with XCode. You may need to change the version in the file: contrib/x86_64-apple-darwin10/lib/pkgconfig/x265.pc to match the version of your XCode.Midcourse
for "clang/4.2" you can search and replace 'clang/4.2' with 'clang/6.0' , you will find them in lots of 'Makefile'Oversold
when I am building 'setup vlc contribs', i got errors like "tee: stdout: Broken pipe" , or "tar: Error exit delayed from previous errors. make: *** [cmake] Error 1", but it can build successfully still, I think I can ignore them maybe.Oversold

© 2022 - 2024 — McMap. All rights reserved.