VLCKit will not build on Mac OS X - several issues
VLCKit builds are broken in a number of ways, on Mac OS X, using the current master.
I tried to build using the instructions at https://wiki.videolan.org/VLCKit/
Clone http://code.videolan.org/videolan/VLCKit.git
open VLCKit.xcodeproj
make sure the "Build Everything" target is selected
build the project
I'm at
commit 8542641e3553bf00979c5c9aa23ddeb30ba4f3c3
Author: Felix Paul K<C3><BC>hne <fkuehne@videolan.org>
Date: Mon Sep 26 21:22:50 2016 +0200
OS and Xcode details are:
Mac OS X 10.11.6 (15G1004)
Xcode 8.0 (8A218a)
There are several issues with the build, which I'll document here, to avoid repetition.
Issue 1: "A compiler with support for C++11 language features is required."
On the first attempt, the "Run VLC configure" target failed to build, with the following errors:
checking for C/C++ restrict keyword... __restrict
checking whether xcrun clang++ supports C++11 features by default... no
checking whether xcrun clang++ supports C++11 features with -std=c++11... no
checking whether xcrun clang++ supports C++11 features with -std=c++0x... no
configure: error: *** A compiler with support for C++11 language features is required.
I was able to get past this by changing vlc-unstable/configure, line 8688, from
ax_cxx_compile_cxx11_required=true
to
ax_cxx_compile_cxx11_required=false
Issue 2: fillScreenEntirely and setFillScreenEntirely methods unknown
The build fails after this change when compiling VLCVideoLayer.m, when referencing the fillScreenEntirely methods of the layoutManager property, as these methods are defined by the VLCVideoLayoutManager class (in VLCVideoCommon.[hm]), but the layoutManager is presumed to conform to the CALayoutManager protocol.
@implementation VLCVideoLayer
- (BOOL)fillScreen
{
return [self.layoutManager fillScreenEntirely];
}
- (void)setFillScreen:(BOOL)fillScreen
{
[self.layoutManager setFillScreenEntirely:fillScreen];
[self setNeedsLayout];
}
@end
I fixed this temporarily with a cast:
@implementation VLCVideoLayer
- (BOOL)fillScreen
{
return [(VLCVideoLayoutManager *)self.layoutManager fillScreenEntirely];
}
- (void)setFillScreen:(BOOL)fillScreen
{
[(VLCVideoLayoutManager *)self.layoutManager setFillScreenEntirely:fillScreen];
[self setNeedsLayout];
}
@end
Issue 3: '../libvlc/vlc/lib/media_player_internal.h' file not found
In VLCExtensionsManager.m, lines 33-34, the relative paths for the header files are incorrect:
I changed them from
#import "../libvlc/vlc/lib/media_player_internal.h"
#import "../libvlc/vlc/lib/libvlc_internal.h"
to
#import "../vlc-unstable/lib/media_player_internal.h"
#import "../vlc-unstable/lib/libvlc_internal.h"
Issue 4: libvlc_media_cookie_jar_store and libvlc_media_cookie_jar_clear symbols not found
Compilation then fails because the libvlc_media_cookie_jar_store
and libvlc_media_cookie_jar_clear
functions referenced in VLCMedia.m are not defined anywhere.
It looks like there is a patch than includes these in ./MobileVLCKit/patches/0020-libvlc_media-add-cookie_jar-API.patch, but I just commented out the calls for right now.
At this point, I finally got VLCKit to compile successfully
However, there were still some problems with the actual Product
Issue 5: Info.plist specifies "Quartz" as the CFBundleExecutable
This entry should contain "VLCKit". I'm not sure how "Quartz" manages to get in there, as the original Info.plist file in the project correctly specifies "VLCKit", but it does this for me, consistently.
Finally, Issue #51 (closed)