fcitx426需要的依赖具体是什么?

222 views
Skip to first unread message

Y C

unread,
Sep 24, 2012, 2:58:12 AM9/24/12
to fcitx

编译 fcitx 按照您需要的功能,需要(且不限于)以下包及其对应开发包,开发包在发行版中多以-dev或者-devel结尾:

  • gcc

  • gtk2,gtk3的IM Module需要gtk2,gtk3,以及dbus-glib

  • qt的IM Module需要qt4,libicu

  • fcitx-classic-ui(支持皮肤的默认界面),fcitx-vk(虚拟键盘)需要libx11(xlib),cairo,可选项为pango

  • fcitx-kimpanel-ui需要dbus

  • fcitx-chttrans(简繁转换)可选项为OpenCC

    ===============================================================================

    上面的话翻译过来后是什麼意思?   也就是说,当初次在ubuntu 12.04这样一个最新且简单的系统上,我要源码编译安装fcitx4.2.6的话,首先需要准备的“依赖名字”具体是什么?

Y C

unread,
Sep 24, 2012, 3:02:08 AM9/24/12
to fcitx
结合我刚刚的操作过程的记录,烦请大家看一下:
o@O:/opt/tools/fcitx-4.2.6/build$ sudo cmake .. -DCMAKE_INSTALL_PREFIX=/opt/fcitx426
-- The C compiler identification is GNU
-- The CXX compiler identification is unknown
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
CMake Error: your CXX compiler: "CMAKE_CXX_COMPILER-NOTFOUND" was not found.   Please set CMAKE_CXX_COMPILER to a valid compiler path or name.
-- Could NOT find Doxygen (missing:  DOXYGEN_EXECUTABLE) 
-- Looking for include files HAVE_UNISTD_H
-- Looking for include files HAVE_UNISTD_H - found
-- Looking for include files HAVE_MALLOC_H
-- Looking for include files HAVE_MALLOC_H - found
-- Looking for include files HAVE_STDBOOL_H
-- Looking for include files HAVE_STDBOOL_H - found
-- Looking for asprintf
-- Looking for asprintf - found
CMake Error at /usr/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:91 (MESSAGE):
  Could NOT find Gettext (missing: GETTEXT_MSGMERGE_EXECUTABLE
  GETTEXT_MSGFMT_EXECUTABLE)
Call Stack (most recent call first):
  /usr/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:252 (_FPHSA_FAILURE_MESSAGE)
  /usr/share/cmake-2.8/Modules/FindGettext.cmake:46 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  CMakeLists.txt:60 (find_package)


-- Configuring incomplete, errors occurred!
o@O:/opt/tools/fcitx-4.2.6/build$ 

夏凯

unread,
Sep 24, 2012, 3:04:50 AM9/24/12
to fc...@googlegroups.com
具体的包名要看发行版,比如debian的x11的开发包可能是libx11-dev,而centos
可能是x11-devel,一般你搜索一下 x11 dev,就行了,或者偷懒的话就用apt-get
build-dep自动安装编译需要的软件,不过要求源里面开启deb-src,而且这个只是
编译源里面的那个版本的依赖关系,如果版本差很多,还是会有 一些软件包要自
己装的。
On 2012年09月24日 14:58, Y C wrote:
>
> 编译 fcitx 按照您需要的功能,需要(且不限于)以下包及其对应开发包,开
> 发包在发行版中多以-dev或者-devel结尾:
>
> *
>
> gcc
>
> *
>
> gtk2,gtk3的IM Module需要gtk2,gtk3,以及dbus-glib
>
> *
>
> qt的IM Module需要qt4,libicu
>
> *
>
> fcitx-classic-ui(支持皮肤的默认界面),fcitx-vk(虚拟键盘)需要
> libx11(xlib),cairo,可选项为pango
>
> *
>
> fcitx-kimpanel-ui需要dbus
>
> *
>
> fcitx-chttrans(简繁转换)可选项为OpenCC
>
> ===============================================================================
>
> 上面的话翻译过来后是什麼意思? 也就是说,当初次在ubuntu 12.04这
> 样一个最新且简单的系统上,我要源码编译安装fcitx4.2.6的话,首先需要
> 准备的“依赖名字”具体是什么?
>
> --
> You received this message because you are subscribed to the Google
> Groups "fcitx" group.
> To post to this group, send email to fc...@googlegroups.com.
> To unsubscribe from this group, send email to
> fcitx+un...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/fcitx?hl=en.

Y C

unread,
Sep 24, 2012, 3:20:50 AM9/24/12
to fc...@googlegroups.com
谢谢了,我明白你的意思了。
还有两个问题:
1、“或者偷懒的话就用apt-get build-dep自动安装编译需要的软件,不过要求源里面开启deb-src,”     
       a、如何使用build-dep ?  我在终端里输入 sudo apt-get install build-dep 结果说找不到这个软件,是不是我理解得不对?   难道是:sudo apt-get install build-dep fcitx  ?  
       b、需要源开启deb-src——我是在/etc/apt/source.list中手动加入PPA后,然后更新的。但是我并不打算从“新立德”中安装,只想源码编译(貌似前面加入PPA没有意义),于是我想知道“需要源开启deb-src”具体要怎么做?

2、假设我现在安装好了4.2.6   那么我首先要把这个输入法弄成系统默认,我记得有两条命令来着,貌似是含有im-switch字样……   不知道你记得完整的不?


Y C

unread,
Sep 24, 2012, 3:23:06 AM9/24/12
to fc...@googlegroups.com
我刚刚安装了这些依赖:
 sudo apt-get install build-essential automake
sudo apt-get install x11proto-xext-dev libxtst-dev
sudo apt-get build-dep fcitx       ============这个没有安装。
sudo apt-get install libxpm-dev
sudo apt-get install gettext
sudo apt-get install libxkbfile-dev
sudo apt-get install libgirepository1.0-dev 

然后
sudo cmake .. -DCMAKE_INSTALL_PREFIX=/opt/fcitx426  -DENABLE_GTK3_IM_MODULE=On -DENABLE_QT_IM_MODULE=On
结果:
o@O:/opt/tools/fcitx-4.2.6/build$ sudo cmake .. -DCMAKE_INSTALL_PREFIX=/opt/fcitx426  -DENABLE_GTK3_IM_MODULE=On -DENABLE_QT_IM_MODULE=On
[sudo] password for o: 
-- The CXX compiler identification is GNU
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Could NOT find Doxygen (missing:  DOXYGEN_EXECUTABLE) 
-- Found Gettext: /usr/bin/msgmerge 
-- Looking for dgettext
-- Looking for dgettext - found
-- Found Libintl: /usr/include 
-- Looking for iconv_open
-- Looking for iconv_open - found
-- Performing Test ICONV_HAVE_WERROR
-- Performing Test ICONV_HAVE_WERROR - Success
-- Performing Test LIBICONV_SECOND_ARGUMENT_IS_CONST
-- Performing Test LIBICONV_SECOND_ARGUMENT_IS_CONST - Failed
-- Found Libiconv: /usr/include 
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Found Pthread: /usr/include 
-- Looking for backtrace
-- Looking for backtrace - found
-- Found LibExecinfo: /usr/include 
-- checking for module 'enchant'
--   package 'enchant' not found
-- Could NOT find Enchant (missing:  ENCHANT_LIBRARIES ENCHANT_INCLUDE_DIR ENCHANT_API_COMPATIBLE) 
CMake Error at /usr/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:91 (MESSAGE):
  Could NOT find LibXml2 (missing: LIBXML2_LIBRARIES LIBXML2_INCLUDE_DIR)
Call Stack (most recent call first):
  /usr/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:252 (_FPHSA_FAILURE_MESSAGE)
  /usr/share/cmake-2.8/Modules/FindLibXml2.cmake:50 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  CMakeLists.txt:84 (find_package)


-- Configuring incomplete, errors occurred!
这是怎么了呢?   

夏凯

unread,
Sep 24, 2012, 3:27:42 AM9/24/12
to fc...@googlegroups.com
我没说清楚,sudo apt-get build-dep fcitx就好了,build-dep是动作,不是软
件,其实 apt-get有很多动作的,不仅仅是install remove purge这些,你可以
man apt-get看下。

开启deb-src就是,一般我们只会放一行
deb http://mirrors.sohu.com/debian/ squeeze main
要加一行
deb-src http://mirrors.sohu.com/debian/ squeeze main
这个是表示源码的仓库
其实apt-get都是源里面的,用源里面的源码编译也可以的,不一定要自己找源码。
im- switch的话直接运行就行了,会让你选择的。
On 2012年09月24日 15:20, Y C wrote:
> 谢谢了,我明白你的意思了。
> 还有两个问题:
> 1、“或 者偷懒的话就用apt-get build-dep自动安装编译需要的软件,不 过要
> 求源里面开启deb- src,”
> a、如何使用build-dep ? 我在终端里输入 sudo apt-get install
> build-dep 结果说找不到这个软件,是不是我理解得不对? 难道是:sudo
> apt-get install build-dep fcitx ?
> b、需要源开启deb-src——我是在/etc/apt/source.list中手动加入PPA后,然后
> 更新的。但是我并不打算从“新立德”中安 装,只想源码编译(貌似前面加入PPA
> 没有意义),于是我想知道“需 要源开启deb-src” 具体要怎么做?
>
> 2、 假设我现在安装好了4.2.6 那么我首先要把这个输入法弄成系统默认,我记
> 得有两条命令来着,貌似是含有im-switch字样…… 不知道你记得完整的不?
>
>

夏凯

unread,
Sep 24, 2012, 3:28:38 AM9/24/12
to fc...@googlegroups.com
不用手动装,这些apt-get build-dep会自动帮你搞定的。

Y C

unread,
Sep 24, 2012, 3:42:17 AM9/24/12
to fc...@googlegroups.com
这个要怎么使用?

sudo apt-get install build-dep fcitx   
是这样吗?

如果是的话,deb-src这个需要开启,那么它要在哪里开启?

Y C

unread,
Sep 24, 2012, 4:03:50 AM9/24/12
to fc...@googlegroups.com
O my god!!!
build-dep这个东西好牛!!

夏凯

unread,
Sep 24, 2012, 4:58:38 AM9/24/12
to fc...@googlegroups.com
其实你可以这样想,apt-get install是自动处理“运行依赖关系”,使用
sources.list里面deb定义的仓库,apt-get build-dep是自动处理“编译依赖关
系”,使用sources.list里面deb-src定义的仓库, 所以他们其实是一样的,当
然,这两个只是我自己编的,并没有这两个词。
On 2012年09月24日 16:03, Y C wrote:
> O my god!!!
> build-dep这个东西好牛!!

Y C

unread,
Sep 24, 2012, 5:02:41 AM9/24/12
to fc...@googlegroups.com
我明白你的意思了,也弄清楚了build-dep的事。只是现在新的问题出现了:

o@O:/opt/tools/fcitx-4.2.6/build$ sudo cmake .. -DCMAKE_INSTALL_PREFIX=/opt/fcitx426 -DENABLE_GTK3_IM_MODULE=On -DENABLE_QT_IM_MODULE=On
[sudo] password for o:
-- Could NOT find Doxygen (missing:  DOXYGEN_EXECUTABLE)
-- checking for module 'enchant'
--   found enchant, version 1.6.0
-- Performing Test ENCHANT_HAVE_WERROR
-- Performing Test ENCHANT_HAVE_WERROR - Success
-- Performing Test ENCHANT_API_COMPATIBLE
-- Performing Test ENCHANT_API_COMPATIBLE - Success
-- Found Enchant: /usr/lib/libenchant.so
-- Found LibXml2: /usr/lib/i386-linux-gnu/libxml2.so
-- checking for module 'iso-codes'
--   found iso-codes, version 3.31
-- Found IsoCodes: /usr/share/xml/iso-codes/iso_639.xml
-- checking for module 'xkbfile'
--   found xkbfile, version 1.0.7
-- Found XkbFile: /usr/lib/i386-linux-gnu/libxkbfile.so
-- Performing Test PRESAGE_HAVE_WERROR
-- Performing Test PRESAGE_HAVE_WERROR - Success
-- Performing Test PRESAGE_API_COMPATIBLE
-- Performing Test PRESAGE_API_COMPATIBLE - Success
-- Found Presage: /usr/lib/libpresage.so
-- Found ICU header files in /usr/include
-- Found ICU libraries: /usr/lib/libicuuc.so
-- Looking for XOpenDisplay in /usr/lib/i386-linux-gnu/libX11.so;/usr/lib/i386-linux-gnu/libXext.so
-- Looking for XOpenDisplay in /usr/lib/i386-linux-gnu/libX11.so;/usr/lib/i386-linux-gnu/libXext.so - found
-- Looking for gethostbyname
-- Looking for gethostbyname - found
-- Looking for connect
-- Looking for connect - found
-- Looking for remove
-- Looking for remove - found
-- Looking for shmat
-- Looking for shmat - found
-- Looking for IceConnectionNumber in ICE
-- Looking for IceConnectionNumber in ICE - found
-- Found X11: /usr/lib/i386-linux-gnu/libX11.so
-- checking for module 'cairo-xlib>=1.0'
--   found cairo-xlib, version 1.10.2
-- checking for module 'pangocairo>=1.0'
--   found pangocairo, version 1.30.0
-- checking for module 'dbus-1>=1.1.0'
--   found dbus-1, version 1.4.18
-- checking for module 'opencc>=0.1.1'
--   found opencc, version 0.3.0
-- checking for module 'gio-2.0>=2.26'
--   found gio-2.0, version 2.32.3
-- checking for module 'gobject-introspection-1.0'
--   found gobject-introspection-1.0, version 1.32.0
-- checking for module 'glib-2.0'
--   found glib-2.0, version 2.32.3
-- checking for module 'gtk+-2.0'
--   found gtk+-2.0, version 2.24.10
-- checking for module 'gtk+-3.0'
--   found gtk+-3.0, version 3.4.2
-- Looking for Q_WS_X11
-- Looking for Q_WS_X11 - found
-- Looking for Q_WS_WIN
-- Looking for Q_WS_WIN - not found.
-- Looking for Q_WS_QWS
-- Looking for Q_WS_QWS - not found.
-- Looking for Q_WS_MAC
-- Looking for Q_WS_MAC - not found.
-- Found Qt4: /usr/bin/qmake (found suitable version "4.8.1", required is "4.5")
-- Configuring done
-- Generating done
-- Build files have been written to: /opt/tools/fcitx-4.2.6/build
o@O:/opt/tools/fcitx-4.2.6/build$

这是什么原因,帮我看看?


注:目前在/opt目录下其实没有建立fcitx426文件夹。编译选项指定了文件夹,会自己新建吗?  我这里是没有。

夏凯

unread,
Sep 24, 2012, 5:16:03 AM9/24/12
to fc...@googlegroups.com
cmake不用sudo,只有make install需要,这也是因为我们默认安装在/usr/local
/目录下,而这个目录需要 root权限才能写,如果你装在其它地方,make install
也不需要sudo的。
你的是成功了啊,echo $?可以看上个命令的返回值,0就是成功了,非0就是失败了。

Leiking

unread,
Sep 24, 2012, 10:33:28 PM9/24/12
to fc...@googlegroups.com
ot. 还是gentoo省心

2012/9/24 夏凯 <walk...@gmail.com>
To unsubscribe from this group, send email to fcitx+unsubscribe@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/fcitx?hl=en.
--
You received this message because you are subscribed to the Google Groups "fcitx" group.
To post to this group, send email to fc...@googlegroups.com.
To unsubscribe from this group, send email to fcitx+unsubscribe@googlegroups.com.

Weng Xuetian

unread,
Sep 24, 2012, 10:49:42 PM9/24/12
to fc...@googlegroups.com
有问题?

最后都configure done了,这句基本是成功的标志。

另外如其他人所说,cmake不用 sudo,只有最后的make install才有可能有必要(在你安装到系统目录下的情况下)

夏凯

unread,
Sep 24, 2012, 10:50:48 PM9/24/12
to fc...@googlegroups.com
ubuntu更省心啊,直接ppa,都不用编译。
On 2012年09月25日 10:33, Leiking wrote:
> ot. 还是gentoo省心
>
> 2012/9/24 夏凯 <walk...@gmail.com <mailto:walk...@gmail.com>>
>
> cmake不用sudo,只有make install需要,这也是因为我们默认安装在/usr
> /local /目录下,而这个目录需要 root权限才能写,如果你装在其它地
> <mailto:fc...@googlegroups.com>.
> To unsubscribe from this group, send email to
> fcitx+un...@googlegroups.com
> <mailto:fcitx%2Bunsu...@googlegroups.com>.
> For more options, visit this group at
> http://groups.google.com/group/fcitx?hl=en.
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "fcitx" group.
> To post to this group, send email to fc...@googlegroups.com
> <mailto:fc...@googlegroups.com>.
> To unsubscribe from this group, send email to
> fcitx+un...@googlegroups.com
> <mailto:fcitx%2Bunsu...@googlegroups.com>.
> For more options, visit this group at
> http://groups.google.com/group/fcitx?hl=en.
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "fcitx" group.
> To post to this group, send email to fc...@googlegroups.com.
> To unsubscribe from this group, send email to
> fcitx+un...@googlegroups.com.

Weng Xuetian

unread,
Sep 24, 2012, 10:54:33 PM9/24/12
to fc...@googlegroups.com
我怎么觉得一会会有obs党跳出来……

嘛,这个不值得争论了……

在 deb系统上用 apt-get build-dep 确实比较省心,装依赖的话,都是打包的人研究过了的。

夏凯

unread,
Sep 24, 2012, 10:57:00 PM9/24/12
to fc...@googlegroups.com
呵呵,确实,其实每个人需求都不一样,最适合自己的就好,没有什么是最好的发
行版,只有最适合你的。

Y C

unread,
Sep 24, 2012, 11:18:56 PM9/24/12
to fc...@googlegroups.com
闻道有先后,术业有专攻吧。

会了不难,难了不会。   如果让你去搞原子弹的设计,我想就算给你一年的时间来预习这个专业的书籍,你也会在课堂上问出啼笑皆非的问题来……

然,这一切都不奇怪,因为“它”受到了关注和喜好 。

Leiking

unread,
Sep 25, 2012, 2:39:23 AM9/25/12
to fc...@googlegroups.com
闻道有先后,术业有专攻吧。

同意啊!

2012/9/25 Y C <linux....@gmail.com>
闻道有先后,术业有专攻吧。

会了不难,难了不会。   如果让你去搞原子弹的设计,我想就算给你一年的时间来预习这个专业的书籍,你也会在课堂上问出啼笑皆非的问题来……

然,这一切都不奇怪,因为“它”受到了关注和喜好 。
Reply all
Reply to author
Forward
0 new messages