Comments (10)
执行编译器前,请先确保可以执行pg_config 命令
from pg_jieba.
pg_config 是可以执行的
from pg_jieba.
git clone https://github.com/jaiminpan/pg_jieba
cd pg_jieba
git submodule update --init --recursive
mkdir build
cd build
cmake -DCMAKE_PREFIX_PATH=/usr/pgsql-10 -DCMAKE_CXX_FLAGS="-Wall -std=c++11" ..
make
make install
from pg_jieba.
我这样执行的cmake -DCMAKE_PREFIX_PATH=/usr/pgsql-10 -DCMAKE_CXX_FLAGS="-Wall -std=c++11" ..
报这样的错误,怎么弄呢In file included from /opt/pg10/include/postgresql/server/postgres.h:47:0,
from /mjx_pg/pg_jieba/pg_jieba/pg_jieba.cpp:21:
/usr/include/libintl.h:39:14: error: expected unqualified-id before ‘const’
extern char *gettext (const char *__msgid)
^
/usr/include/libintl.h:39:14: error: expected ‘)’ before ‘const’
/usr/include/libintl.h:39:14: error: expected initializer before ‘const’
/usr/include/libintl.h:44:14: error: expected unqualified-id before ‘const’
extern char *dgettext (const char *__domainname, const char *__msgid)
from pg_jieba.
我是在centos 7.x下用yum安装的pg 10,所以 -DCMAKE_PREFIX_PATH=/usr/pgsql-10 ,你的系统、版本、目录不同,要改一下
yum install -y postgresql10 postgresql10-server postgresql10-contrib postgresql10-plpython postgresql10-devel
from pg_jieba.
这个我知道,我改了,是我自己的路径,我的pg10是我代码编译安装的(./configure,make,make install), 我感觉这个错误,是c++11新特性跟以前方式编译的pg是不是不兼容, 我应该再怎么改呢,谢谢啦,网上也搜不到,还是只能用yum那么装?
from pg_jieba.
我gcc 版本是4.8.5 ,我加了支持c++11的选项,编译pg_jieba时候, 这样的话,导致pg依赖的底层那种纯c的东西可能跟 这个c++11不兼容, 该怎么改,感觉还得加些选项, 我c++11一次使用
from pg_jieba.
centos 7.x带的gcc就是4.8.5,我用 -DCMAKE_CXX_FLAGS="-Wall -std=c++11" 的选项编译10.1没问题
from pg_jieba.
好了,好了, 我调整了jieba.hpp头文件的位置,就好了
#include "cppjieba/Jieba.hpp"
放在 extern c之前,就好了,别人都没碰到这个问题,不知道是不是环境问题,我也是gcc4.8.5,centos7
from pg_jieba.
我也遇到此问题了,调整jieba.hpp位置就好了,thanks。
from pg_jieba.
Related Issues (20)
- pg11
- pg 11.5 不支持 HOT 10
- pg 10.10 不支持 HOT 7
- make 出错 HOT 1
- CentOS 7 + PostgreSQL 12,cmake失败 HOT 5
- Freebsd 12 + PostgreSQL 12, 编译后无法使用 HOT 1
- Space character (" ") on stop-word list acts like a separator instead of a character
- Postgresql 13下版本号问题 HOT 3
- centos7 + pg13, make: 未知的类型名‘sigjmp_buf’ HOT 1
- to_tsquery有没有办法精确搜索?
- ts_headline与预期结果不同
- 如何集成到greenplum
- postgres14 分词和预期结果不一致 HOT 5
- 在postgres14中使用jieba分词,ts_headline中将原文一些词给隐藏了 HOT 1
- 怎么支持postgresql版本15呢 HOT 2
- ubuntu 18 PG15 版本下无法编译 HOT 1
- 还维护吗? HOT 2
- Compile warning: ‘DefineCustomConfigVariables’ was used with no prototype before its definition [-Wmissing-prototypes]
- Feature Request: Support PG16 HOT 4
- 报告BUG
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pg_jieba.