avidyalalala / sunpinyin

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

archlinux下编译sunpinyin-git #267

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.7月23晚clone出来的,进行编译
2.
3.

What is the expected output? What do you see instead?
配置页面记忆强度选择3,但是那个选择条停在0一直不动。然
后根本就不记忆输入的词,本来应该是可以记忆的。

What version of the product are you using? On what operating system?
7月23晚从git中clone的。

Archlinux 
64位。Python版本已经是3.0,但是有python2的环境。编译的时候��
�择的是python2。

Original issue reported on code.google.com by yuano...@gmail.com on 24 Jul 2011 at 12:25

GoogleCodeExporter commented 9 years ago
我这里无法编译:

g++ -o src/ime-core/imi_plugin.os -c -march=x86-64 -mtune=generic -O2 -pipe 
-DHAVE_CONFIG_H -DSUNPINYIN_DATA_DIR='"/usr/lib/sunpinyin/data"' -fPIC -I. 
-Isrc -Isrc/slm -Isrc/slm/tslmpack -Isrc/slm/tslminfo -Isrc/slm/tslmendian 
-Isrc/slm/tools -Isrc/slm/thread -Isrc/slm/slmseg -Isrc/slm/slmprune 
-Isrc/slm/slminfo -Isrc/slm/slmbuild -Isrc/slm/mmseg -Isrc/slm/ids2ngram 
-Isrc/slm/getWordFreq -Isrc/pinyin -Isrc/lexicon -Isrc/ime-core 
-I/usr/include/python3.2mu src/ime-core/imi_plugin.cpp
src/ime-core/imi_plugin.cpp: In constructor 
‘CIMIPythonPlugin::CIMIPythonPlugin(std::string)’:
src/ime-core/imi_plugin.cpp:102:46: error: ‘PyString_Check’ was not 
declared in this scope
src/ime-core/imi_plugin.cpp:103:40: error: ‘PyString_AsString’ was not 
declared in this scope
src/ime-core/imi_plugin.cpp:105:50: error: ‘PyString_Check’ was not 
declared in this scope
src/ime-core/imi_plugin.cpp:106:44: error: ‘PyString_AsString’ was not 
declared in this scope
src/ime-core/imi_plugin.cpp:108:60: error: ‘PyString_Check’ was not 
declared in this scope
src/ime-core/imi_plugin.cpp:109:54: error: ‘PyString_AsString’ was not 
declared in this scope
src/ime-core/imi_plugin.cpp: In function ‘wstring 
PyUnicode_AsWString(PyObject*)’:
src/ime-core/imi_plugin.cpp:151:60: error: cannot convert 
‘PyUnicodeObject*’ to ‘PyObject* {aka _object*}’ for argument ‘1’ 
to ‘Py_ssize_t PyUnicodeUCS4_AsWideChar(PyObject*, wchar_t*, Py_ssize_t)’
src/ime-core/imi_plugin.cpp: In member function ‘virtual TPluginCandidates 
CIMIPythonPlugin::provide_candidates(const TPluginPreedit&, int*)’:
src/ime-core/imi_plugin.cpp:178:35: error: ‘PyInt_Check’ was not declared 
in this scope
src/ime-core/imi_plugin.cpp:179:47: error: ‘PyInt_AsLong’ was not declared 
in this scope
src/ime-core/imi_plugin.cpp:195:75: error: ‘PyInt_AsLong’ was not declared 
in this scope
src/ime-core/imi_plugin.cpp: In member function ‘virtual TPluginCandidate 
CIMIPythonPlugin::translate_candidate(const TPluginCandidate&, int*)’:
src/ime-core/imi_plugin.cpp:221:35: error: ‘PyInt_Check’ was not declared 
in this scope
src/ime-core/imi_plugin.cpp:222:47: error: ‘PyInt_AsLong’ was not declared 
in this scope
scons: *** [src/ime-core/imi_plugin.os] Error 1
scons: building terminated because of errors.
==> ERROR: A failure occurred in build().
    Aborting...

Original comment by felixonm...@gmail.com on 25 Jul 2011 at 2:43

GoogleCodeExporter commented 9 years ago
 你用的Python3的环境吧?把那个SConstruct那个文件中的Python改成python2。可以在PKGBUILD里面修改。

Original comment by yuano...@gmail.com on 25 Jul 2011 at 2:48

GoogleCodeExporter commented 9 years ago
去把 Arch 里的默认 python 由 python3 改回 python2

Original comment by jhuangjiahua@gmail.com on 25 Jul 2011 at 7:57