Page 1 of 4
tvos compilation problem
Posted: 27 Sep 2015 09:02
by matrog
Hi All,
I'm trying to compile VLCKit for tvOS but I'm always getting the following error
Code: Select all
[info] all done
[info] Building static MobileVLCKit.framework
[info] Building MobileVLCKit (MobileVLCKit, Release, iphoneos)
xcodebuild: error: SDK "iphoneos9.0" cannot be located.
I'm using this command to build
any idea?
Thanks,
Matteo
Re: tvos compilation problem
Posted: 27 Sep 2015 09:12
by jasin755
Hi,
I had the same problem, the only way to make a static library is to open MobileVLCKit.xcodeproj, switch to TVVLCKit and build. You get libTVVLCKit.a and headers.
Re: tvos compilation problem
Posted: 27 Sep 2015 11:43
by matrog
Ok, compiled with Xcode, added both .a file and headers to my project now I get this
that looks to me impossible
Thanks,
Re: tvos compilation problem
Posted: 27 Sep 2015 12:01
by jasin755
Copy *.a file and headers into your project. Replace all you import to:
#import "TVVLCKit.h"
when you start typing so you receive autocomplete.
Re: tvos compilation problem
Posted: 27 Sep 2015 13:40
by matrog
I think I've done but probably it's my fault
I'm trying with this example
https://mega.nz/#!ahMW0bwA!USoUVlehDrXU ... UjfZ8Lc0fk
Re: tvos compilation problem
Posted: 27 Sep 2015 15:59
by matrog
if I play little bit with h file I'm able to compile but i get liking errors... probably my .a file is completaly wrong...is there any guid to compile for tvOS from scratch?
Instructions on wiki are not so clear...(at least for me)
Code: Select all
Undefined symbols for architecture arm64:
"std::runtime_error::runtime_error(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)", referenced from:
libebml::CRTError::CRTError(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, int) in libTVVLCKit.a(StdIOCallback.o)
"std::__1::basic_ostream<char, std::__1::char_traits<char> >::operator<<(void const*)", referenced from:
libebml::IOCallback::writeFully(void const*, unsigned long) in libTVVLCKit.a(IOCallback.o)
libebml::IOCallback::readFully(void*, unsigned long) in libTVVLCKit.a(IOCallback.o)
"std::runtime_error::runtime_error(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)", referenced from:
libebml::IOCallback::writeFully(void const*, unsigned long) in libTVVLCKit.a(IOCallback.o)
libebml::IOCallback::readFully(void*, unsigned long) in libTVVLCKit.a(IOCallback.o)
"std::runtime_error::~runtime_error()", referenced from:
libebml::IOCallback::writeFully(void const*, unsigned long) in libTVVLCKit.a(IOCallback.o)
libebml::IOCallback::readFully(void*, unsigned long) in libTVVLCKit.a(IOCallback.o)
"std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::replace(unsigned long, unsigned long, char const*, unsigned long)", referenced from:
..........
Re: tvos compilation problem
Posted: 28 Sep 2015 08:56
by fkuehne
You don't link against libc++.
Re: tvos compilation problem
Posted: 28 Sep 2015 19:00
by matrog
oh...i'm so stupid..thanks!
Re: tvos compilation problem
Posted: 21 Oct 2015 17:49
by finbarr
hi matron any chance you can post a sample project with this fixed? I have the same issue but there seems to be a bug in Xcode 7 beta which isn't letting me link against libc++
http://stackoverflow.com/a/33032115
Re: tvos compilation problem
Posted: 21 Oct 2015 20:13
by matrog
Hi, I only added the following libc++.tbd lib to xcode
Re: tvos compilation problem
Posted: 21 Oct 2015 20:50
by finbarr
Afraid I amn't having much luck..
Re: tvos compilation problem
Posted: 22 Oct 2015 06:58
by matrog
Remove that and import every single VLC*.h file
Re: tvos compilation problem
Posted: 25 Oct 2015 07:36
by obia
I'm trying to add a VLC player to my TVOS app and for this I'm trying to create a static library of TVVLCKit. This thread is the closest I've found to documentation on how to do this so I really hope that someone here can guide me. This is what I've done so far:
1. Downloaded
https://code.videolan.org/videolan/VLCK ... rchive.zip
2. ./buildMobileVLCKit.sh -f -t
3. Got the error "xcodebuild: error: SDK "iphoneos9.0" cannot be located."
4. Opened MobileVLCKit.xcodeproj in Xcode, switched to TVVLCKit and built successfully.
Now, I'm supposed to find and copy the libTVVLCKit.a and header files to my project. The problem is that I can not for my life find any file called libTVVLCKit.a. Would really appretiate if someone code clarify the steps needed to create a static library from scratch or pinpoint what I'm doing here. Thanks!
Re: tvos compilation problem
Posted: 25 Oct 2015 07:45
by matrog
I did the following
1. downloaded zip file
2.
3.
4. Opened MobileVLCKit.xcodeproj in Xcode, switched to TVVLCKit and built successfully for device.
5. built successfully for device simulator
6. Open terminal, go to the folder where Xcode produced libTVVLCKit.a file (for me /Users/xxxxx/Library/Developer/Xcode/DerivedData/MobileVLCKit-cajvscpvucjubqcjljaxxzklzcas/Build/Products/)
7. Run the following to have a static lib for tv and simu
Code: Select all
lipo -create Debug-appletvos/libTVVLCKit.a Debug-appletvsimulator/libTVVLCKit.a -o libTVVLCKit.a
8. Add the new libTVVLCKit.a to your project
Re: tvos compilation problem
Posted: 25 Oct 2015 14:19
by obia
matrog: thanks for the steps, you're a saver !! I've now managed to include the .a and header files into my project.
Do you have a good example of a Player-videocontroller for TVOS? I'm using an old one made for IOS but needed to remove a lot of stuff that is not available on TVOS (UIActionSheets, UISliders etc). Maybe also due to this I'm getting errors when I try to build my project (for the simulator):
Code: Select all
Undefined symbols for architecture x86_64:
"_iconv", referenced from:
_sub_recode in libTVVLCKit.a(ass.o)
_vbi_print_page_region in libTVVLCKit.a(exp-txt.o)
_print_unicode in libTVVLCKit.a(exp-txt.o)
_vlc_iconv in libTVVLCKit.a(libc.o)
_vbi_ucs2be in libTVVLCKit.a(export.o)
_smb_iconv in libTVVLCKit.a(smb_utils.o)
_iconv_ucs2 in libTVVLCKit.a(conv.o)
...
(maybe you meant: _vbi_fputs_iconv_ucs2, _vbi_strndup_iconv_caption , _vbi_strndup_iconv , __vbi_iconv_open , __vbi_iconv_close , _vbi_export_puts_iconv_ucs2 , __vbi_strndup_iconv , _vbi_export_puts_iconv , __vbi_iconv_ucs2 , _vbi_fputs_iconv , _vlc_iconv_open , _vlc_iconv_close , _vbi_strndup_iconv_ucs2 , _vlc_iconv )
"_iconv_close", referenced from:
_sub_recode in libTVVLCKit.a(ass.o)
_vbi_print_page_region in libTVVLCKit.a(exp-txt.o)
_export in libTVVLCKit.a(exp-txt.o)
_vlc_iconv_close in libTVVLCKit.a(libc.o)
_vbi_ucs2be in libTVVLCKit.a(export.o)
_smb_iconv in libTVVLCKit.a(smb_utils.o)
__vbi_iconv_close in libTVVLCKit.a(conv.o)
...
(maybe you meant: __vbi_iconv_close, _vlc_iconv_close )
"_iconv_open", referenced from:
_sub_recode in libTVVLCKit.a(ass.o)
_vbi_print_page_region in libTVVLCKit.a(exp-txt.o)
_export in libTVVLCKit.a(exp-txt.o)
_vlc_iconv_open in libTVVLCKit.a(libc.o)
_vbi_ucs2be in libTVVLCKit.a(export.o)
_smb_iconv in libTVVLCKit.a(smb_utils.o)
__vbi_iconv_open in libTVVLCKit.a(conv.o)
...
(maybe you meant: __vbi_iconv_open, _vlc_iconv_open )
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Also getting a lot of:
Code: Select all
ld: warning: URGENT: building for tvOS simulator, but linking in object file
This might be problems in the future I guess. Any tips appretiated!
Re: tvos compilation problem
Posted: 25 Oct 2015 16:35
by matrog
For iconv include iconv lib, for the player i started from the examples included in the vlckit
Re: tvos compilation problem
Posted: 25 Oct 2015 23:26
by obia
Thanks once again, it's now building wihout errors. As for the viewcontroller I'll start with the IOS version and work my way through to a more TV-like experience.
Re: tvos compilation problem
Posted: 02 Nov 2015 12:42
by ilvolodel
Hi @matrog thanks a lot for your support.
I'm trying to follow your guide but during the building process I got this error:
"library not found for -lTVVLCKit"
I'm not sure about this step:
"8. Add the new libTVVLCKit.a to your project"
Only drag in to my project?
Any idea to solve the problem?
Thanks in advance.
ilvolodel
Re: tvos compilation problem
Posted: 02 Nov 2015 20:26
by obia
Sorry to hijack this thread again..
@magrot: VLC is working fine in both the simulator and on the device itself. However, when I try to archive I get the following error:
Code: Select all
ld: bitcode bundle could not be generated because '/Users/tobias/Dropbox/Dev/fireflixtv/fireflixtv/libTVVLCKit.a(VLCMedia.o)' was built without full bitcode. All object files and libraries for bitcode must be generated from Xcode Archive or Install build for architecture arm64
I understand that vlc must be built with bitcode support for TVOS. Question is where I do that? In the build script or in xcode somewhere?
Now, let's see if I an give something back to the community
@ilvolodel: copy the libTVVLCKit.a to your project folder. In Xcode, go to your Target->Build Phases->Link Binary With libraries. Press the + sign and then "Add other" and browse to the libTVVLCKit.a
Re: tvos compilation problem
Posted: 03 Nov 2015 11:02
by matrog
Bitcode is build setting of MobileKit project...switch to tvkit and enable it
Re: tvos compilation problem
Posted: 03 Nov 2015 11:43
by obia
The problem is that there is no bitcode options when selecting TVVLCKit:
When checking the other targets they already have bitcode enabled.
Re: tvos compilation problem
Posted: 03 Nov 2015 14:54
by matrog
that's strange...there is only for MobileVLCKit.
Unfortunately i cannot try since I no longer can compile due to other issues..there's another thread about that.
Once I can compile again I'll let you know.
Re: tvos compilation problem
Posted: 03 Nov 2015 23:51
by kalmicka
I did the following
1. downloaded zip file
2.
3.
4. Opened MobileVLCKit.xcodeproj in Xcode, switched to TVVLCKit and built successfully for device.
5. built successfully for device simulator
6. Open terminal, go to the folder where Xcode produced libTVVLCKit.a file (for me /Users/xxxxx/Library/Developer/Xcode/DerivedData/MobileVLCKit-cajvscpvucjubqcjljaxxzklzcas/Build/Products/)
7. Run the following to have a static lib for tv and simu
Code: Select all
lipo -create Debug-appletvos/libTVVLCKit.a Debug-appletvsimulator/libTVVLCKit.a -o libTVVLCKit.a
8. Add the new libTVVLCKit.a to your project
Hey guys,
I followed this thread really carefully but everything I tried failed. Can't seem to create the static Library. Step 1& 2 are fine but Step 3 throws an error for me. Anyone else having this issue? Is there any place to get a precompiled version of this? Compiled over 20 times now, tried different version and still nothing.
I would really appreciate the help.
Thanks
Re: tvos compilation problem
Posted: 04 Nov 2015 08:49
by matrog
point 3 is raising an error for everyone I guess, please see this
https://forum.videolan.org/viewtopic.php?f=36&t=129127
I can share my libTVVLCKit.a (and .h files) to see if works, but it's not the latest version.
Re: tvos compilation problem
Posted: 04 Nov 2015 09:32
by obia
@matrog: if it's with bitcode enabled then please share