GNOME Bugzilla – Bug 766366
ios: Build new C++ STL
Last modified: 2017-03-09 12:03:27 UTC
Created attachment 327773 [details] Missing libraries folder from installed GStreamer.Framework for iOS 9.3 I built gstreamer-1.0 release 1.9.0.1 using the cross-ios-arm64.cbc configuration, on Mac OS X 10.11.4 using Xcode 7.3.0. When I run the gstreamer-1.0-devel-1.9.0.1-ios-arm64.pkg, it does not install the Libraries to the /User/elvis/Library/Developer/GStreamer.iPhone.sdk/GStreaner.framework When I try to build iOS Tutorial 3, it complains because it cannot find the required plugins in the iOS GStreamer.Framework. Undefined symbols for architecture arm64: "_gst_plugin_liveadder_register", referenced from: _gst_ios_init in gst_ios_init.o ld: symbol(s) not found for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invocation)
There's only the huge "GStreamer" static library that contains everything, you see it on your screenshot too. Also liveadder is not in 1.8 anymore as a plugin. You need to update your gst_ios_init.h/m files.
Removing liveadder from Tutorial 3 allow the program to build and run correctly. However, Tutorial 4 has several linker problems as well: Undefined symbols for architecture arm64: "std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::append(std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > const&)", referenced from: TagLib::String::operator+=(TagLib::String const&) in GStreamer(libtag_a_arm64_-tstring.cpp.o) operator+(TagLib::String const&, TagLib::String const&) in GStreamer(libtag_a_arm64_-tstring.cpp.o) operator+(char const*, TagLib::String const&) in GStreamer(libtag_a_arm64_-tstring.cpp.o) operator+(TagLib::String const&, char const*) in GStreamer(libtag_a_arm64_-tstring.cpp.o) "std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::_Rep::_S_terminal", referenced from: TagLib::String::upper() const in GStreamer(libtag_a_arm64_-tstring.cpp.o) TagLib::String::operator+=(char) in GStreamer(libtag_a_arm64_-tstring.cpp.o) TagLib::String::operator+=(wchar_t) in GStreamer(libtag_a_arm64_-tstring.cpp.o) "std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::basic_string(std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > const&, unsigned long, unsigned long)", referenced from: TagLib::String::substr(unsigned int, unsigned int) const in GStreamer(libtag_a_arm64_-tstring.cpp.o) "std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::assign(std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > const&)", referenced from: TagLib::String::substr(unsigned int, unsigned int) const in GStreamer(libtag_a_arm64_-tstring.cpp.o) "std::string::assign(char const*, unsigned long)", referenced from: TagLib::String::to8Bit(bool) const in GStreamer(libtag_a_arm64_-tstring.cpp.o) "std::string::resize(unsigned long, char)", referenced from: TagLib::String::to8Bit(bool) const in GStreamer(libtag_a_arm64_-tstring.cpp.o) "std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::find(wchar_t const*, unsigned long, unsigned long) const", referenced from: TagLib::String::find(TagLib::String const&, int) const in GStreamer(libtag_a_arm64_-tstring.cpp.o) "std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::resize(unsigned long, wchar_t)", referenced from: TagLib::String::prepare(TagLib::String::Type) in GStreamer(libtag_a_arm64_-tstring.cpp.o) TagLib::String::String(char const*, TagLib::String::Type) in GStreamer(libtag_a_arm64_-tstring.cpp.o) TagLib::String::String(TagLib::ByteVector const&, TagLib::String::Type) in GStreamer(libtag_a_arm64_-tstring.cpp.o) TagLib::String::operator=(char const*) in GStreamer(libtag_a_arm64_-tstring.cpp.o) "std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::_Rep::_M_destroy(std::allocator<wchar_t> const&)", referenced from: TagLib::String::~String() in GStreamer(libtag_a_arm64_-tstring.cpp.o) TagLib::String::~String() in GStreamer(libtag_a_arm64_-tstring.cpp.o) TagLib::String::startsWith(TagLib::String const&) const in GStreamer(libtag_a_arm64_-tstring.cpp.o) TagLib::String::substr(unsigned int, unsigned int) const in GStreamer(libtag_a_arm64_-tstring.cpp.o) TagLib::String::upper() const in GStreamer(libtag_a_arm64_-tstring.cpp.o) TagLib::String::number(int) in GStreamer(libtag_a_arm64_-tstring.cpp.o) TagLib::String::operator=(TagLib::String const&) in GStreamer(libtag_a_arm64_-tstring.cpp.o) ...
If you change the iOS target in XCode to 6.0 (or maybe 7.0 is enough) should fix that one. We should build the next binaries against the new C++ STL.
I've managed to fix the build issues for iOS Tutorials 3 and 4 now. I will send across a pull request with the fixes. It would be better to create a branch for the git://people.freedesktop.org/~slomo/gst-sdk-tutorials repository. Against what element do you recommend that a branch be created? - gstreamer release version - Xcode release version - iOS SDK version ? Or do we track a combination e.g. gst-1.9-xcode-7.3 ?
BTW, the solution for the C++ STL errors was to add libstdc++.6.0.9.tbd to the Build Phases > Link Binary with Libraries section. I also had to additionally modify the gst_ios_init.m file to remote the liveaddr and fragmented plugins, to get the project to build. diff --git a/gst-sdk/tutorials/xcode iOS/Tutorial 4/gst_ios_init.m b/gst-sdk/tutorials/xcode iOS/Tutorial 4/gst_ios_init.m index 403f9f9..b8381db 100644 --- a/gst-sdk/tutorials/xcode iOS/Tutorial 4/gst_ios_init.m +++ b/gst-sdk/tutorials/xcode iOS/Tutorial 4/gst_ios_init.m @@ -261,9 +261,6 @@ GST_PLUGIN_STATIC_DECLARE(interlace); #if defined(GST_IOS_PLUGIN_IVTC) || defined(GST_IOS_PLUGINS_EFFECTS) GST_PLUGIN_STATIC_DECLARE(ivtc); #endif -#if defined(GST_IOS_PLUGIN_LIVEADDER) || defined(GST_IOS_PLUGINS_EFFECTS) -GST_PLUGIN_STATIC_DECLARE(liveadder); -#endif #if defined(GST_IOS_PLUGIN_RAWPARSE) || defined(GST_IOS_PLUGINS_EFFECTS) GST_PLUGIN_STATIC_DECLARE(rawparse); #endif @@ -767,9 +764,6 @@ gst_ios_init (void) #if defined(GST_IOS_PLUGIN_IVTC) || defined(GST_IOS_PLUGINS_EFFECTS) GST_PLUGIN_STATIC_REGISTER(ivtc); #endif -#if defined(GST_IOS_PLUGIN_LIVEADDER) || defined(GST_IOS_PLUGINS_EFFECTS) - GST_PLUGIN_STATIC_REGISTER(liveadder); -#endif #if defined(GST_IOS_PLUGIN_RAWPARSE) || defined(GST_IOS_PLUGINS_EFFECTS) GST_PLUGIN_STATIC_REGISTER(rawparse); #endif @@ -890,9 +884,6 @@ gst_ios_init (void) #if defined(GST_IOS_PLUGIN_DVDSPU) || defined(GST_IOS_PLUGINS_CODECS) GST_PLUGIN_STATIC_REGISTER(dvdspu); #endif -#if defined(GST_IOS_PLUGIN_FRAGMENTED) || defined(GST_IOS_PLUGINS_CODECS) - GST_PLUGIN_STATIC_REGISTER(fragmented); -#endif #if defined(GST_IOS_PLUGIN_ID3TAG) || defined(GST_IOS_PLUGINS_CODECS) GST_PLUGIN_STATIC_REGISTER(id3tag); #endif
This one should also be solved now, probably by upgrading the minimum supported SDK version. It prevents usage of GStreamer with newer SDK versions and e.g. prevents usage of swift because of that.
Let's make this not a blocker anymore. It needs someone to look into enabling the new STL, and we're late into 1.10 now. Something for 1.12 I guess.
The problem seems to be that the taglib build links against libstdc++. I'm trying to locally bump the minimum iOS version to 7.0 (where libc++ is the default).
Might need changes in the taglib cmake build system then, if just updating the minimum iOS version is not enough to make it all work
The minimum iOS version change was enough, but I'm still getting missing C++ symbols. Kind of stuck on this, so will take a re-look later.
http://cgit.freedesktop.org/gstreamer/cerbero/commit/?id=966c688c0f3097317119bd61b5f99f984f321ac1