amutu / zhparser

zhparser is a PostgreSQL extension for full-text search of Chinese language
Other
719 stars 86 forks source link

编译报错:gcc: error: unrecognized command line option ‘-Wimplicit-fallthrough=3’ #76

Open xianglinsao1 opened 1 year ago

xianglinsao1 commented 1 year ago

pg version:15.2 os:Red Hat 4.8.5-39 执行命令:make && make install编译的时候报错如下: gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -g -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -fno-omit-frame-pointer -fPIC -I/usr/local/include/scws -I. -I./ -I/usr/pgsql-15/include/15/server -I/usr/pgsql-15/include/internal -Wdate-time -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -I/usr/include/libxml2 -c -o zhparser.o zhparser.c gcc: error: unrecognized command line option ‘-Wimplicit-fallthrough=3’ gcc: error: unrecognized command line option ‘-Wcast-function-type’ gcc: error: unrecognized command line option ‘-Wdate-time’ make: *** [zhparser.o] Error 1

zlianzhuang commented 1 year ago

select select version(); 可以查看到编译pg时用的gcc的版本。 你环境的版本最好与pg的保持一致。