compile fail with gcc 4.4.0

Bug #378962 reported by vivo
20
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Drizzle
Fix Released
Critical
Monty Taylor

Bug Description

http://drizzlebuild.42sql.com/builders/gentoo.64.1/builds/463

make phase end with the following:

[...]
make all-am
make[3]: Entering directory `/srv/buildbot/slave/build31/build.gcc_4_4/drizzled/message'
depbase=`echo binary_log.pb.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`;\
        /bin/sh ../../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I../.. -I../.. -Wall -Wextra -Werror -Wno-cast-align -pedantic -Wundef -Woverloaded-virtual -Wnon-virtual-dtor -Wctor-dtor-privacy -Wno-redundant-decls -Wno-long-long -Wno-strict-aliasing -Wshadow -O3 -std=gnu++0x -ggdb3 -Wno-effc++ -Wno-shadow -MT binary_log.pb.lo -MD -MP -MF $depbase.Tpo -c -o binary_log.pb.lo binary_log.pb.cc &&\
        mv -f $depbase.Tpo $depbase.Plo
libtool: compile: g++ -DHAVE_CONFIG_H -I../.. -I../.. -Wall -Wextra -Werror -Wno-cast-align -pedantic -Wundef -Woverloaded-virtual -Wnon-virtual-dtor -Wctor-dtor-privacy -Wno-redundant-decls -Wno-long-long -Wno-strict-aliasing -Wshadow -O3 -std=gnu++0x -ggdb3 -Wno-effc++ -Wno-shadow -MT binary_log.pb.lo -MD -MP -MF .deps/binary_log.pb.Tpo -c binary_log.pb.cc -fPIC -DPIC -o .libs/binary_log.pb.o
binary_log.pb.cc: In function 'void BinaryLog::protobuf_BuildDesc_binary_5flog_2eproto_AssignGlobalDescriptors(const google::protobuf::FileDescriptor*)':
binary_log.pb.cc:45: error: narrowing conversion of '(((long int)(&16u->BinaryLog::Header::server_id_)) + -0x00000000000000010l)' from 'long int' to 'const int' inside { }
binary_log.pb.cc:45: error: narrowing conversion of '(((long int)(&16u->BinaryLog::Header::trans_id_)) + -0x00000000000000010l)' from 'long int' to 'const int' inside { }
binary_log.pb.cc:45: error: narrowing conversion of '(((long int)(&16u->BinaryLog::Header::seqno_)) + -0x00000000000000010l)' from 'long int' to 'const int' inside { }
binary_log.pb.cc:64: error: narrowing conversion of '(((long int)(&16u->BinaryLog::Start::header_)) + -0x00000000000000010l)' from 'long int' to 'const int' inside { }
binary_log.pb.cc:64: error: narrowing conversion of '(((long int)(&16u->BinaryLog::Start::server_version_)) + -0x00000000000000010l)' from 'long int' to 'const int' inside { }
binary_log.pb.cc:64: error: narrowing conversion of '(((long int)(&16u->BinaryLog::Start::server_signature_)) + -0x00000000000000010l)' from 'long int' to 'const int' inside { }
binary_log.pb.cc:82: error: narrowing conversion of '(((long int)(&16u->BinaryLog::Chain::header_)) + -0x00000000000000010l)' from 'long int' to 'const int' inside { }
binary_log.pb.cc:82: error: narrowing conversion of '(((long int)(&16u->BinaryLog::Chain::next_)) + -0x00000000000000010l)' from 'long int' to 'const int' inside { }
binary_log.pb.cc:101: error: narrowing conversion of '(((long int)(&16u->BinaryLog::Query::header_)) + -0x00000000000000010l)' from 'long int' to 'const int' inside { }
binary_log.pb.cc:101: error: narrowing conversion of '(((long int)(&16u->BinaryLog::Query::variable_)) + -0x00000000000000010l)' from 'long int' to 'const int' inside { }
binary_log.pb.cc:101: error: narrowing conversion of '(((long int)(&16u->BinaryLog::Query::query_)) + -0x00000000000000010l)' from 'long int' to 'const int' inside { }
binary_log.pb.cc:117: error: narrowing conversion of '(((long int)(&16u->BinaryLog::Query_Variable::name_)) + -0x00000000000000010l)' from 'long int' to 'const int' inside { }
binary_log.pb.cc:117: error: narrowing conversion of '(((long int)(&16u->BinaryLog::Query_Variable::val_)) + -0x00000000000000010l)' from 'long int' to 'const int' inside { }
binary_log.pb.cc:136: error: narrowing conversion of '(((long int)(&16u->BinaryLog::Commit::header_)) + -0x00000000000000010l)' from 'long int' to 'const int' inside { }
binary_log.pb.cc:153: error: narrowing conversion of '(((long int)(&16u->BinaryLog::Rollback::header_)) + -0x00000000000000010l)' from 'long int' to 'const int' inside { }
make[3]: *** [binary_log.pb.lo] Error 1
make[3]: Leaving directory `/srv/buildbot/slave/build31/build.gcc_4_4/drizzled/message'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/srv/buildbot/slave/build31/build.gcc_4_4/drizzled/message'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/srv/buildbot/slave/build31/build.gcc_4_4'
make: *** [all] Error 2

Revision history for this message
Jay Pipes (jaypipes) wrote :

Yep, confirmed and Monty is currently working on this.

Changed in drizzle:
assignee: nobody → Monty Taylor (mordred)
importance: Undecided → Critical
milestone: none → aloha
status: New → Confirmed
Revision history for this message
sahil cooner (sahil-cooner) wrote :

I confirm, this occured while wokring with Jay through a drizzle-automation, trying to compile on my archlinux box running GCC 4.4.0, confirmed.

I also installed GCC 4.4.0 on my gentoo box with the same results.

Revision history for this message
sahil cooner (sahil-cooner) wrote :

try compiling with the following option ...
-std=c++/gnu++0x, that may remove the errors/warnings, worked for me, I believe that's the only issue is the -std option.

thanks,
sahil r cooner

Revision history for this message
sahil cooner (sahil-cooner) wrote :

when you remove the -std flag all together works as well, it compiles fine without complaints. It appears to be a bug with GCC itself...http://<email address hidden>/msg236177.html. Issues with the -std= and both gnu/c++ standards.

Nothing that appears to be a bug with the drizzle message/binarylog.pb.cc having GNU/C++ coding standard issues.

Revision history for this message
sahil cooner (sahil-cooner) wrote :

This bug has been resolved in newer branches of GCC.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37932.

All done with the research on this one :).

Revision history for this message
Monty Taylor (mordred) wrote :

Great research!

In the mean time, I've submitted a patch to protobuf which changes the type of the offsets from int to ptrdiff_t which also fixes the compile.

http://code.google.com/p/protobuf/issues/detail?id=105

Revision history for this message
vivo (francesco-riosa) wrote :

work well, switched back to gcc-4.4 (exactly the same as before) the first build to use it again is 475:
http://drizzlebuild.42sql.com:8010/builders/gentoo.64.1/builds/475

you guys make nice the testing of this project

Revision history for this message
vivo (francesco-riosa) wrote :

please delete all from the previous comment untill "you guys"

Revision history for this message
Jay Pipes (jaypipes) wrote :

Hi guys, can we mark this as completed? What is the status on it?

Revision history for this message
Monty Taylor (mordred) wrote :

Our tree works with gcc 4.4 now, but there was an issue with protobuf itself. There is a patch for it that needs to be applied if you have gcc 4.4. I should add in an autoconf test, so let's leave this open for now.

Revision history for this message
vivo (francesco-riosa) wrote :

BTW monty can you point me to the patch needed to use protobuf 2.1?
builders/gentoo.64.1 is currently using 2.0 and tought it would be nice to switch

Revision history for this message
Lee Bieber (kalebral-deactivatedaccount) wrote :

This is now working

Changed in drizzle:
status: Confirmed → Fix Released
Revision history for this message
vivo (francesco-riosa) wrote :

ok: The web-page 'force build' button was pressed by 'vivo': protobuf-intcast.patch Bug #378962: compile fail with gcc 4.4.0

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.