Wayland download and compile

下载wayland-1.0.3并解压,sudo gedit /etc/profile,添加下面内容:

WLD=/usr   # change this to another location if you prefer
LD_LIBRARY_PATH=$WLD/lib
PKG_CONFIG_PATH=$WLD/lib/pkgconfig/:$WLD/share/pkgconfig/
ACLOCAL="aclocal -I $WLD/share/aclocal"

export WLD LD_LIBRARY_PATH PKG_CONFIG_PATH ACLOCAL

执行source /etc/profile

$ ./autogen.sh --prefix=$WLD
$ make
$ make install

下载Mesa-9.0.1并解压

$ ./autogen.sh --prefix=$WLD
$ make
$ make install
sudo apt-get install xorg-dev libdrm-dev x11proto-dri2-dev libxxf86vm-dev libxt-dev libx11-xcb-dev libxcb-glx0 libxcb-glx0-dev libxcb-dri2-0-dev
下载dri2proto-2.6.tar.gz glproto-1.4.14.tar.gz libdrm_2.4.32.orig.tar.gz libdrm-2.4.40.tar.gz  解压安装
make && make install

下面来自http://www.cnblogs.com/ankier/archive/2012/11/09.html

Mesa,这是当前Linux平台上OpenGL的一个最好实现ftp://ftp.freedesktop.org/pub/mesa/9.0.1/

1> ./configure, error:makedepend is required to build Mesa

sudo apt-get install xutils-dev

2> ./configure, error: flex is needed to build Mesa

sudo apt-get install flex

3> ./configure, error: bison is needed to build Mesa

sudo apt-get install bison

4> ./configure, error: X11 development libraries needed for GLX

sudo apt-get install xorg-dev

5> ./configure, 

error: Direct rendering requries libdrm>= 2.4.24

下载libdrm-2.4.33.tar.bz2,解压,安装

6> ./configure,

configure: error: Package requirements (x11 xext xdamage xfixes x11-xcb xcb-glx xxf86vm) were not met:

No package ""x11-xcb"" found

No package ""xcb-glx"" found

sudo apt-get install libx11-xcb-dev libxcb-glx0 libxcb-glx0-dev

7> ./configure,

No package ""libdrm_nouveau"" found

这个题目斗劲愁闷,在32位的ubuntu应当是经由过程vmware tools可以安装驱动Gallium 0.4 on llvmpipe(LLVM 0 x300),不知为何64位不可(不是很断定?)

这时辰须要我们加两个参数:./configure NOUVEAU_CFLAGS=disable NOUVEAU_LIBS=disable (反正我们只须要软件模仿)

从头configure,又呈现以下错误

configure: error: LLVM is required to build Gallium R300 on x86 and x86_64

sudo apt-get install llvm

总算经由过程了,太不轻易了!

8>.

configure: error: Package requirements (x11 xext xdamage xfixes x11-xcb xcb-glx >= 1.8.1 xcb-dri2 >= 1.8) were not met: 

No package 'xcb-glx' found

No package 'xcb-dri2' found 

sudo apt-get install libx11-xcb-dev libxcb-glx0 libxcb-glx0-dev

sudo apt-get install libxcb-dri2-0-dev 

9>.

sudo apt-add-repository ppa:xorg-edgers
sudo apt-get update  
sudo apt-get install libdrm-dev


10>.

xcb依赖

  • sudo apt-get install libx11-xcb-dev
  • sudo apt-get install libxcb-icccm4-dev (因为qtbase\config.tests\qpa\xcb中xcb/xcb_icccm.h)
  • sudo apt-get install libxcb-xfixes0-dev(因为qtbase\config.tests\qpa\xcb中xcb/xfixes.h)
  • sudo apt-get install libxcb-image0-dev(因为qtbase\config.tests\qpa\xcb中xcb/xcb_image.h)
  • sudo apt-get install libxcb-keysyms1-dev(因为qtbase\config.tests\qpa\xcb中xcb/xcb_keysyms.h)
  • sudo apt-get install libxcb-sync0-dev(因为qtbase\config.tests\qpa\xcb中xcb/sync.h)
  • sudo apt-get install libxcb-render-util0-dev(因为qtbase\config.tests\qpa\xcb中xcb/xcb_renderutil.h)

opengl依赖

  • sudo apt-get install libegl1-mesa-dev
  • sudo apt-get install libgles1-mesa-dev
  • sudo apt-get install libgles2-mesa-dev
11-> 
  sudo apt-get install autoconf
  
sudo apt-get install libtool

 ./configure ok
执行make and make install 安装到默认路径include,lib文件是 /usr/local/include和/usr/local/lib下

  步骤4:Configure OK, 然后单击Generate button,等待Projects生成完全。

7.至此,打开Code::Blocks IDE,导入刚才生成的工程文件:VTK.cbp。然后 就可以rebuild,等待半小时左右,就可以得到到lib。

编译build target:install后,会生成/usr/local/lib/vtk-5.10下 so 文件。

8.测试vtk是否安装完全成功:

在python2.7 IDE 上 输入import vtk,如果出现下面错误提示:

importError libvtkCommonPythonD.so.5.10:cannot open shared object file: No such file or directory

 需要在命令行窗口中执行如下命令去修复错误:

ldconfig /usr/local/lib/vtk-5.10

9. eclipse pydev 添加对vtk 的 fold path:/usr/local/lib/python2.7/dist-packages/vtk

现在 vtk 可以正常运行了。

原文地址:https://www.cnblogs.com/cnland/p/2861634.html