Closed liuliangbin closed 6 years ago
========================================
Ubuntu 16.04.2 LTS Linux ubuntu 4.4.0-92-generic #115-Ubuntu SMP Thu Aug 10 09:04:33 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
postgreSQL 10
==================================================
ucmed@ubuntu:/opt/postgresql-10.0/pg_jieba$ make [ 50%] Building CXX object CMakeFiles/pg_jieba.dir/pg_jieba.cpp.o
from /opt/postgresql-10.0/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) ^ /usr/include/libintl.h:44:14: error: expected ‘)’ before ‘const’ /usr/include/libintl.h:44:14: error: expected initializer before ‘const’ /usr/include/libintl.h:61:14: error: expected unqualified-id before ‘unsigned’ extern char ngettext (const char __msgid1, const char msgid2, ^ /usr/include/libintl.h:61:14: error: expected ‘)’ before ‘unsigned’ /usr/include/libintl.h:61:14: error: expected ‘)’ before ‘unsigned’ /usr/include/libintl.h:61:14: error: expected initializer before ‘unsigned’ /usr/include/libintl.h:67:14: error: expected unqualified-id before ‘unsigned’ extern char dngettext (const char domainname, const char __msgid1, ^ /usr/include/libintl.h:67:14: error: expected ‘)’ before ‘unsigned’ /usr/include/libintl.h:67:14: error: expected ‘)’ before ‘unsigned’ /usr/include/libintl.h:67:14: error: expected initializer before ‘unsigned’ CMakeFiles/pg_jieba.dir/build.make:62: recipe for target 'CMakeFiles/pg_jieba.dir/pg_jieba.cpp.o' failed make[2]: [CMakeFiles/pg_jieba.dir/pg_jieba.cpp.o] Error 1 CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/pg_jieba.dir/all' failed make[1]: [CMakeFiles/pg_jieba.dir/all] Error 2 Makefile:129: recipe for target 'all' failed make: [all] Error 2
看了closed issue, 不要用master 版本,用最新tag 版本就可以工作了。
========================================
Ubuntu 16.04.2 LTS Linux ubuntu 4.4.0-92-generic #115-Ubuntu SMP Thu Aug 10 09:04:33 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
postgreSQL 10
==================================================
ucmed@ubuntu:/opt/postgresql-10.0/pg_jieba$ make [ 50%] Building CXX object CMakeFiles/pg_jieba.dir/pg_jieba.cpp.o
**In file included from /opt/pgsql/10/include/server/postgres.h:47:0,
/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) ^ /usr/include/libintl.h:44:14: error: expected ‘)’ before ‘const’ /usr/include/libintl.h:44:14: error: expected initializer before ‘const’ /usr/include/libintl.h:61:14: error: expected unqualified-id before ‘unsigned’ extern char ngettext (const char __msgid1, const char msgid2, ^ /usr/include/libintl.h:61:14: error: expected ‘)’ before ‘unsigned’ /usr/include/libintl.h:61:14: error: expected ‘)’ before ‘unsigned’ /usr/include/libintl.h:61:14: error: expected initializer before ‘unsigned’ /usr/include/libintl.h:67:14: error: expected unqualified-id before ‘unsigned’ extern char dngettext (const char domainname, const char __msgid1, ^ /usr/include/libintl.h:67:14: error: expected ‘)’ before ‘unsigned’ /usr/include/libintl.h:67:14: error: expected ‘)’ before ‘unsigned’ /usr/include/libintl.h:67:14: error: expected initializer before ‘unsigned’ CMakeFiles/pg_jieba.dir/build.make:62: recipe for target 'CMakeFiles/pg_jieba.dir/pg_jieba.cpp.o' failed make[2]: [CMakeFiles/pg_jieba.dir/pg_jieba.cpp.o] Error 1 CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/pg_jieba.dir/all' failed make[1]: [CMakeFiles/pg_jieba.dir/all] Error 2 Makefile:129: recipe for target 'all' failed make: [all] Error 2