Clang error with Charts Premium version 2.3 with deployment target at 7.0


#1

I will try to describe the error as precisely as I can.

My XCode 5-DP6 project use Shinobi Charts Premium. As I just bought my license, I tried to use the very last version 2.3.1 (and also 2.3)

When I compile my project I get the following error.

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)

If I go back in time and replace the library with version 2.2.1 the error disappear and the project gives me a working app.

If I upgrade to 2.3.1 or 2.3.0 I get the linker error mentionned above.

Is there something that needs to be done when upgrading from 2.2.1 to 2.3?
any other clue as why the error happens?

Few more details.

  • This happens with XCode5-DP6 and iOS 7 latest SDK
  • When I go from 2.2.1 to 2.3, I only replace the library and change absolutely nothing else in the project. Upgrading produces the error, downgrading eliminates it. And so on…
  • Deployment target is set at iOS7 (by design the app is iOS7 only)
  • The project also uses Essentials v2.0 (although I don’t see why the problem would be related to that)
  • It’s not a warning, it’s a real error that prevent XCode from building the app.
  • In the same environment I tried to open a sample project from 2.3.1 and run it. I was able to compile and run the AddingAnnotation project out of the box without any change to the project coming with the release.
    BUT when I change the deployment target to 7.0 (the project has a 6.0 deployment by default) than it produces the same error.

So I strongly suspect that when compiled with a deployment target of 7.0, version 2.3 and 2.3.1 generate the clang error. If the deployment target is set at 6.0, everything is fine. You should be able to replicate that behavior using your own the AddingAnnotation project.

Hope this help and the issue can be resolved soon, I am actually interested in using one of the last features of version 2.3.1 but my project requires 7.0 only.

L


#2

I am getting this too on the GM and the latest 2.5.3 release of charts!  Major suck considering the rendering bug on the 5s!


#3

I worked around a similar issue by linking with  libstdc++.6.0.9.dylib instead of libstd++.dylib. 

Good luck.


#4

Awesome, that fixed it for me!