[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Lilypond-auto] Issue 3656 in lilypond: Problems building Lilypond 2
From: |
lilypond |
Subject: |
Re: [Lilypond-auto] Issue 3656 in lilypond: Problems building Lilypond 2.17.95 with libc++ for use with llvm |
Date: |
Sat, 16 Nov 2013 09:24:48 +0000 |
Updates:
Labels: -Patch-review Patch-needs_work
Comment #14 on issue 3656 by address@hidden: Problems building Lilypond
2.17.95 with libc++ for use with llvm
http://code.google.com/p/lilypond/issues/detail?id=3656
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
----
the problem
would appear to be,
from inspection, that flower/include/file-path.hh is included before
config.hh
in file-path.cc.
This prevents HAVE_STL_DATA_METHOD from being set properly for
flower/include/file-path.hh to use.
----
I can confirm that the patch...
--- lilypond-2.17.95/flower/file-path.cc.orig 2013-11-04
04:29:55.000000000
-0500
+++ lilypond-2.17.95/flower/file-path.cc 2013-11-14
16:55:11.000000000
-0500
@@ -23,7 +23,6 @@
#include <cstdio>
#include <cerrno>
-#include "config.hh"
#if HAVE_SYS_STAT_H
#include <sys/stat.h>
#endif
--- lilypond-2.17.95/flower/include/std-vector.hh.orig 2013-11-14
16:49:50.000000000 -0500
+++ lilypond-2.17.95/flower/include/std-vector.hh 2013-11-14
16:50:14.000000000 -0500
@@ -20,6 +20,8 @@
#ifndef STD_VECTOR_HH
#define STD_VECTOR_HH
+#include "config.hh"
+
#if 0
/*
fixes http://code.google.com/p/lilypond/issues/detail?id=3656 and eliminates
the
Jack
-----
I believe the problem may be described in this thread...
http://stackoverflow.com/questions/17136497/is-overriding-stdto-string-for-user-defined-enums-proper-way-to-privide-to-str
An example of the failing code in lilypond-devel-2.17.95 is attached as
arpeggio.ii.bz2 which was generated with...
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 -MD -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 --save-temps
on Xcode 5.0 using clang++ as g++. The compilation fails as...
# 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 -MD -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
arpeggio.ii
clang: warning: argument unused during compilation: '-I
/sw/include/python2.7'
clang: warning: argument unused during compilation: '-I
/sw/include/python2.7'
clang: warning: argument unused during compilation: '-I /sw/include'
clang: warning: argument unused during compilation: '-I ./include'
clang: warning: argument unused during compilation: '-I ./out'
clang: warning: argument unused during compilation: '-I ../flower/include'
clang: warning: argument unused during compilation: '-I ../flower/./out'
clang: warning: argument unused during compilation: '-I ../flower/include'
clang: warning: argument unused during compilation: '-MD'
clang: warning: argument unused during compilation: '-I /sw/include'
clang: warning: argument unused during compilation: '-I /sw/include'
clang: warning: argument unused during compilation: '-I
/sw/include/freetype2'
clang: warning: argument unused during compilation: '-I /sw/include'
clang: warning: argument unused during compilation: '-I
/sw/include/pango-1.0'
clang: warning: argument unused during compilation: '-I
/sw/include/freetype2'
clang: warning: argument unused during compilation: '-I /sw/include'
clang: warning: argument unused during compilation: '-I
/sw/include/glib-2.0'
clang: warning: argument unused during compilation: '-I
/sw/lib/glib-2.0/include'
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:48: warning: operand of ? changes signedness: 'const
int' to 'size_t' (aka 'unsigned long') [-Wsign-conversion]
return ((__gmp_z->_mp_size) >= 0 ? (__gmp_z->_mp_size) :
-(__gmp_z->_mp_size));
~~~~~~ ~~~~~~~~~^~~~~~~~
/sw/include/gmp.h:1791:60: warning: operand of ? changes signedness: 'int'
to
'size_t' (aka 'unsigned long') [-Wsign-conversion]
return ((__gmp_z->_mp_size) >= 0 ? (__gmp_z->_mp_size) :
-(__gmp_z->_mp_size));
~~~~~~
^~~~~~~~~~~~~~~~~~~~
/sw/include/gmp.h:2058:345: warning: equality comparison with extraneous
parentheses [-Wparentheses-equality]
...= 1; goto __gmp_done; } __gmp_x = (__gmp_xp)[__gmp_i]; } while
((((__gmp_wp)[__gmp_i++] = (__gmp_x + 1) & ((~ (static_cast<mp_limb_t>
(0))) >>
0)) == 0)); } } if ((__gmp_w...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
/sw/include/gmp.h:2058:345: note: remove extraneous parentheses around the
comparison to silence this warning
...= 1; goto __gmp_done; } __gmp_x = (__gmp_xp)[__gmp_i]; } while
((((__gmp_wp)[__gmp_i++] = (__gmp_x + 1) & ((~ (static_cast<mp_limb_t>
(0))) >>
0)) == 0)); } } if ((__gmp_w...
~
^
~
/sw/include/gmp.h:2058:345: note: use '=' to turn this equality comparison
into
an assignment
...1; goto __gmp_done; } __gmp_x = (__gmp_xp)[__gmp_i]; } while
((((__gmp_wp)[__gmp_i++] = (__gmp_x + 1) & ((~ (static_cast<mp_limb_t>
(0))) >>
0)) == 0)); } } if ((__gmp_wp...
^~
=
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);
^
4 warnings and 1 error generated.
I believe the problem is that lilypond is omitting the necessary overload in
the correct
namespace. Looking at the preprocessed source, the failing call is...
arpeggio.cc:166:61: error: call to 'to_string' is ambiguous
arrow = fm->find_by_name ("scripts.arpeggio.arrow." + to_string
(dir));
^~~~~~~~~
but dir is of type enum...
enum Direction
{
UP = 1,
DOWN = -1,
LEFT = -1,
RIGHT = 1,
MIN = -1,
MAX = 1,
CENTER = 0,
SMALLER = -1,
BIGGER = 1,
START = -1,
STOP = 1,
# 47 "../flower/include/direction.hh"
DIRECTION_LIMIT = 2,
DIRECTION_NEG_LIMIT = -2,
};
Direction dir = CENTER;
----
Looking at the suggestions in...
http://stackoverflow.com/questions/9150538/how-do-i-tostring-an-enum-in-c
it would appear that Lilypond should be using static maps to solve this. The
following
changes to the previously posted arpeggio.ii testcase solves the compilation
failure
under clang++ and libc++ on 10.9...
--- arpeggio.ii.orig 2013-11-15 13:27:16.000000000 -0500
+++ arpeggio.ii 2013-11-15 13:35:27.000000000 -0500
@@ -28701,6 +28701,8 @@
DIRECTION_NEG_LIMIT = -2,
};
+std::string DirectionMap [] =
{ "UP", "DOWN", "LEFT", "RIGHT", "MIN", "MAX",
"CENTER", "SMALLER", "BIGGER", "START", "STOP", "DIRECTION_LIMIT",
"DIRECTION_NEG_LIMIT"};
+
inline Direction
other_dir (Direction const d)
{
@@ -41895,7 +41897,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." +
DirectionMap[dir]);
heads[dir] -= dir * arrow.extent (Y_AXIS).length ();
}
Jack
Attachments:
bz2mDhfyiO2_s.bz2 129 KB
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
- Re: [Lilypond-auto] Issue 3656 in lilypond: Problems building Lilypond 2.17.95 with libc++ for use with llvm, lilypond, 2013/11/12
- Message not available
- Re: [Lilypond-auto] Issue 3656 in lilypond: Problems building Lilypond 2.17.95 with libc++ for use with llvm, lilypond, 2013/11/12
- Message not available
- Re: [Lilypond-auto] Issue 3656 in lilypond: Problems building Lilypond 2.17.95 with libc++ for use with llvm, lilypond, 2013/11/12
- Message not available
- Re: [Lilypond-auto] Issue 3656 in lilypond: Problems building Lilypond 2.17.95 with libc++ for use with llvm, lilypond, 2013/11/12
- Message not available
- Re: [Lilypond-auto] Issue 3656 in lilypond: Problems building Lilypond 2.17.95 with libc++ for use with llvm, lilypond, 2013/11/12
- Message not available
- Re: [Lilypond-auto] Issue 3656 in lilypond: Problems building Lilypond 2.17.95 with libc++ for use with llvm, lilypond, 2013/11/16
- Message not available
- Re: [Lilypond-auto] Issue 3656 in lilypond: Problems building Lilypond 2.17.95 with libc++ for use with llvm, lilypond, 2013/11/16
- Message not available
- Re: [Lilypond-auto] Issue 3656 in lilypond: Problems building Lilypond 2.17.95 with libc++ for use with llvm,
lilypond <=
- Message not available
- Re: [Lilypond-auto] Issue 3656 in lilypond: Problems building Lilypond 2.17.95 with libc++ for use with llvm, lilypond, 2013/11/18
- Message not available
- Re: [Lilypond-auto] Issue 3656 in lilypond: Problems building Lilypond 2.17.95 with libc++ for use with llvm, lilypond, 2013/11/18
- Message not available
- Re: [Lilypond-auto] Issue 3656 in lilypond: Problems building Lilypond 2.17.95 with libc++ for use with llvm, lilypond, 2013/11/18
- Message not available
- Re: [Lilypond-auto] Issue 3656 in lilypond: Problems building Lilypond 2.17.95 with libc++ for use with llvm, lilypond, 2013/11/18
- Message not available
- Re: [Lilypond-auto] Issue 3656 in lilypond: Problems building Lilypond 2.17.95 with libc++ for use with llvm, lilypond, 2013/11/18
- Message not available
- Re: [Lilypond-auto] Issue 3656 in lilypond: Problems building Lilypond 2.17.95 with libc++ for use with llvm, lilypond, 2013/11/18
- Message not available
- Re: [Lilypond-auto] Issue 3656 in lilypond: Problems building Lilypond 2.17.95 with libc++ for use with llvm, lilypond, 2013/11/18
- Message not available
- Re: [Lilypond-auto] Issue 3656 in lilypond: Problems building Lilypond 2.17.95 with libc++ for use with llvm, lilypond, 2013/11/19
- Message not available
- Re: [Lilypond-auto] Issue 3656 in lilypond: Problems building Lilypond 2.17.95 with libc++ for use with llvm, lilypond, 2013/11/19
- Message not available
- Re: [Lilypond-auto] Issue 3656 in lilypond: Problems building Lilypond 2.17.95 with libc++ for use with llvm, lilypond, 2013/11/19