Build fail with Charts Premium 2.5 and deployment target iOS 7.0


#1

I upgraded from 2.2.1 to 2.5 tonight and when I build my app I get the following error

I already reported this error before with version 2.3 but 2.5 is now supposed to be compatible with iOS 7

the only prblem is that if you select a target deployement at 7 and not 6.1. X Code give you this error.

A good way to demonstrate that is to use a sample project provided with Shinobi Charts Premium 2.5 try to build it with deployement target 6.1 and everything is fine, switch to deployment target 7 and you get the error.

In my case the error is as below

Ld /Users/lcavalie/Library/Developer/Xcode/DerivedData/tradingtracker-dusrtogumxyfsvecjoolsinbtwsr/Build/Products/Debug-iphonesimulator/Trading\ Tracker.app/Trading\ Tracker normal i386
    cd /Users/lcavalie/iOSDev/TradingTracker
    setenv IPHONEOS_DEPLOYMENT_TARGET 7.0
    setenv PATH "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch i386 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.0.sdk -L/Users/lcavalie/Library/Developer/Xcode/DerivedData/tradingtracker-dusrtogumxyfsvecjoolsinbtwsr/Build/Products/Debug-iphonesimulator -L/Users/lcavalie/iOSDev/TradingTracker/TestFlightSDK2 -F/Users/lcavalie/Library/Developer/Xcode/DerivedData/tradingtracker-dusrtogumxyfsvecjoolsinbtwsr/Build/Products/Debug-iphonesimulator -F/Users/lcavalie/iOSDev/TradingTracker -F/Applications/Xcode.app/Contents/Developer/Library/Frameworks -filelist /Users/lcavalie/Library/Developer/Xcode/DerivedData/tradingtracker-dusrtogumxyfsvecjoolsinbtwsr/Build/Intermediates/tradingtracker.build/Debug-iphonesimulator/Trading\ Tracker.build/Objects-normal/i386/Trading\ Tracker.LinkFileList -Xlinker -objc_abi_version -Xlinker 2 -fobjc-arc -fobjc-link-runtime -Xlinker -no_implicit_dylibs -mios-simulator-version-min=7.0 -Xlinker -sectcreate -Xlinker __TEXT -Xlinker__ entitlements -Xlinker /Users/lcavalie/Library/Developer/Xcode/DerivedData/tradingtracker-dusrtogumxyfsvecjoolsinbtwsr/Build/Intermediates/tradingtracker.build/Debug-iphonesimulator/Trading\ Tracker.build/Trading\ Tracker.xcent -framework ShinobiCharts -framework Security -lstdc++ -framework CoreText -framework CoreData -framework CoreGraphics -framework ShinobiEssentials -framework Foundation -framework StoreKit -framework UIKit -lz -framework QuartzCore -framework MessageUI -framework MobileCoreServices -framework SystemConfiguration -framework OpenGLES -framework AdSupport -framework Crashlytics -lTestFlight -framework YAJLiOS -Xlinker -dependency_info -Xlinker /Users/lcavalie/Library/Developer/Xcode/DerivedData/tradingtracker-dusrtogumxyfsvecjoolsinbtwsr/Build/Intermediates/tradingtracker.build/Debug-iphonesimulator/Trading\ Tracker.build/Objects-normal/i386/Trading\ Tracker_dependency_info.dat -o /Users/lcavalie/Library/Developer/Xcode/DerivedData/tradingtracker-dusrtogumxyfsvecjoolsinbtwsr/Build/Products/Debug-iphonesimulator/Trading\ Tracker.app/Trading\ Tracker

Undefined symbols for architecture i386:
  "std::_Rb_tree_decrement(std::_Rb_tree_node_base*)", referenced from:
      SChartGL::Drawer::endRender(SChartGL::AnimationManager*) in ShinobiCharts(ShinobiCharts)
      std::_Rb_tree<SChartGL::RenderDataType, std::pair<SChartGL::RenderDataType const, std::vector<SChartGL::RenderData, std::allocator<SChartGL::RenderData> > >, std::_Select1st<std::pair<SChartGL::RenderDataType const, std::vector<SChartGL::RenderData, std::allocator<SChartGL::RenderData> > > >, std::less<SChartGL::RenderDataType>, std::allocator<std::pair<SChartGL::RenderDataType const, std::vector<SChartGL::RenderData, std::allocator<SChartGL::RenderData> > > > >::_M_insert_unique(std::_Rb_tree_iterator<std::pair<SChartGL::RenderDataType const, std::vector<SChartGL::RenderData, std::allocator<SChartGL::RenderData> > > >, std::pair<SChartGL::RenderDataType const, std::vector<SChartGL::RenderData, std::allocator<SChartGL::RenderData> > > const&) in ShinobiCharts(ShinobiCharts)
      std::_Rb_tree<SChartGL::RenderDataType, std::pair<SChartGL::RenderDataType const, std::vector<SChartGL::RenderData, std::allocator<SChartGL::RenderData> > >, std::_Select1st<std::pair<SChartGL::RenderDataType const, std::vector<SChartGL::RenderData, std::allocator<SChartGL::RenderData> > > >, std::less<SChartGL::RenderDataType>, std::allocator<std::pair<SChartGL::RenderDataType const, std::vector<SChartGL::RenderData, std::allocator<SChartGL::RenderData> > > > >::_M_insert_unique(std::pair<SChartGL::RenderDataType const, std::vector<SChartGL::RenderData, std::allocator<SChartGL::RenderData> > > const&) in ShinobiCharts(ShinobiCharts)
      std::_Rb_tree<std::tr1::shared_ptr<SChartGL::SeriesHandle const>, std::pair<std::tr1::shared_ptr<SChartGL::SeriesHandle const> const, std::map<SChartGL::RenderDataType, std::vector<SChartGL::RenderData, std::allocator<SChartGL::RenderData> >, std::less<SChartGL::RenderDataType>, std::allocator<std::pair<SChartGL::RenderDataType const, std::vector<SChartGL::RenderData, std::allocator<SChartGL::RenderData> > > > > >, std::_Select1st<std::pair<std::tr1::shared_ptr<SChartGL::SeriesHandle const> const, std::map<SChartGL::RenderDataType, std::vector<SChartGL::RenderData, std::allocator<SChartGL::RenderData> >, std::less<SChartGL::RenderDataType>, std::allocator<std::pair<SChartGL::RenderDataType const, std::vector<SChartGL::RenderData, std::allocator<SChartGL::RenderData> > > > > > >, SChartGL::Drawer::SeriesHandleCompare, std::allocator<std::pair<std::tr1::shared_ptr<SChartGL::SeriesHandle const> const, std::map<SChartGL::RenderDataType, std::vector<SChartGL::RenderData, std::allocator<SChartGL::RenderData> >, std::less<SChartGL::RenderDataType>, std::allocator<std::pair<SChartGL::RenderDataType const, std::vector<SChartGL::RenderData, std::allocator<SChartGL::RenderData> > > > > > > >::_M_insert_unique(std::_Rb_tree_iterator<std::pair<std::tr1::shared_ptr<SChartGL::SeriesHandle const> const, std::map<SChartGL::RenderDataType, std::vector<SChartGL::RenderData, std::allocator<SChartGL::RenderData> >, std::less<SChartGL::RenderDataType>, std::allocator<std::pair<SChartGL::RenderDataType const, std::vector<SChartGL::RenderData, std::allocator<SChartGL::RenderData> > > > > > >, std::pair<std::tr1::shared_ptr<SChartGL::SeriesHandle const> const, std::map<SChartGL::RenderDataType, std::vector<SChartGL::RenderData, std::allocator<SChartGL::RenderData> >, std::less<SChartGL::RenderDataType>, std::allocator<std::pair<SChartGL::RenderDataType const, std::vector<SChartGL::RenderData, std::allocator<SChartGL::RenderData> > > > > > const&) in ShinobiCharts(ShinobiCharts)
      std::_Rb_tree<std::tr1::shared_ptr<SChartGL::SeriesHandle const>, std::pair<std::tr1::shared_ptr<SChartGL::SeriesHandle const> const, std::map<SChartGL::RenderDataType, std::vector<SChartGL::RenderData, std::allocator<SChartGL::RenderData> >, std::less<SChartGL::RenderDataType>, std::allocator<std::pair<SChartGL::RenderDataType const, std::vector<SChartGL::RenderData, std::allocator<SChartGL::RenderData> > > > > >, std::_Select1st<std::pair<std::tr1::shared_ptr<SChartGL::SeriesHandle const> const, std::map<SChartGL::RenderDataType, std::vector<SChartGL::RenderData, std::allocator<SChartGL::RenderData> >, std::less<SChartGL::RenderDataType>, std::allocator<std::pair<SChartGL::RenderDataType const, std::vector<SChartGL::RenderData, std::allocator<SChartGL::RenderData> > > > > > >, SChartGL::Drawer::SeriesHandleCompare, std::allocator<std::pair<std::tr1::shared_ptr<SChartGL::SeriesHandle const> const, std::map<SChartGL::RenderDataType, std::vector<SChartGL::RenderData, std::allocator<SChartGL::RenderData> >, std::less<SChartGL::RenderDataType>, std::allocator<std::pair<SChartGL::RenderDataType const, std::vector<SChartGL::RenderData, std::allocator<SChartGL::RenderData> > > > > > > >::_M_insert_unique(std::pair<std::tr1::shared_ptr<SChartGL::SeriesHandle const> const, std::map<SChartGL::RenderDataType, std::vector<SChartGL::RenderData, std::allocator<SChartGL::RenderData> >, std::less<SChartGL::RenderDataType>, std::allocator<std::pair<SChartGL::RenderDataType const, std::vector<SChartGL::RenderData, std::allocator<SChartGL::RenderData> > > > > > const&) in ShinobiCharts(ShinobiCharts)
      std::_Rb_tree<std::tr1::shared_ptr<SChartGL::VboData>, std::tr1::shared_ptr<SChartGL::VboData>, std::_Identity<std::tr1::shared_ptr<SChartGL::VboData> >, SChartGL::VboSet::VboLessThan, std::allocator<std::tr1::shared_ptr<SChartGL::VboData> > >::_M_insert_unique(std::tr1::shared_ptr<SChartGL::VboData> const&) in ShinobiCharts(ShinobiCharts)
  "std::_Rb_tree_increment(std::_Rb_tree_node_base const*)", referenced from:
      SChartGL::Drawer::renderRenderData(std::map<SChartGL::RenderDataType, std::vector<SChartGL::RenderData, std::allocator<SChartGL::RenderData> >, std::less<SChartGL::RenderDataType>, std::allocator<std::pair<SChartGL::RenderDataType const, std::vector<SChartGL::RenderData, std::allocator<SChartGL::RenderData> > > > > const&, int*, SChartGL::AnimationManager*) in ShinobiCharts(ShinobiCharts)
      SChartGL::VboSet::bufferDirtyData() in ShinobiCharts(ShinobiCharts)
      SChartGL::VboSet::totalDataSize() const in ShinobiCharts(ShinobiCharts)
  "std::_Rb_tree_increment(std::_Rb_tree_node_base*)", referenced from:
      SChartGL::Drawer::endRender(SChartGL::AnimationManager*) in ShinobiCharts(ShinobiCharts)
      SChartGL::Drawer::updateRenderQueue(std::tr1::shared_ptr<SChartGL::SeriesHandle const>, SChartGLTranslation const*, bool) in ShinobiCharts(ShinobiCharts)
      SChartGL::Drawer::updateRenderQueue(std::tr1::shared_ptr<SChartGL::SeriesHandle const>, int, float, float, float, bool) in ShinobiCharts(ShinobiCharts)
      SChartGL::Drawer::addDirtyVbos(std::map<std::tr1::shared_ptr<SChartGL::SeriesHandle const>, std::map<SChartGL::RenderDataType, std::vector<SChartGL::RenderData, std::allocator<SChartGL::RenderData> >, std::less<SChartGL::RenderDataType>, std::allocator<std::pair<SChartGL::RenderDataType const, std::vector<SChartGL::RenderData, std::allocator<SChartGL::RenderData> > > > >, SChartGL::Drawer::SeriesHandleCompare, std::allocator<std::pair<std::tr1::shared_ptr<SChartGL::SeriesHandle const> const, std::map<SChartGL::RenderDataType, std::vector<SChartGL::RenderData, std::allocator<SChartGL::RenderData> >, std::less<SChartGL::RenderDataType>, std::allocator<std::pair<SChartGL::RenderDataType const, std::vector<SChartGL::RenderData, std::allocator<SChartGL::RenderData> > > > > > > >&) in ShinobiCharts(ShinobiCharts)
      std::_Rb_tree<SChartGL::RenderDataType, std::pair<SChartGL::RenderDataType const, std::vector<SChartGL::RenderData, std::allocator<SChartGL::RenderData> > >, std::_Select1st<std::pair<SChartGL::RenderDataType const, std::vector<SChartGL::RenderData, std::allocator<SChartGL::RenderData> > > >, std::less<SChartGL::RenderDataType>, std::allocator<std::pair<SChartGL::RenderDataType const, std::vector<SChartGL::RenderData, std::allocator<SChartGL::RenderData> > > > >::_M_insert_unique(std::_Rb_tree_iterator<std::pair<SChartGL::RenderDataType const, std::vector<SChartGL::RenderData, std::allocator<SChartGL::RenderData> > > >, std::pair<SChartGL::RenderDataType const, std::vector<SChartGL::RenderData, std::allocator<SChartGL::RenderData> > > const&) in ShinobiCharts(ShinobiCharts)
      std::_Rb_tree<std::tr1::shared_ptr<SChartGL::SeriesHandle const>, std::pair<std::tr1::shared_ptr<SChartGL::SeriesHandle const> const, std::map<SChartGL::RenderDataType, std::vector<SChartGL::RenderData, std::allocator<SChartGL::RenderData> >, std::less<SChartGL::RenderDataType>, std::allocator<std::pair<SChartGL::RenderDataType const, std::vector<SChartGL::RenderData, std::allocator<SChartGL::RenderData> > > > > >, std::_Select1st<std::pair<std::tr1::shared_ptr<SChartGL::SeriesHandle const> const, std::map<SChartGL::RenderDataType, std::vector<SChartGL::RenderData, std::allocator<SChartGL::RenderData> >, std::less<SChartGL::RenderDataType>, std::allocator<std::pair<SChartGL::RenderDataType const, std::vector<SChartGL::RenderData, std::allocator<SChartGL::RenderData> > > > > > >, SChartGL::Drawer::SeriesHandleCompare, std::allocator<std::pair<std::tr1::shared_ptr<SChartGL::SeriesHandle const> const, std::map<SChartGL::RenderDataType, std::vector<SChartGL::RenderData, std::allocator<SChartGL::RenderData> >, std::less<SChartGL::RenderDataType>, std::allocator<std::pair<SChartGL::RenderDataType const, std::vector<SChartGL::RenderData, std::allocator<SChartGL::RenderData> > > > > > > >::_M_insert_unique(std::_Rb_tree_iterator<std::pair<std::tr1::shared_ptr<SChartGL::SeriesHandle const> const, std::map<SChartGL::RenderDataType, std::vector<SChartGL::RenderData, std::allocator<SChartGL::RenderData> >, std::less<SChartGL::RenderDataType>, std::allocator<std::pair<SChartGL::RenderDataType const, std::vector<SChartGL::RenderData, std::allocator<SChartGL::RenderData> > > > > > >, std::pair<std::tr1::shared_ptr<SChartGL::SeriesHandle const> const, std::map<SChartGL::RenderDataType, std::vector<SChartGL::RenderData, std::allocator<SChartGL::RenderData> >, std::less<SChartGL::RenderDataType>, std::allocator<std::pair<SChartGL::RenderDataType const, std::vector<SChartGL::RenderData, std::allocator<SChartGL::RenderData> > > > > > const&) in ShinobiCharts(ShinobiCharts)
      std::_Rb_tree<std::tr1::shared_ptr<SChartGL::VboData>, std::tr1::shared_ptr<SChartGL::VboData>, std::_Identity<std::tr1::shared_ptr<SChartGL::VboData> >, SChartGL::VboSet::VboLessThan, std::allocator<std::tr1::shared_ptr<SChartGL::VboData> > >::erase(std::_Rb_tree_iterator<std::tr1::shared_ptr<SChartGL::VboData> >, std::_Rb_tree_iterator<std::tr1::shared_ptr<SChartGL::VboData> >) in ShinobiCharts(ShinobiCharts)
      ...
  "std::__throw_length_error(char const*)", referenced from:
      std::vector<SChartGL::RenderData, std::allocator<SChartGL::RenderData> >::_M_insert_aux( __gnu_cxx::__ normal_iterator<SChartGL::RenderData*, std::vector<SChartGL::RenderData, std::allocator<SChartGL::RenderData> > >, SChartGL::RenderData const&) in ShinobiCharts(ShinobiCharts)
      std::vector<SChartGL::VboData*, std::allocator<SChartGL::VboData*> >::_M_insert_aux( __gnu_cxx::__ normal_iterator<SChartGL::VboData**, std::vector<SChartGL::VboData*, std::allocator<SChartGL::VboData*> > >, SChartGL::VboData* const&) in ShinobiCharts(ShinobiCharts)
  "std::_Rb_tree_rebalance_for_erase(std::_Rb_tree_node_base*, std::_Rb_tree_node_base&)", referenced from:
      std::_Rb_tree<std::tr1::shared_ptr<SChartGL::VboData>, std::tr1::shared_ptr<SChartGL::VboData>, std::_Identity<std::tr1::shared_ptr<SChartGL::VboData> >, SChartGL::VboSet::VboLessThan, std::allocator<std::tr1::shared_ptr<SChartGL::VboData> > >::erase(std::_Rb_tree_iterator<std::tr1::shared_ptr<SChartGL::VboData> >, std::_Rb_tree_iterator<std::tr1::shared_ptr<SChartGL::VboData> >) in ShinobiCharts(ShinobiCharts)
  "std::_Rb_tree_insert_and_rebalance(bool, std::_Rb_tree_node_base*, std::_Rb_tree_node_base*, std::_Rb_tree_node_base&)", referenced from:
      std::_Rb_tree<SChartGL::RenderDataType, std::pair<SChartGL::RenderDataType const, std::vector<SChartGL::RenderData, std::allocator<SChartGL::RenderData> > >, std::_Select1st<std::pair<SChartGL::RenderDataType const, std::vector<SChartGL::RenderData, std::allocator<SChartGL::RenderData> > > >, std::less<SChartGL::RenderDataType>, std::allocator<std::pair<SChartGL::RenderDataType const, std::vector<SChartGL::RenderData, std::allocator<SChartGL::RenderData> > > > >::_M_insert(std::_Rb_tree_node_base*, std::_Rb_tree_node_base*, std::pair<SChartGL::RenderDataType const, std::vector<SChartGL::RenderData, std::allocator<SChartGL::RenderData> > > const&) in ShinobiCharts(ShinobiCharts)
      std::_Rb_tree<std::tr1::shared_ptr<SChartGL::SeriesHandle const>, std::pair<std::tr1::shared_ptr<SChartGL::SeriesHandle const> const, std::map<SChartGL::RenderDataType, std::vector<SChartGL::RenderData, std::allocator<SChartGL::RenderData> >, std::less<SChartGL::RenderDataType>, std::allocator<std::pair<SChartGL::RenderDataType const, std::vector<SChartGL::RenderData, std::allocator<SChartGL::RenderData> > > > > >, std::_Select1st<std::pair<std::tr1::shared_ptr<SChartGL::SeriesHandle const> const, std::map<SChartGL::RenderDataType, std::vector<SChartGL::RenderData, std::allocator<SChartGL::RenderData> >, std::less<SChartGL::RenderDataType>, std::allocator<std::pair<SChartGL::RenderDataType const, std::vector<SChartGL::RenderData, std::allocator<SChartGL::RenderData> > > > > > >, SChartGL::Drawer::SeriesHandleCompare, std::allocator<std::pair<std::tr1::shared_ptr<SChartGL::SeriesHandle const> const, std::map<SChartGL::RenderDataType, std::vector<SChartGL::RenderData, std::allocator<SChartGL::RenderData> >, std::less<SChartGL::RenderDataType>, std::allocator<std::pair<SChartGL::RenderDataType const, std::vector<SChartGL::RenderData, std::allocator<SChartGL::RenderData> > > > > > > >::_M_insert(std::_Rb_tree_node_base*, std::_Rb_tree_node_base*, std::pair<std::tr1::shared_ptr<SChartGL::SeriesHandle const> const, std::map<SChartGL::RenderDataType, std::vector<SChartGL::RenderData, std::allocator<SChartGL::RenderData> >, std::less<SChartGL::RenderDataType>, std::allocator<std::pair<SChartGL::RenderDataType const, std::vector<SChartGL::RenderData, std::allocator<SChartGL::RenderData> > > > > > const&) in ShinobiCharts(ShinobiCharts)
      std::_Rb_tree<std::tr1::shared_ptr<SChartGL::VboData>, std::tr1::shared_ptr<SChartGL::VboData>, std::_Identity<std::tr1::shared_ptr<SChartGL::VboData> >, SChartGL::VboSet::VboLessThan, std::allocator<std::tr1::shared_ptr<SChartGL::VboData> > >::_M_insert(std::_Rb_tree_node_base*, std::_Rb_tree_node_base*, std::tr1::shared_ptr<SChartGL::VboData> const&) in ShinobiCharts(ShinobiCharts)
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)

XCode 5 GM

deployement target iOS 7 only

Looks like something is wrong somewhere or my build setting are not compatible but when I go back to version 2.2.1 everything works again.

Any help in solving this would be greatly appreciated

L


#2

You might try linking with libstdc++.6.0.9.dylib instead of libstd++.dylib.  It worked for me.

Good luck.


#3

Indeed it does solve the problem.

Maybe a mention in the official documentation would be a good idea.

Thanks a lot anyway for a great tip.

L


#4

Hey Guys,

Apple haven’t packaged an iOS7 libstdc++ yet, so the linker can’t find it. So at the moment, you’ll want to link with the iOS6 libstdc++ as cbolton explained. This will work, but it is the framework intended for iOS6, so you’ll want to link to libstdc++ when the iOS7 version comes out.

Thanks,
Jan


#5

That sounds like a great explanation, thanks.

Now, how do I know that Apple has packaged the new updated library  libstdc++ that works with iOS7 ?

L