lilypond-devel
[Top][All Lists]
Advanced

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

Re: lilly_libcxx.patch for building against libc++


From: Jack Howarth
Subject: Re: lilly_libcxx.patch for building against libc++
Date: Thu, 14 Nov 2013 16:29:21 -0500
User-agent: Mutt/1.5.18 (2008-05-17)

On Thu, Nov 14, 2013 at 09:55:33PM +0100, David Kastrup wrote:
> Jack Howarth <address@hidden> writes:
> 
> >    The attached patch, lilly_libcxx.patch, contains the changes which allow 
> > lilypond 2.17.95
> > to build against libc++ on Xcode 10.9 with the clang++ compiler. There is a 
> > glitch in the
> > configure/makefiles currently that requires that the user pass 
> > -DHAVE_STL_DATA_METHOD on
> > CXXFLAGS. The problem is odd as configure seems able to set...
> >
> > /* define if you have stl data () method */
> > #define HAVE_STL_DATA_METHOD 1
> >
> > in the top level config.hh but it doesn't seem to get passed down to 
> > flowers/include/std-vector.hh
> > when included in file-path.cc.
> 
> See <URL:http://code.google.com/p/lilypond/issues/detail?id=3656>
> 
> Can you explain what the problem with to_string is actually about?  Can
> we fix this in a way that does not require explicit scoping?

If I revert the patch segement...

--- lilypond-2.17.95/lily/arpeggio.cc.orig      2013-11-14 14:47:04.000000000 
-0500
+++ lilypond-2.17.95/lily/arpeggio.cc   2013-11-14 14:47:26.000000000 -0500
@@ -163,7 +163,7 @@
   if (dir)
     {
       Font_metric *fm = Font_interface::get_default_font (me);
-      arrow = fm->find_by_name ("scripts.arpeggio.arrow." + to_string (dir));
+      arrow = fm->find_by_name ("scripts.arpeggio.arrow." + std::to_string 
(dir));
       heads[dir] -= dir * arrow.extent (Y_AXIS).length ();
     }
 
tbe compilation with clang++ fails as follows...

# make
/Applications/Xcode.app/Contents/Developer/usr/bin/make --no-builtin-rules -C 
scripts/build
true
/Applications/Xcode.app/Contents/Developer/usr/bin/make --no-builtin-rules 
PACKAGE=LILYPOND package=lilypond -C python all &&  
/Applications/Xcode.app/Contents/Developer/usr/bin/make --no-builtin-rules 
PACKAGE=LILYPOND package=lilypond -C scripts all &&  
/Applications/Xcode.app/Contents/Developer/usr/bin/make --no-builtin-rules 
PACKAGE=LILYPOND package=lilypond -C flower all &&  
/Applications/Xcode.app/Contents/Developer/usr/bin/make --no-builtin-rules 
PACKAGE=LILYPOND package=lilypond -C lily all &&  
/Applications/Xcode.app/Contents/Developer/usr/bin/make --no-builtin-rules 
PACKAGE=LILYPOND package=lilypond -C mf all &&  
/Applications/Xcode.app/Contents/Developer/usr/bin/make --no-builtin-rules 
PACKAGE=LILYPOND package=lilypond -C ly all &&  
/Applications/Xcode.app/Contents/Developer/usr/bin/make --no-builtin-rules 
PACKAGE=LILYPOND package=lilypond -C tex all &&  
/Applications/Xcode.app/Contents/Developer/usr/bin/make --no-builtin-rules 
PACKAGE=LILYPOND package=lilypond -C ps all &&  
/Applications/Xcode.app/Contents/Developer/usr/bin/make --no-builtin-rules 
PACKAGE=LILYPOND package=lilypond -C scm all &&  
/Applications/Xcode.app/Contents/Developer/usr/bin/make --no-builtin-rules 
PACKAGE=LILYPOND package=lilypond -C po all &&  
/Applications/Xcode.app/Contents/Developer/usr/bin/make --no-builtin-rules 
PACKAGE=LILYPOND package=lilypond -C elisp all &&  
/Applications/Xcode.app/Contents/Developer/usr/bin/make --no-builtin-rules 
PACKAGE=LILYPOND package=lilypond -C vim all &&  
/Applications/Xcode.app/Contents/Developer/usr/bin/make --no-builtin-rules 
PACKAGE=LILYPOND package=lilypond -C input all &&  
/Applications/Xcode.app/Contents/Developer/usr/bin/make --no-builtin-rules 
PACKAGE=LILYPOND package=lilypond -C Documentation all && true
/Applications/Xcode.app/Contents/Developer/usr/bin/make PACKAGE=LILYPOND 
package=lilypond -C auxiliar all && true
true
/Applications/Xcode.app/Contents/Developer/usr/bin/make PACKAGE=LILYPOND 
package=lilypond -C build man && true
true
/Applications/Xcode.app/Contents/Developer/usr/bin/make PACKAGE=LILYPOND 
package=lilypond -C build all && true
true
true
rm -f ./out/arpeggio.dep; DEPENDENCIES_OUTPUT="./out/arpeggio.dep 
./out/arpeggio.o" g++ -c -Woverloaded-virtual  -I/sw/include/python2.7 
-I/sw/include/python2.7 -fno-strict-aliasing -g -g -fwrapv -fwrapv 
-I/sw/include -DHAVE_CONFIG_H  -DNDEBUG -I./include -I./out -I../flower/include 
-I../flower/./out -I../flower/include  -DHAVE_STL_DATA_METHOD  -O2 
-finline-functions -g -pipe -I/sw/include -I/sw/include -D_THREAD_SAFE  
-I/sw/include/freetype2 -I/sw/include -I/sw/include/pango-1.0 
-I/sw/include/freetype2 -I/sw/include -I/sw/include/glib-2.0 
-I/sw/lib/glib-2.0/include  -W -Wall -Wconversion -o out/arpeggio.o arpeggio.cc
In file included from arpeggio.cc:20:
In file included from ./include/arpeggio.hh:24:
In file included from ./include/grob-interface.hh:23:
In file included from ./include/lily-guile.hh:27:
In file included from /sw/include/libguile.h:24:
/sw/include/gmp.h:1791:30: warning: operand of ? changes signedness: 'const 
int' to 'size_t' (aka 'unsigned long')
      [-Wsign-conversion]
  return __GMP_ABS (__gmp_z->_mp_size);
  ~~~~~~            ~~~~~~~~~^~~~~~~~
/sw/include/gmp.h:444:37: note: expanded from macro '__GMP_ABS'
#define __GMP_ABS(x)   ((x) >= 0 ? (x) : -(x))
                                    ^
/sw/include/gmp.h:1791:10: warning: operand of ? changes signedness: 'int' to 
'size_t' (aka 'unsigned long') [-Wsign-conversion]
  return __GMP_ABS (__gmp_z->_mp_size);
  ~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/sw/include/gmp.h:444:42: note: expanded from macro '__GMP_ABS'
#define __GMP_ABS(x)   ((x) >= 0 ? (x) : -(x))
                                         ^~~~
In file included from arpeggio.cc:26:
./include/lookup.hh:27:1: warning: 'Lookup' defined as a struct here but 
previously declared as a class [-Wmismatched-tags]
struct Lookup
^
./include/lily-proto.hh:100:1: note: did you mean struct here?
class Lookup;
^~~~~
struct
arpeggio.cc:166:61: error: call to 'to_string' is ambiguous
      arrow = fm->find_by_name ("scripts.arpeggio.arrow." + to_string (dir));
                                                            ^~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/string:3999:8:
 note: candidate
      function
string to_string(int __val);
       ^
../flower/include/std-string.hh:44:8: note: candidate function
string to_string (int i, char const *format = 0);
       ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/string:4000:8:
 note: candidate
      function
string to_string(unsigned __val);
       ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/string:4001:8:
 note: candidate
      function
string to_string(long __val);
       ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/string:4002:8:
 note: candidate
      function
string to_string(unsigned long __val);
       ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/string:4003:8:
 note: candidate
      function
string to_string(long long __val);
       ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/string:4004:8:
 note: candidate
      function
string to_string(unsigned long long __val);
       ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/string:4005:8:
 note: candidate
      function
string to_string(float __val);
       ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/string:4006:8:
 note: candidate
      function
string to_string(double __val);
       ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/string:4007:8:
 note: candidate
      function
string to_string(long double __val);
       ^
../flower/include/std-string.hh:43:8: note: candidate function
string to_string (char c, int n = 1);
       ^
../flower/include/std-string.hh:45:8: note: candidate function
string to_string (double f, char const *format = 0);
       ^
../flower/include/std-string.hh:46:8: note: candidate function
string to_string (long);
       ^
../flower/include/std-string.hh:47:8: note: candidate function
string to_string (long unsigned);
       ^
../flower/include/std-string.hh:48:8: note: candidate function
string to_string (I64, char const *format = 0);
       ^
../flower/include/std-string.hh:49:8: note: candidate function
string to_string (unsigned);
       ^
../flower/include/std-string.hh:50:8: note: candidate function
string to_string (bool b);
       ^
3 warnings and 1 error generated.
make[1]: *** [out/arpeggio.o] Error 1
make: *** [all] Error 2

My understanding of this is that none of the candidate functions in 
../flower/include/std-string.hh
match so that you have to explicitly provide std::.
       Jack

> 
> -- 
> David Kastrup



reply via email to

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