postgrespro/pg_trgm_pro

Failed make on trgm_gin.c:42:1: error: conflicting types for 'gin_extract_value_trgm'

jringoot opened this issue · 0 comments

When I try to make it, it fails

 make USE_PGXS=1
gcc -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -DLINUX_OOM_SCORE_ADJ=0 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -fPIC -I. -I. -I/usr/include/pgsql/server -I/usr/include/pgsql/internal -D_GNU_SOURCE -I/usr/include/libxml2   -c -o trgm_op.o trgm_op.c
trgm_op.c:51:1: warning: no previous prototype for 'set_limit' [-Wmissing-prototypes]
 set_limit(PG_FUNCTION_ARGS)
 ^
trgm_op.c:63:1: warning: no previous prototype for 'show_limit' [-Wmissing-prototypes]
 show_limit(PG_FUNCTION_ARGS)
 ^
trgm_op.c:69:1: warning: no previous prototype for 'set_substring_limit' [-Wmissing-prototypes]
 set_substring_limit(PG_FUNCTION_ARGS)
 ^
trgm_op.c:80:1: warning: no previous prototype for 'show_substring_limit' [-Wmissing-prototypes]
 show_substring_limit(PG_FUNCTION_ARGS)
 ^
trgm_op.c:852:1: warning: no previous prototype for 'show_trgm' [-Wmissing-prototypes]
 show_trgm(PG_FUNCTION_ARGS)
 ^
trgm_op.c:1027:1: warning: no previous prototype for 'similarity' [-Wmissing-prototypes]
 similarity(PG_FUNCTION_ARGS)
 ^
trgm_op.c:1049:1: warning: no previous prototype for 'substring_similarity' [-Wmissing-prototypes]
 substring_similarity(PG_FUNCTION_ARGS)
 ^
trgm_op.c:1065:1: warning: no previous prototype for 'similarity_dist' [-Wmissing-prototypes]
 similarity_dist(PG_FUNCTION_ARGS)
 ^
trgm_op.c:1075:1: warning: no previous prototype for 'similarity_op' [-Wmissing-prototypes]
 similarity_op(PG_FUNCTION_ARGS)
 ^
trgm_op.c:1085:1: warning: no previous prototype for 'substring_similarity_op' [-Wmissing-prototypes]
 substring_similarity_op(PG_FUNCTION_ARGS)
 ^
trgm_op.c:1101:1: warning: no previous prototype for 'substring_similarity_commutator_op' [-Wmissing-prototypes]
 substring_similarity_commutator_op(PG_FUNCTION_ARGS)
 ^
gcc -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -DLINUX_OOM_SCORE_ADJ=0 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -fPIC -I. -I. -I/usr/include/pgsql/server -I/usr/include/pgsql/internal -D_GNU_SOURCE -I/usr/include/libxml2   -c -o trgm_gist.o trgm_gist.c
trgm_gist.c:70:1: warning: no previous prototype for 'gtrgm_in' [-Wmissing-prototypes]
 gtrgm_in(PG_FUNCTION_ARGS)
 ^
trgm_gist.c:77:1: warning: no previous prototype for 'gtrgm_out' [-Wmissing-prototypes]
 gtrgm_out(PG_FUNCTION_ARGS)
 ^
trgm_gist.c:101:1: warning: no previous prototype for 'gtrgm_compress' [-Wmissing-prototypes]
 gtrgm_compress(PG_FUNCTION_ARGS)
 ^
trgm_gist.c:145:1: warning: no previous prototype for 'gtrgm_decompress' [-Wmissing-prototypes]
 gtrgm_decompress(PG_FUNCTION_ARGS)
 ^
trgm_gist.c:187:1: warning: no previous prototype for 'gtrgm_consistent' [-Wmissing-prototypes]
 gtrgm_consistent(PG_FUNCTION_ARGS)
 ^
trgm_gist.c:438:1: warning: no previous prototype for 'gtrgm_distance' [-Wmissing-prototypes]
 gtrgm_distance(PG_FUNCTION_ARGS)
 ^
trgm_gist.c:542:1: warning: no previous prototype for 'gtrgm_union' [-Wmissing-prototypes]
 gtrgm_union(PG_FUNCTION_ARGS)
 ^
trgm_gist.c:575:1: warning: no previous prototype for 'gtrgm_same' [-Wmissing-prototypes]
 gtrgm_same(PG_FUNCTION_ARGS)
 ^
trgm_gist.c:675:1: warning: no previous prototype for 'gtrgm_penalty' [-Wmissing-prototypes]
 gtrgm_penalty(PG_FUNCTION_ARGS)
 ^
trgm_gist.c:781:1: warning: no previous prototype for 'gtrgm_picksplit' [-Wmissing-prototypes]
 gtrgm_picksplit(PG_FUNCTION_ARGS)
 ^
gcc -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -DLINUX_OOM_SCORE_ADJ=0 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -fPIC -I. -I. -I/usr/include/pgsql/server -I/usr/include/pgsql/internal -D_GNU_SOURCE -I/usr/include/libxml2   -c -o trgm_gin.o trgm_gin.c
trgm_gin.c:31:1: warning: no previous prototype for 'gin_extract_trgm' [-Wmissing-prototypes]
 gin_extract_trgm(PG_FUNCTION_ARGS)
 ^
trgm_gin.c: In function 'gin_extract_trgm':
trgm_gin.c:34:3: warning: implicit declaration of function 'gin_extract_value_trgm' [-Wimplicit-function-declaration]
   return gin_extract_value_trgm(fcinfo);
   ^
trgm_gin.c:36:3: warning: implicit declaration of function 'gin_extract_query_trgm' [-Wimplicit-function-declaration]
   return gin_extract_query_trgm(fcinfo);
   ^
trgm_gin.c: At top level:
trgm_gin.c:42:1: warning: no previous prototype for 'gin_extract_value_trgm' [-Wmissing-prototypes]
 gin_extract_value_trgm(PG_FUNCTION_ARGS)
 ^
trgm_gin.c:42:1: error: conflicting types for 'gin_extract_value_trgm'
trgm_gin.c:34:10: note: previous implicit declaration of 'gin_extract_value_trgm' was here
   return gin_extract_value_trgm(fcinfo);
          ^
trgm_gin.c:77:1: warning: no previous prototype for 'gin_extract_query_trgm' [-Wmissing-prototypes]
 gin_extract_query_trgm(PG_FUNCTION_ARGS)
 ^
trgm_gin.c:77:1: error: conflicting types for 'gin_extract_query_trgm'
trgm_gin.c:36:10: note: previous implicit declaration of 'gin_extract_query_trgm' was here
   return gin_extract_query_trgm(fcinfo);
          ^
trgm_gin.c:174:1: warning: no previous prototype for 'gin_trgm_consistent' [-Wmissing-prototypes]
 gin_trgm_consistent(PG_FUNCTION_ARGS)
 ^
trgm_gin.c:272:1: warning: no previous prototype for 'gin_trgm_triconsistent' [-Wmissing-prototypes]
 gin_trgm_triconsistent(PG_FUNCTION_ARGS)
 ^
trgm_gin.c: In function 'gin_trgm_triconsistent':
trgm_gin.c:274:2: error: unknown type name 'GinTernaryValue'
  GinTernaryValue  *check = (GinTernaryValue *) PG_GETARG_POINTER(0);
  ^
trgm_gin.c:274:29: error: 'GinTernaryValue' undeclared (first use in this function)
  GinTernaryValue  *check = (GinTernaryValue *) PG_GETARG_POINTER(0);
                             ^
trgm_gin.c:274:29: note: each undeclared identifier is reported only once for each function it appears in
trgm_gin.c:274:46: error: expected expression before ')' token
  GinTernaryValue  *check = (GinTernaryValue *) PG_GETARG_POINTER(0);
                                              ^
trgm_gin.c:280:18: error: expected ';' before 'res'
  GinTernaryValue res = GIN_MAYBE;
                  ^
trgm_gin.c:281:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
  int32  i,
  ^
trgm_gin.c:297:21: error: 'GIN_FALSE' undeclared (first use in this function)
     if (check[i] != GIN_FALSE)
                     ^
trgm_gin.c:304:4: error: 'res' undeclared (first use in this function)
    res = (nkeys == 0)
    ^
trgm_gin.c:306:10: error: 'GIN_MAYBE' undeclared (first use in this function)
        ? GIN_MAYBE : GIN_FALSE);
          ^
trgm_gin.c:360:2: warning: implicit declaration of function 'PG_RETURN_GIN_TERNARY_VALUE' [-Wimplicit-function-declaration]
  PG_RETURN_GIN_TERNARY_VALUE(res);
  ^
trgm_gin.c:361:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
make: *** [trgm_gin.o] Error 1