I've built Thrift 0.8 and 0.9.0 on x86 (and x64) Ubuntu Precise, using g++-4.4, and have encountered some missing includes. It's -trivial- to fix, and perhaps there's something I'm missing, that if I knew, I wouldn't have to make these changes.
One thing that I ought to not is -why- I built with g++-4.4, instead of 4.6.3, wihch is the default on Ubuntu Precise. The reason is, I've found a number of cases with complex C++ software, where g++ 4.6.3 compiles code incorrectly. The one case that comes to mind concerns global constants not being emitted in the .o, but only inlined; this results in linkage errors later on in the build. I'm attaching the diff below. If I'm missing something, I'd appreciate it if somebody could enlighten me. Again, it's no big deal, which is why I'm posting about this even though I've noticed the problem for about the past year. Thanks, --chet-- index 5cdc37e..abfc97a 100644 --- a/lib/cpp/src/thrift/Thrift.h +++ b/lib/cpp/src/thrift/Thrift.h @@ -27,6 +27,8 @@ #ifdef HAVE_CONFIG_H #include "config.h" #endif +#include <arpa/inet.h> +#include <stdint.h> #include <stdio.h> #include <assert.h>
