jaiminpan / pg_jieba

Postgresql full-text search extension for chinese
BSD 3-Clause "New" or "Revised" License
338 stars 65 forks source link

Freebsd 12 + PostgreSQL 12, 编译后无法使用 #46

Closed ucando closed 4 years ago

ucando commented 4 years ago

编译时出现提醒

/root/src/pg/pg_jieba/pg_jieba.c:247:1: warning: 'DefineCustomConfigVariables' was used with no prototype before its definition [-Wmissing-prototypes]
  247 | DefineCustomConfigVariables()
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: warning: unrecognized command line option '-Wno-unused-command-line-argument'

可以编译成功并安装

在执行create extension pg_jieba;时, 提醒无法加载库, Undefined symbol "__cxa_pure_virtual"

ucando commented 4 years ago

问题解决了, cmake加上-DCMAKE_C_COMPILER=/usr/local/bin/gcc -DCMAKE_CXX_COMPILER=/usr/local/bin/g++这两个参数就好了