Don't use the previous patch. Use this patch. It's more what Kenton is
wanting upstream anyway.
Monty
Monty Taylor wrote:
> Hey all,
>
> There are a couple of different unrelated issues awaiting anyone who
> wants to build Drizzle with gcc 4.4. The first relates to Protobuf.
> You'll see errors like this:
>
> binary_log.pb.cc:45: error: narrowing conversion of '(((long
> int)(&16u->BinaryLog::Header::server_id_)) + -0x00000000000000010l)'
> from 'long int' to 'const int' inside { } [-fpermissive]
>
> This is a bug in GCC 4.4, and AIUI, there is a fix already committed to
> GCC. In the meantime, I have a patch, which I'm attaching, to Protobuf
> 2.1 which works around it. The patch will not be applied upstream, as it
> makes some variables bigger, and he problem is fixed already in GCC. But
> if you are dead in the water, here it is.
>
> The second is in sql_string. We have a fix in the tree that is wrong in
> some cases, so there is a patch coming that will revert this fix. This
> will break gcc 4.4 again. I'm working on a better patch for the problem
> - and should hopefully have something soon.
>
> Monty
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Mailing list: https://launchpad.net/~drizzle-discuss
> Post to : [email protected]
> Unsubscribe : https://launchpad.net/~drizzle-discuss
> More help : https://help.launchpad.net/ListHelp
=== modified file 'src/google/protobuf/generated_message_reflection.h'
--- src/google/protobuf/generated_message_reflection.h 2009-05-28 09:33:56
+0000
+++ src/google/protobuf/generated_message_reflection.h 2009-05-29 10:04:46
+0000
@@ -347,9 +347,9 @@
// choose 16 rather than some other number just in case the compiler would
// be confused by an unaligned pointer.
#define GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TYPE, FIELD) \
- (reinterpret_cast<const char*>( \
+ int((reinterpret_cast<const char*>( \
&reinterpret_cast<const TYPE*>(16)->FIELD) - \
- reinterpret_cast<const char*>(16))
+ reinterpret_cast<const char*>(16)))
// There are some places in proto2 where dynamic_cast would be useful as an
// optimization. For example, take Message::MergeFrom(const Message& other).
_______________________________________________
Mailing list: https://launchpad.net/~drizzle-discuss
Post to : [email protected]
Unsubscribe : https://launchpad.net/~drizzle-discuss
More help : https://help.launchpad.net/ListHelp