tvos compilation problem

iOS, iPad, iPhone, tvOS specific usage questions
matrog
Blank Cone
Blank Cone
Posts: 42
Joined: 27 Sep 2015 08:55

tvos compilation problem

Postby matrog » 27 Sep 2015 09:02

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

Code: Select all

./buildMobileVLCKit.sh -f -t
any idea?

Thanks,

Matteo

jasin755
New Cone
New Cone
Posts: 9
Joined: 26 Sep 2015 15:56

Re: tvos compilation problem

Postby jasin755 » 27 Sep 2015 09:12

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.

matrog
Blank Cone
Blank Cone
Posts: 42
Joined: 27 Sep 2015 08:55

Re: tvos compilation problem

Postby matrog » 27 Sep 2015 11:43

Ok, compiled with Xcode, added both .a file and headers to my project now I get this

Image

that looks to me impossible

Image

Thanks,

jasin755
New Cone
New Cone
Posts: 9
Joined: 26 Sep 2015 15:56

Re: tvos compilation problem

Postby jasin755 » 27 Sep 2015 12:01

Copy *.a file and headers into your project. Replace all you import to:

#import "TVVLCKit.h"

when you start typing so you receive autocomplete.

matrog
Blank Cone
Blank Cone
Posts: 42
Joined: 27 Sep 2015 08:55

Re: tvos compilation problem

Postby matrog » 27 Sep 2015 13:40

I think I've done but probably it's my fault

I'm trying with this example https://mega.nz/#!ahMW0bwA!USoUVlehDrXU ... UjfZ8Lc0fk

matrog
Blank Cone
Blank Cone
Posts: 42
Joined: 27 Sep 2015 08:55

Re: tvos compilation problem

Postby matrog » 27 Sep 2015 15:59

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: ..........

fkuehne
Developer
Developer
Posts: 7241
Joined: 16 Mar 2004 19:37
VLC version: 0.4.6 - present
Operating System: Darwin
Location: Germany
Contact:

Re: tvos compilation problem

Postby fkuehne » 28 Sep 2015 08:56

You don't link against libc++.
VideoLAN
Felix Paul Kühne
Medic. VLC developer for appleOS since before you were born.
Blog: https://www.feepk.net

matrog
Blank Cone
Blank Cone
Posts: 42
Joined: 27 Sep 2015 08:55

Re: tvos compilation problem

Postby matrog » 28 Sep 2015 19:00

oh...i'm so stupid..thanks!

finbarr
New Cone
New Cone
Posts: 3
Joined: 24 Sep 2015 16:00

Re: tvos compilation problem

Postby finbarr » 21 Oct 2015 17:49

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

matrog
Blank Cone
Blank Cone
Posts: 42
Joined: 27 Sep 2015 08:55

Re: tvos compilation problem

Postby matrog » 21 Oct 2015 20:13

Hi, I only added the following libc++.tbd lib to xcode

Image

finbarr
New Cone
New Cone
Posts: 3
Joined: 24 Sep 2015 16:00

Re: tvos compilation problem

Postby finbarr » 21 Oct 2015 20:50

Afraid I amn't having much luck..

Image

matrog
Blank Cone
Blank Cone
Posts: 42
Joined: 27 Sep 2015 08:55

Re: tvos compilation problem

Postby matrog » 22 Oct 2015 06:58

Remove that and import every single VLC*.h file

obia
Blank Cone
Blank Cone
Posts: 20
Joined: 11 Apr 2014 13:34

Re: tvos compilation problem

Postby obia » 25 Oct 2015 07:36

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!

matrog
Blank Cone
Blank Cone
Posts: 42
Joined: 27 Sep 2015 08:55

Re: tvos compilation problem

Postby matrog » 25 Oct 2015 07:45

I did the following
1. downloaded zip file
2.

Code: Select all

./buildMobileVLCKit.sh -t
3.

Code: Select all

./buildMobileVLCKit.sh -t -s
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

obia
Blank Cone
Blank Cone
Posts: 20
Joined: 11 Apr 2014 13:34

Re: tvos compilation problem

Postby obia » 25 Oct 2015 14:19

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!

matrog
Blank Cone
Blank Cone
Posts: 42
Joined: 27 Sep 2015 08:55

Re: tvos compilation problem

Postby matrog » 25 Oct 2015 16:35

For iconv include iconv lib, for the player i started from the examples included in the vlckit

obia
Blank Cone
Blank Cone
Posts: 20
Joined: 11 Apr 2014 13:34

Re: tvos compilation problem

Postby obia » 25 Oct 2015 23:26

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.

ilvolodel
New Cone
New Cone
Posts: 1
Joined: 02 Nov 2015 12:29

Re: tvos compilation problem

Postby ilvolodel » 02 Nov 2015 12:42

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

obia
Blank Cone
Blank Cone
Posts: 20
Joined: 11 Apr 2014 13:34

Re: tvos compilation problem

Postby obia » 02 Nov 2015 20:26

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

matrog
Blank Cone
Blank Cone
Posts: 42
Joined: 27 Sep 2015 08:55

Re: tvos compilation problem

Postby matrog » 03 Nov 2015 11:02

Bitcode is build setting of MobileKit project...switch to tvkit and enable it

obia
Blank Cone
Blank Cone
Posts: 20
Joined: 11 Apr 2014 13:34

Re: tvos compilation problem

Postby obia » 03 Nov 2015 11:43

The problem is that there is no bitcode options when selecting TVVLCKit:

Image

When checking the other targets they already have bitcode enabled.

matrog
Blank Cone
Blank Cone
Posts: 42
Joined: 27 Sep 2015 08:55

Re: tvos compilation problem

Postby matrog » 03 Nov 2015 14:54

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.

kalmicka
New Cone
New Cone
Posts: 1
Joined: 13 Oct 2015 21:08

Re: tvos compilation problem

Postby kalmicka » 03 Nov 2015 23:51

I did the following
1. downloaded zip file
2.

Code: Select all

./buildMobileVLCKit.sh -t
3.

Code: Select all

./buildMobileVLCKit.sh -t -s
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

matrog
Blank Cone
Blank Cone
Posts: 42
Joined: 27 Sep 2015 08:55

Re: tvos compilation problem

Postby matrog » 04 Nov 2015 08:49

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.

obia
Blank Cone
Blank Cone
Posts: 20
Joined: 11 Apr 2014 13:34

Re: tvos compilation problem

Postby obia » 04 Nov 2015 09:32

@matrog: if it's with bitcode enabled then please share :)


Return to “VLC for iOS, iPadOS and Apple TV”

Who is online

Users browsing this forum: No registered users and 9 guests