make warnings => errors regarding variadic macros... #1

Open
bmpercy opened this Issue Apr 16, 2010 · 5 comments

3 participants

@bmpercy

Tried installing libcassandra and ran into the following (they were errors till I mucked with the Makefile to drop the -Werror flag):

In file included from /usr/local/include/thrift/Thrift.h:40,
from /usr/local/include/thrift/transport/TTransport.h:23,
from /usr/local/include/thrift/protocol/TProtocol.h:23,
from /usr/local/include/thrift/protocol/TBinaryProtocol.h:23,
from libcassandra/keyspace_factory.cc:13:
/usr/local/include/thrift/TLogging.h:69:33: warning: anonymous variadic macros were introduced in C99
/usr/local/include/thrift/TLogging.h:91:35: warning: anonymous variadic macros were introduced in C99
/usr/local/include/thrift/TLogging.h:102:40: warning: anonymous variadic macros were introduced in C99
/usr/local/include/thrift/TLogging.h:113:31: warning: anonymous variadic macros were introduced in C99
/usr/local/include/thrift/TLogging.h:130:37: warning: anonymous variadic macros were introduced in C99
/usr/local/include/thrift/TLogging.h:148:36: warning: anonymous variadic macros were introduced in C99


really not sure what's going on, but the compiler command looks like it's instructing g++ (4.2) to use -std=gnu++98...is that "pre" C99?...:

g++ -DHAVE_CONFIG_H -I. -I. -ggdb3 -I/usr/local/include -D_THREAD_SAFE -pipe -std=gnu++98 -O3 -pedantic -Wall -Wundef -Wshadow -fdiagnostics-show-option -Wformat -fno-strict-aliasing -Wno-strict-aliasing -Wextra -Woverloaded-virtual -Wnon-virtual-dtor -Wctor-dtor-privacy -Wno-long-long -Wno-redundant-decls -I/usr/local/include/thrift -MT libcassandra/libcassandra_libcassandra_la-keyspace_factory.lo -MD -MP -MF libcassandra/.deps/libcassandra_libcassandra_la-keyspace_factory.Tpo -c libcassandra/keyspace_factory.cc -fno-common -DPIC -o libcassandra/.libs/libcassandra_libcassandra_la-keyspace_factory.o

even if it "works", i really don't like actively suppressing warnings like this, so would love any input/troubleshooting you could offer.

again, i know nothing, so feel free to ask obvious questions.

Mac OS X 10.6, (believe default with OS) g++-4.2, thrift 0.2.0 from tarball, boost 1.42, ...

thanks,
bp

@bmpercy

oh, sorry re: formatting. :(

@posulliv
Owner

I have to apologize for my really late reply. I had a master's thesis defense this week that took up all my time for the last few weeks.

So the issue here is that these warnings are coming from the thrift code. There is not really much I can do in that case since I'm not the maintainer of thrift and I have absolutely no involvement with that project.

I'm going to look into it further this week and see if I can re-produce somewhere.

Thanks for bringing the issue to my attention though. Appreciate it!

@bmpercy

note: we seem to be doing alright after suppressing the warnings. still makes me feel icky inside though.... ;) so it seems to be a workable solution at least. but seems that a few tweaks to the makefile might do it.

@minaguib

I've used this to work-around the issue:

./configure CXXFLAGS="-I/opt/local/include -Wno-variadic-macros"

@minaguib

Unfortunately, it gets even worse. In my branch I've upgraded to libthrift 0.6 and there are even more warnings originating from thrift header files.

While well-intentioned, I've had to disable the warnings-as-errors feature via -Wno-error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment