lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

compilation errors from Xcode's new standard library


From: Mike Solomon
Subject: compilation errors from Xcode's new standard library
Date: Sun, 3 Nov 2013 10:09:18 +0100

Looks like some files in flower don't play nice with the most recent version of 
the standard library bundled with Xcode…

<snip>
clang: warning: argument unused during compilation: '-mno-fused-madd'
clang: warning: argument unused during compilation: '-L/usr/local/lib'
In file included from /Users/mikesolomon/devel/lilypond/flower/file-path.cc:21:
In file included from 
/Users/mikesolomon/devel/lilypond/flower/include/file-path.hh:23:
In file included from 
/Users/mikesolomon/devel/lilypond/flower/include/std-vector.hh:74:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/vector:1330:12:
 error: 
      calling a private constructor of class
      'std::__1::__wrap_iter<std::__1::basic_string<char> *>'
    return iterator(__p);
           ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/vector:1367:12:
 note: 
      in instantiation of member function
      'std::__1::__flower_vector<std::__1::basic_string<char>,
      std::__1::allocator<std::__1::basic_string<char> > >::__make_iter'
      requested here
    return __make_iter(this->__end_);
           ^
/Users/mikesolomon/devel/lilypond/flower/include/std-vector.hh:155:15: note: in
      instantiation of member function
      'std::__1::__flower_vector<std::__1::basic_string<char>,
      std::__1::allocator<std::__1::basic_string<char> > >::end' requested here
  v.insert (v.end (), w.begin (), w.end ());
              ^
/Users/mikesolomon/devel/lilypond/flower/file-path.cc:52:3: note: in
      instantiation of function template specialization
      'concat<std::__1::basic_string<char> >' requested here
  concat (dirs_, string_split (p, PATHSEP));
  ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/iterator:1187:31:
 note: 
      declared private here
    _LIBCPP_INLINE_VISIBILITY __wrap_iter(iterator_type __x) _NOEXCEPT ...
                              ^
In file included from /Users/mikesolomon/devel/lilypond/flower/file-path.cc:21:
In file included from 
/Users/mikesolomon/devel/lilypond/flower/include/file-path.hh:23:
In file included from 
/Users/mikesolomon/devel/lilypond/flower/include/std-vector.hh:74:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/vector:1342:12:
 error: 
      calling a private constructor of class 'std::__1::__wrap_iter<const
      std::__1::basic_string<char> *>'
    return const_iterator(__p);
           ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/vector:1359:12:
 note: 
      in instantiation of member function
      'std::__1::__flower_vector<std::__1::basic_string<char>,
      std::__1::allocator<std::__1::basic_string<char> > >::__make_iter'
      requested here
    return __make_iter(this->__begin_);
           ^
/Users/mikesolomon/devel/lilypond/flower/include/std-vector.hh:155:25: note: in
      instantiation of member function
      'std::__1::__flower_vector<std::__1::basic_string<char>,
      std::__1::allocator<std::__1::basic_string<char> > >::begin' requested
      here
  v.insert (v.end (), w.begin (), w.end ());
                        ^
/Users/mikesolomon/devel/lilypond/flower/file-path.cc:52:3: note: in
      instantiation of function template specialization
      'concat<std::__1::basic_string<char> >' requested here
  concat (dirs_, string_split (p, PATHSEP));
  ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/iterator:1187:31:
 note: 
      declared private here
    _LIBCPP_INLINE_VISIBILITY __wrap_iter(iterator_type __x) _NOEXCEPT ...
                              ^
</snip>

Going through the standard library files in question, here are some snippets…
I’ve added comments next to the problematic lines

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/c++/v1/vector
<snip>
template <class _Tp, class _Allocator>
_LIBCPP_INLINE_VISIBILITY inline
typename vector<_Tp, _Allocator>::iterator
vector<_Tp, _Allocator>::__make_iter(pointer __p) _NOEXCEPT
{
#if _LIBCPP_DEBUG_LEVEL >= 2
    return iterator(this, __p);
#else
    return iterator(__p); // MS  - this is where g++ freaks out
#endif
}
</snip>

and then…
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lib/c++/v1/iterator
<snip>
private:
    _LIBCPP_INLINE_VISIBILITY __wrap_iter(iterator_type __x) _NOEXCEPT : 
__i(__x) {} // MS  - this is where g++ freaks out
#if _LIBCPP_DEBUG_LEVEL >= 2
    _LIBCPP_INLINE_VISIBILITY __wrap_iter(const void* __p, iterator_type __x) : 
__i(__x)
    {
        __get_db()->__insert_ic(this, __p);
    }
#endif
 

</snip>

Any ideas for how to proceed?

Cheers,
MS


reply via email to

[Prev in Thread] Current Thread [Next in Thread]