smog zer wrote:
> Hi all.
> I got this error while compiling sphinx2 module.
> Anybody got over it ?
> I'm using the cvs version of sphinx2.
This is an old problem with using Sphinx in C++ code. The core of the problem
is a union with members like "int8 int8;" which C++ doesn't like at all! You
can hack the Sphinx2 header files to remove it, since user code dosen't actually
need to use that union I don't think. Search Sphinx2 mailing list archives for a
summary/patch I posted a while ago or I can make one and post it here.
> if g++ -DHAVE_CONFIG_H -I. -I. -I../../../.. -I../../../../server
> -Wall -I../../../../server -g -O2 -MT sphinx2.o -MD -MP -MF
> ".deps/sphinx2.Tpo" -c -o sphinx2.o sphinx2.cc; \
> then mv -f ".deps/sphinx2.Tpo" ".deps/sphinx2.Po"; else rm -f
> ".deps/sphinx2.Tpo"; exit 1; fi
> /usr/local/include/sphinx2/s2types.h:138: error: declaration of
> 'boolean anytype_s::boolean'
> /usr/local/include/sphinx2/s2types.h:96: error: changes meaning of
> 'boolean' from 'typedef unsigned char boolean'
> /usr/local/include/sphinx2/s2types.h:139: error: declaration of 'int8
> /usr/local/include/sphinx2/s2types.h:90: error: changes meaning of
> 'int8' from 'typedef char int8'
> /usr/local/include/sphinx2/s2types.h:140: error: declaration of 'uint8
> /usr/local/include/sphinx2/s2types.h:93: error: changes meaning of
> 'uint8' from 'typedef unsigned char uint8'
> /usr/local/include/sphinx2/s2types.h:141: error: declaration of 'int16
> /usr/local/include/sphinx2/s2types.h:89: error: changes meaning of
> 'int16' from 'typedef short int int16'
> /usr/local/include/sphinx2/s2types.h:142: error: declaration of
> 'uint16 anytype_s::uint16'
> /usr/local/include/sphinx2/s2types.h:92: error: changes meaning of
> 'uint16' from 'typedef short unsigned int uint16'
> /usr/local/include/sphinx2/s2types.h:143: error: declaration of 'int32
> /usr/local/include/sphinx2/s2types.h:88: error: changes meaning of
> 'int32' from 'typedef int int32'
> /usr/local/include/sphinx2/s2types.h:144: error: declaration of
> 'uint32 anytype_s::uint32'
> /usr/local/include/sphinx2/s2types.h:91: error: changes meaning of
> 'uint32' from 'typedef unsigned int uint32'
> /usr/local/include/sphinx2/s2types.h:145: error: declaration of
> 'float32 anytype_s::float32'
> /usr/local/include/sphinx2/s2types.h:94: error: changes meaning of
> 'float32' from 'typedef float float32'
> /usr/local/include/sphinx2/s2types.h:146: error: declaration of
> 'float64 anytype_s::float64'
> /usr/local/include/sphinx2/s2types.h:95: error: changes meaning of
> 'float64' from 'typedef double float64'
> make: *** [sphinx2.o] Error 1