linux下vtk安装配置
(2012-06-12 15:52:45)
标签:
杂谈 |
分类: 图像处理(C ) |
一直想在linux下跑vtk,实现三维重建,拖到昨天晚上才开始。
Data:vtkdata-5.10.0.tar.gz;
Documentation:vtkDocHtml-5.10.0.tar.gz。
BUILD_SHARED_LIBS
OFF
BUILD_TESTING
OFF
CMAKE_BACKWARDS_COMPATIBILITY
2.4
CMAKE_BUILD_TYPE
Debug
CMAKE_INSTALL_PREFIX
/usr/local/inlude
SIP_EXECUTABLE
SIP_EXECUTABLE-NOTFOUND
SIP_INCLUDE_DIR
SIP_INCLUDE_DIR-NOTFOUND
VTK_DATA_ROOT
/usr/local/src/vtk/VTKData
VTK_EXTRA_COMPILER_WARNINGS
OFF
VTK_LARGE_DATA_ROOT
VTK_LARGE_DATA_ROOT-NOTFOUND
VTK_USE_CHARTS
ON
VTK_USE_CHEMISTRY
OFF
VTK_USE_GEOVIS
ON
VTK_USE_INFOVIS
ON
VTK_USE_N_WAY_ARRAYS
ON
VTK_USE_PARALLEL
ON
VTK_USE_QT
OFF
VTK_USE_RENDERING
ON
VTK_USE_TEXT_ANALYSIS
OFF
VTK_USE_VIEWS
ON
VTK_WRAP_JAVA
OFF
VTK_WRAP_PYTHON
OFF
VTK_WRAP_PYTHON_SIP
OFF
VTK_WRAP_TCL
OFF
file STRINGS file
"/usr/local/src/vtk/VTK/Rendering/OPENGL_INCLUDE_DIR-NOTFOUND/GL/glx.h"
cannot be read.
Call Stack (most recent call first):
Rendering/CMakeLists.txt:508 (INCLUDE)
to NOTFOUND.
Please set them or make sure they are set
and tested correctly in the CMake
files:
OPENGL_INCLUDE_DIR (ADVANCED)
used as include
directory in directory /usr/local/src/vtk/VTK/Utilities/kwsys
used as include
directory in directory
/usr/local/src/vtk/VTK/Utilities/vtkzlib
used as include
directory in directory
废话少说。上文:
http://ubuntuforums.org/showthread.php?t=1561592(参照3,解决小bug)
1、官网(http://cmake.org/cmake/resources/software.html)下载cmake-2.8.8.tar.gz,解压到
/usr/local/src/目录下,解压过程会自动创建cmake-2.8.8目录。
2、官网(http://vtk.org/VTK/resources/software.html#latest)下载最新版的source:vtk-.10.0.tar.gz;
3、在 /usr/local/src/ 下创建目录 vtk,用于存放vtk源码及数据及文档。将vtk-.10.0.tar.gz,vtkdata-5.10.0.tar.gz和vtkDocHtml-5.10.0.tar.gz解压到
vtk 目录下,解压过程中分别自动创建VTK,VTKData 和 html 目录。在vtk
下新建bin目录,作为vtk编译目录。
4、进入/usr/local/src/vtk/bin 目录,键入命令“sudo ccmake
/usr/local/src/vtk/VTK”。呈现在眼前的是一些cmake的配置选项。注意:
BUILD_EXAMPLES
OFF
参照上述网址进行设置。
键入“c”进行配置,本人弹出错误:
CMake Error at CMake/vtkTestGLX.cmake:212 (file):
CMake Error: The following variables are used in this project,
but they are set
转向提及设置OpenGL的参照二。
5、网站( http://www.mesa3d.org)下载MesaLib-8.0.3.tar.gz
,MesaGLUT-7.9.2.tar.gz以及mesa-demos-8.0.1.tar.gz,均存放于/usr/local/src目录下。解压LIB文件,自动创建目录Mesa-8.0.3。进入此目录,敲入“make”-->"sudo
make linux-x86",报错:
makedepend -fdepend -I. -I../../../../src/gallium/include
-I../../../../src/gallium/auxiliary
-I../../../../src/gallium/drivers rbug_core.c
rbug_context.c rbug_objects.c rbug_screen.c
2> /dev/null
make[5]: *** No rule to make target `depend', needed by
`default'. Stop.
make[5]: Leaving directory
`/usr/local/src/Mesa-8.0.3/src/gallium/drivers/rbug'
make[4]: *** [default] Error 1
make[4]: Leaving directory
`/usr/local/src/Mesa-8.0.3/src/gallium/drivers'
make[3]: *** [default] Error 1
make[3]: Leaving directory
`/usr/local/src/Mesa-8.0.3/src/gallium'
make[2]: *** [subdirs] Error 1
make[2]: Leaving directory
`/usr/local/src/Mesa-8.0.3/src'
make[1]: *** [default] Error 1
make[1]: Leaving directory `/usr/local/src/Mesa-8.0.3'
make: *** [linux-x86] Error 2
网上搜索错误原因,http://ubuntuforums.org/showthread.php?t=1561592给出提示:“sudo
apt-get install xorg-dev”安装xorg-dev后再执行“sudo make
linux-x86”,仍出错。上网搜索(http://www.mesa3d.org/install.html),执行“sudo
./configure”,提示错误“configure: error: makedepend is required to build
Mesa”。搜索(http://www.linuxquestions.org/questions/linux-software-2/configure-error-makedepend-is-required-to-build-mesa-883481/),执行“sudo
apt-get install xutils-dev”(/usr/bin/makedepend
is provided by xutils-dev ,sudo
apt-get install xutils-dev),再试“sudo
./configure”,提示错误“configure: error: flex is needed to build
Mesa”。搜索(http://johnsonchou.blogspot.jp/2009/02/ubuntu-flex-bison.html),执行“sudo
apt-get install flex bison”,再试“sudo ./configure”,提示错误“error: Direct
rendering requires libdrm >= 2.4.24”。执行“sudo apt-get
install libdrm-dev”,再试"sudo ./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
Consider adjusting the PKG_CONFIG_PATH environment variable if
you
installed software in a non-standard prefix.
Alternatively, you may set the environment variables
DRIGL_CFLAGS
and DRIGL_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
”。搜索(http://freebsd.1045724.n5.nabble.com/testing-rnoland-s-xorg-upgrade-patch-error-td4076678.html),执行“sudo
apt-get install xcb”,安装成功无错误提示后,执行“sudo ./configure”,仍有错误。执行“sudo
apt-get install libx11-xcb-dev”,"sudo apt-get install
libxcb-glx0","sudo apt-get install libxcb-glx0-dev",提示错误:
"checking for expat.h... yes
checking for XML_ParserCreate in -lexpat... yes
checking for INTEL... no
configure: error: Package requirements (libdrm_intel
>= 2.4.30) were not met:
Requested 'libdrm_intel >= 2.4.30' but version
of libdrm is 2.4.26
Consider adjusting the PKG_CONFIG_PATH environment variable if
you
installed software in a non-standard prefix.
Alternatively, you may set the environment variables
INTEL_CFLAGS
and INTEL_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
"
前一篇:VTK 面绘制
后一篇:django如何处理请求