码迷,mamicode.com
首页 > 其他好文 > 详细

TigerVNC编译安装

时间:2016-08-20 11:35:41      阅读:2122      评论:0      收藏:0      [点我收藏+]

标签:

TigerVNC official site:http://www.linuxfromscratch.org/blfs/view/svn/xsoft/tigervnc.html

TigerVNC版本:1.6.0

一、前提

*******************************************************************************
** Building TigerVNC
*******************************************************************************


================================
Build Requirements (All Systems)
================================

-- CMake (http://www.cmake.org) v2.8 or later

-- zlib

-- FLTK 1.3.3 or later

-- If building TLS support:
* GnuTLS 3.x
* See "Building TLS Support" below.

-- If building native language support (NLS):
* Gnu gettext 0.14.4 or later
* See "Building Native Language Support" below.

-- libjpeg-turbo
* "Normal" libjpegv6 is also supported, although it is not
recommended as it is much slower.


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

※备注:可通过tigervnc源码中BUILDING.txt查看到以上内容,表明TigerVNC依赖FLTK库。

二、编译安装FLTK-1.3.3

1) 将下载的fltk-1.3.3-source.tar.gz放到/usr/local/src目录下
2) 切换至/usr/local/src目录,解压fltk-1.3.3-source.tar.gz
root@vnc-client:/usr/local/src# tar -xvf fltk-1.3.3-source.tar.gz

root@vnc-client:/usr/local/src# ls
fltk-1.3.3

3) 创建bin目录
root@vnc-client:/usr/local/src# cd fltk-1.3.3/
root@vnc-client:/usr/local/src/fltk-1.3.3# mkdir bin

4) 配置

root@vnc-client:/usr/local/src/fltk-1.3.3# cd bin
root@vnc-client:/usr/local/src/fltk-1.3.3/bin# cmake ..

5) 编译
root@vnc-client:/usr/local/src/fltk-1.3.3/bin# make

6) 安装
root@vnc-client:/usr/local/src/fltk-1.3.3/bin# make install


三、编译安装TigerVNC-1.6.0

1) 将下载的tigervnc-1.6.0.tar.gz放到/opt目录下
2) 将下载的tigervnc-1.6.0-gethomedir-1.patch和tigervnc-1.6.0-xorg118-1.patch 放到/opt目录下
3) 打补丁
root@vnc-client:/opt# patch -Np1 -i tigervnc-1.6.0-xorg118-1.patch
root@vnc-client:/opt# patch -Np1 -i tigervnc-1.6.0-gethomedir-1.patch

4) 切换至/opt目录,解压tigervnc-1.6.0.tar.gz
root@vnc-client:/opt# tar -xvf tigervnc-1.6.0.tar.gz
root@vnc-client:/opt# cd tigervnc-1.6.0/

5) 创建build目录
root@vnc-client:/opt/tigervnc-1.6.0# mkdir -vp build

6) 配置FLTK_BASE_LIBRARYFLTK_IMAGES_LIBRARYFLTK_INCLUDE_DIR变量

通过修改/opt/tigervnc-1.6.0/CMakeLists.txt配置
a) 找到fltk库的全路径
root@vnc-client:/opt/tigervnc-1.6.0# find / -type f -name libfltk.a
/opt/fltk/lib/libfltk.a
/opt/fltk-1.3.3/lib/libfltk.a
/usr/local/lib/libfltk.a
/usr/local/src/fltk-1.3.3/bin/lib/libfltk.a
/usr/lib/libfltk.a
root@vnc-client:/usr/local/lib# ls
fltk libfltk_forms.a libfltk_images.a
libfltk.a libfltk_gl.a
b) 修改CMakeLists.txt
root@vnc-client:/opt/tigervnc-1.6.0# vi /opt/tigervnc-1.6.0/CMakeLists.txt
增加如下内容
------------------
set(FLTK_BASE_LIBRARY "/usr/local/lib/libfltk.a")
set(FLTK_IMAGES_LIBRARY "/usr/local/lib/libfltk_images.a")
set(FLTK_INCLUDE_DIR "/usr/local/include/")
------------------
备注:此步骤很关键,如果不配置变量,cmake配置时会报出warning,在make阶段报出错误
------------------
Linking CXX executable vncviewer
................................
collect2: error: ld returned 1 exit status
vncviewer/CMakeFiles/vncviewer.dir/build.make:404: recipe for target ‘vncviewer/vncviewer‘ failed
make[2]: *** [vncviewer/vncviewer] Error 1
CMakeFiles/Makefile2:775: recipe for target ‘vncviewer/CMakeFiles/vncviewer.dir/all‘ failed
make[1]: *** [vncviewer/CMakeFiles/vncviewer.dir/all] Error 2
Makefile:117: recipe for target ‘all‘ failed
------------------
7) 配置
root@vnc-client:/opt/tigervnc-1.6.0/build# cmake -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release -Wno-dev ..

8) 编译
root@vnc-client:/opt/tigervnc-1.6.0/build# make

9) 安装
root@vnc-client:/opt/tigervnc-1.6.0/build# make install

即可使用/usr/bin/vncviewer。

TigerVNC编译安装

标签:

原文地址:http://www.cnblogs.com/linprogram/p/5789794.html

(1)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!