I'm using gcc 4.8, I can not build dev-lang/rubinius-1.2.4.20110705: vm/builtin/unpack.cpp:284:5: error:narrowing conversion of ‘2147483648u’ from ‘unsigned int’ to ‘const int32_t {aka const int}’ inside { } is ill-formed in C++11 [-Werror=narrowing] }; ^ cc1plus: all warnings being treated as errors It is very easy to solve the issue. The patch solved the issue, and it shouldn't break anything when using gcc 4.6: diff --git bad/vm/builtin/unpack.cpp good/vm/builtin/unpack.cpp index b7a3850..48ca26f 100644 --- bad/vm/builtin/unpack.cpp +++ good/vm/builtin/unpack.cpp @@ -274,13 +274,13 @@ namespace rubinius { } static const int32_t utf8_limits[] = { - 0x0, /* 1 */ - 0x80, /* 2 */ - 0x800, /* 3 */ - 0x10000, /* 4 */ - 0x200000, /* 5 */ - 0x4000000, /* 6 */ - 0x80000000, /* 7 */ + (const int32_t) 0x0, /* 1 */ + (const int32_t) 0x80, /* 2 */ + (const int32_t) 0x800, /* 3 */ + (const int32_t) 0x10000, /* 4 */ + (const int32_t) 0x200000, /* 5 */ + (const int32_t) 0x4000000, /* 6 */ + (const int32_t) 0x80000000, /* 7 */ }; #define MALFORMED_UTF8_ERROR_SIZE 60
dev-lang/rubinius seems no one to maintenance, because it keeps a very old version in portage. My patch solved the build issue, but in fact, if anyone could version bump it, we shouldn't have any issue on it.
emerge --info and build log please.
Created attachment 343696 [details] build.log
Created attachment 343698 [details] emerge --info
Created attachment 343700 [details, diff] Fix build issue
(In reply to comment #1) > dev-lang/rubinius seems no one to maintenance, because it keeps a very old > version in portage. Unfortunately the rubinius team no longer creates releases so there is nothing to bump. We could select our own releases from their repository, but that would require a dedicated maintainer with inside knowledge of the rubinius development process.
This problem happens with gcc-4.7.2. In a comment to the related bug entry #431200, Andrej Gelenberg suggests to remove "-Werror" from flags.
Yeah building with -Werror is against our policies. The -Werror should be removed regardless.
I've patched the ebuild to remove the hardcoded -Werror (and also -ggdb3).