fbthrift
fbthrift copied to clipboard
gcc 5.2 internal compiler error: Segmentation fault
Any ideas? I'm using ArchLinux x86_64
Making all in .
make[5]: Entering directory '/home/renan/aur/fbthrift/fbthrift/thrift/lib/cpp2'
g++ -DHAVE_CONFIG_H -fPIC -I../../.. -pthread -I/usr/include -I../cpp -I../../../../gperftools-2.0.99/src -I/usr/include -std=gnu++0x -MT gen-cpp2/libsaslstubs_a-Sasl_types.o -MD -MP -MF gen-cpp2/.deps/libsaslstubs_a-Sasl_types.Tpo -c -o gen-cpp2/libsaslstubs_a-Sasl_types.o `test -f 'gen-cpp2/Sasl_types.cpp' || echo './'`gen-cpp2/Sasl_types.cpp
In file included from gen-cpp2/Sasl_types.tcc:16:0,
from gen-cpp2/Sasl_types.cpp:9:
../../../thrift/lib/cpp2/GeneratedCodeHelper.h:931:43: internal compiler error: Segmentation fault
typename GeneratedAsyncProcessor::ProcessFunc<
^
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://bugs.archlinux.org/> for instructions.
Makefile:1105: recipe for target 'gen-cpp2/libsaslstubs_a-Sasl_types.o' failed
make[5]: *** [gen-cpp2/libsaslstubs_a-Sasl_types.o] Error 1
make[5]: Leaving directory '/home/renan/aur/fbthrift/fbthrift/thrift/lib/cpp2'
Makefile:1652: recipe for target 'all-recursive' failed
make[4]: *** [all-recursive] Error 1
make[4]: Leaving directory '/home/renan/aur/fbthrift/fbthrift/thrift/lib/cpp2'
Makefile:727: recipe for target 'all' failed
make[3]: *** [all] Error 2
make[3]: Leaving directory '/home/renan/aur/fbthrift/fbthrift/thrift/lib/cpp2'
Makefile:445: recipe for target 'all-recursive' failed
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory '/home/renan/aur/fbthrift/fbthrift/thrift/lib'
Makefile:526: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/renan/aur/fbthrift/fbthrift/thrift'
Makefile:458: recipe for target 'all' failed
make: *** [all] Error 2
"internal compiler error" - fun! Internally we're only on gcc 4.9, so we probably haven't run in to this yet.
I remove the typename before the GeneratedAsyncProcessor::ProcessFunc make it compile.So it look like this
template <class ProtocolReader, class Processor>
void process_pmap(
Processor* proc,
const typename GeneratedAsyncProcessor::ProcessMap<
GeneratedAsyncProcessor::ProcessFunc<
Processor, ProtocolReader>> req,
.....and so on
i use gcc 5.2.1
That works! Thanks.
+vote
struct foo {
template <typename T>
using type = void(T::*)();
};
template <typename>
struct mf;
template <typename T>
struct mf<void(T::*)()> {
// GCC 5.1, 5.2, and 5.3 will segfault when typename is
// uncommented. GCC 4.9.2 and earlier do not segfault.
using type = /*typename*/ foo::template type<T>;
};
int main() { return 0; }
Here is a standalone reproduction of the the bug, which was fixed in the GCC repo on 12/19/2015. I just wanted to leave some FYI since this issue thread is a top Google hit.