avidyalalala / sunpinyin

Automatically exported from code.google.com/p/sunpinyin
0 stars 0 forks source link

建议前后端能够完全独立 #192

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. 从源代码编译 sunpinyin 的后端程序,成功安装。 
2. 解压一个新的 sunpinyin 
源码目录,再编译前端,结果失败,提示找不到相应的ime-code
库文件。
说明现在的 sunpinyin 
从源码编译必须是先编译后端,然后在同一环境的warpper目录�
��编译前端代码才可行。

What is the expected output? What do you see instead?
希望前后端可以完全独立,准确的说,是前端可以直接依靠��
�统内安装好的链接库,而不是编译目录的那些库文件。

What version of the product are you using? On what operating system?
Version: sunpinyin-2.0.2
OS: gentoo

Original issue reported on code.google.com by ocean...@gmail.com on 24 Aug 2010 at 1:26

GoogleCodeExporter commented 9 years ago
oceanboo,

你能不能给出具体的错误信息,以及你编译时采用的命令行��
�

Original comment by tchai...@gmail.com on 24 Aug 2010 at 3:01

GoogleCodeExporter commented 9 years ago
下面是我解压sunpinyin-2.0.2.tar.gz 后,直接进入 wrapper/ibus 
目录进行编译。

oceanboo@Computer ~/Downloads/sunpinyin/wrapper/ibus $ scons --prefix=/usr
scons: Reading SConscript files ...
Checking for pkg-config... yes
Checking for ibus-1.0... yes
Checking for sunpinyin-2.0... yes
scons: done reading SConscript files.
scons: Building targets ...
Creating 'data/sunpinyin.xml'
g++ -o src/debug.o -c -O2 -pipe -DIBUS_SUNPINYIN_LOCALEDIR='"/share/locale"' 
-DIBUS_SUNPINYIN_ICON_DIR='"/usr/share/ibus-sunpinyin/icons"' 
-DLIBEXECDIR='"/usr/lib/ibus-sunpinyin"' -DGETTEXT_PACKAGE='"ibus-sunpinyin"' 
-pthread -I. -I/usr/include/ibus-1.0 -I/usr/include/glib-2.0 
-I/usr/lib/glib-2.0/include 
-I/var/tmp/portage/app-i18n/sunpinyin-2.0.2/image/usr/include/sunpinyin-2.0 
-I/var/tmp/portage/app-i18n/sunpinyin-2.0.2/image/usr/include/sunpinyin-2.0/piny
in 
-I/var/tmp/portage/app-i18n/sunpinyin-2.0.2/image/usr/include/sunpinyin-2.0/conf
ig 
-I/var/tmp/portage/app-i18n/sunpinyin-2.0.2/image/usr/include/sunpinyin-2.0/lexi
con 
-I/var/tmp/portage/app-i18n/sunpinyin-2.0.2/image/usr/include/sunpinyin-2.0/slm 
-I/var/tmp/portage/app-i18n/sunpinyin-2.0.2/image/usr/include/sunpinyin-2.0/slm/
getWordFreq 
-I/var/tmp/portage/app-i18n/sunpinyin-2.0.2/image/usr/include/sunpinyin-2.0/slm/
tslmendian 
-I/var/tmp/portage/app-i18n/sunpinyin-2.0.2/image/usr/include/sunpinyin-2.0/slm/
slmbuild 
-I/var/tmp/portage/app-i18n/sunpinyin-2.0.2/image/usr/include/sunpinyin-2.0/slm/
slmprune 
-I/var/tmp/portage/app-i18n/sunpinyin-2.0.2/image/usr/include/sunpinyin-2.0/slm/
mmseg 
-I/var/tmp/portage/app-i18n/sunpinyin-2.0.2/image/usr/include/sunpinyin-2.0/slm/
tslminfo 
-I/var/tmp/portage/app-i18n/sunpinyin-2.0.2/image/usr/include/sunpinyin-2.0/slm/
ids2ngram 
-I/var/tmp/portage/app-i18n/sunpinyin-2.0.2/image/usr/include/sunpinyin-2.0/slm/
slmseg 
-I/var/tmp/portage/app-i18n/sunpinyin-2.0.2/image/usr/include/sunpinyin-2.0/slm/
tslmpack 
-I/var/tmp/portage/app-i18n/sunpinyin-2.0.2/image/usr/include/sunpinyin-2.0/slm/
slminfo 
-I/var/tmp/portage/app-i18n/sunpinyin-2.0.2/image/usr/include/sunpinyin-2.0/slm/
thread 
-I/var/tmp/portage/app-i18n/sunpinyin-2.0.2/image/usr/include/sunpinyin-2.0/slm/
tools 
-I/var/tmp/portage/app-i18n/sunpinyin-2.0.2/image/usr/include/sunpinyin-2.0/ime-
core src/debug.cpp
g++ -o src/engine.o -c -O2 -pipe -DIBUS_SUNPINYIN_LOCALEDIR='"/share/locale"' 
-DIBUS_SUNPINYIN_ICON_DIR='"/usr/share/ibus-sunpinyin/icons"' 
-DLIBEXECDIR='"/usr/lib/ibus-sunpinyin"' -DGETTEXT_PACKAGE='"ibus-sunpinyin"' 
-pthread -I. -I/usr/include/ibus-1.0 -I/usr/include/glib-2.0 
-I/usr/lib/glib-2.0/include 
-I/var/tmp/portage/app-i18n/sunpinyin-2.0.2/image/usr/include/sunpinyin-2.0 
-I/var/tmp/portage/app-i18n/sunpinyin-2.0.2/image/usr/include/sunpinyin-2.0/piny
in 
-I/var/tmp/portage/app-i18n/sunpinyin-2.0.2/image/usr/include/sunpinyin-2.0/conf
ig 
-I/var/tmp/portage/app-i18n/sunpinyin-2.0.2/image/usr/include/sunpinyin-2.0/lexi
con 
-I/var/tmp/portage/app-i18n/sunpinyin-2.0.2/image/usr/include/sunpinyin-2.0/slm 
-I/var/tmp/portage/app-i18n/sunpinyin-2.0.2/image/usr/include/sunpinyin-2.0/slm/
getWordFreq 
-I/var/tmp/portage/app-i18n/sunpinyin-2.0.2/image/usr/include/sunpinyin-2.0/slm/
tslmendian 
-I/var/tmp/portage/app-i18n/sunpinyin-2.0.2/image/usr/include/sunpinyin-2.0/slm/
slmbuild 
-I/var/tmp/portage/app-i18n/sunpinyin-2.0.2/image/usr/include/sunpinyin-2.0/slm/
slmprune 
-I/var/tmp/portage/app-i18n/sunpinyin-2.0.2/image/usr/include/sunpinyin-2.0/slm/
mmseg 
-I/var/tmp/portage/app-i18n/sunpinyin-2.0.2/image/usr/include/sunpinyin-2.0/slm/
tslminfo 
-I/var/tmp/portage/app-i18n/sunpinyin-2.0.2/image/usr/include/sunpinyin-2.0/slm/
ids2ngram 
-I/var/tmp/portage/app-i18n/sunpinyin-2.0.2/image/usr/include/sunpinyin-2.0/slm/
slmseg 
-I/var/tmp/portage/app-i18n/sunpinyin-2.0.2/image/usr/include/sunpinyin-2.0/slm/
tslmpack 
-I/var/tmp/portage/app-i18n/sunpinyin-2.0.2/image/usr/include/sunpinyin-2.0/slm/
slminfo 
-I/var/tmp/portage/app-i18n/sunpinyin-2.0.2/image/usr/include/sunpinyin-2.0/slm/
thread 
-I/var/tmp/portage/app-i18n/sunpinyin-2.0.2/image/usr/include/sunpinyin-2.0/slm/
tools 
-I/var/tmp/portage/app-i18n/sunpinyin-2.0.2/image/usr/include/sunpinyin-2.0/ime-
core src/engine.cpp
In file included from src/engine.cpp:37:
src/sunpinyin_engine.h:41:39: error: ime-core/imi_option_event.h: No such file 
or directory
In file included from src/sunpinyin_engine.h:42,
                 from src/engine.cpp:37:
src/sunpinyin_config.h:43:23: error: sunpinyin.h: No such file or directory
In file included from src/sunpinyin_engine.h:42,
                 from src/engine.cpp:37:
src/sunpinyin_config.h:57: error: ‘CSunpinyinSessionFactory’ was not 
declared in this scope
src/sunpinyin_config.h:57: error: template argument 2 is invalid
src/sunpinyin_config.h:57: error: template argument 4 is invalid
src/sunpinyin_config.h:59: error: ‘EShuangpinType’ was not declared in this 
scope
src/sunpinyin_config.h:59: error: template argument 2 is invalid
src/sunpinyin_config.h:59: error: template argument 4 is invalid
src/sunpinyin_config.h:85: error: ‘CSunpinyinSessionFactory’ has not been 
declared
src/sunpinyin_config.h:85: error: ISO C++ forbids declaration of 
‘EPyScheme’ with no type
src/sunpinyin_config.h:85: error: expected ‘;’ before ‘get_py_scheme’
src/sunpinyin_config.h:86: error: ‘CSunpinyinSessionFactory’ has not been 
declared
src/sunpinyin_config.h:108: error: ‘CSunpinyinSessionFactory’ has not been 
declared
src/sunpinyin_config.h:108: error: expected ‘,’ or ‘...’ before 
‘scheme’
src/sunpinyin_config.h:109: error: ‘CSunpinyinSessionFactory’ has not been 
declared
src/sunpinyin_config.h:109: error: ISO C++ forbids declaration of 
‘EPyScheme’ with no type
src/sunpinyin_config.h:109: error: expected ‘;’ before ‘get_scheme’
In file included from src/engine.cpp:37:
src/sunpinyin_engine.h:53: error: expected class-name before ‘{’ token
src/sunpinyin_engine.h:88: error: ISO C++ forbids declaration of 
‘COptionEvent’ with no type
src/sunpinyin_engine.h:88: error: expected ‘,’ or ‘...’ before ‘&’ 
token
scons: *** [src/engine.o] Error 1
scons: building terminated because of errors.

看输出,很明显Checking for sunpinyin-2.0... yes 是检测出系统是有 
sunpinyin-.2.0 
的,可是到后面编译,它还是找的当前编译目录的 ime-core 
下的库文件。
实际上我的系统库里面是有这个文件的。

oceanboo@Computer ~ $ ls -l /usr/include/sunpinyin-2.0/ime-core/
total 108
-rw-r--r-- 1 root root  6426 Aug 15 13:32 ic_history.h
-rw-r--r-- 1 root root 11865 Aug 15 13:32 imi_context.h
-rw-r--r-- 1 root root  2832 Aug 15 13:32 imi_data.h
-rw-r--r-- 1 root root  2543 Aug 15 13:32 imi_defines.h
-rw-r--r-- 1 root root  2900 Aug 15 13:32 imi_funcobjs.h
-rw-r--r-- 1 root root  4249 Aug 15 13:32 imi_keys.h
-rw-r--r-- 1 root root  2762 Aug 15 13:32 imi_option_event.h
-rw-r--r-- 1 root root   871 Aug 15 13:32 imi_option_keys.h
-rw-r--r-- 1 root root 11734 Aug 15 13:32 imi_options.h
-rw-r--r-- 1 root root  8307 Aug 15 13:32 imi_uiobjects.h
-rw-r--r-- 1 root root  3793 Aug 15 13:32 imi_view_classic.h
-rw-r--r-- 1 root root  7197 Aug 15 13:32 imi_view.h
-rw-r--r-- 1 root root  3093 Aug 15 13:32 imi_winHandler.h
-rw-r--r-- 1 root root  7636 Aug 15 13:32 lattice_states.h
-rw-r--r-- 1 root root  2874 Aug 15 13:32 userdict.h
-rw-r--r-- 1 root root  4114 Aug 15 13:32 utils.h

如果sunpinyin是想把前后端完全独立,那么源码编译的时候就��
�应该有这样的依赖,直接依赖向系统的库文件才对。

Original comment by ocean...@gmail.com on 25 Aug 2010 at 1:58

GoogleCodeExporter commented 9 years ago
pkg-config sunpinyin-2.0 --cflags
看看?

似乎你把libsunpinyin的prefix给成了/var/tmp/portage/app-i18n/sunpinyin-2.
0.2/image/了。

Original comment by mikeandm...@gmail.com on 25 Aug 2010 at 2:04

GoogleCodeExporter commented 9 years ago
对了,这个问题是个大乌龙,mikeandmore 
可以把它关掉了,呵呵。

不好意思了。

Original comment by ocean...@gmail.com on 2 Sep 2010 at 1:46

GoogleCodeExporter commented 9 years ago

Original comment by find...@gmail.com on 2 Sep 2010 at 1:47