2010-03-10 20:54:28| 分类: linux&shell | 标签: |举报 |字号大中小 订阅
graphviz安装手记 |
http://ultrajava.blogcn.com/diary,117968751.shtml 我的机子是64位机,系统是RHEL5.4,按上面这位老兄的安装 办法 ,搞了一下午,也没有安装 上。 然后在这http://old.nabble.com/install-in-unix-problem-td27801907.html,看一篇文章修改了一下,可以了。 我的配置是这样的: Graphviz-2.26.3安装 ./configure CC=/usr/bin/gcc PKG_CONFIG=/opt/pkg-config-0.23/bin/pkg-config --prefix=/opt/graphviz-2.26.3/ --enable-swig=no --with-tcl=/opt/tcl-8.5a.3/bin/tclsh8.5 --with-expatincludedir=/opt/expat-2.0.1/include --with-gts=no --with-extralibdir=/usr/lib64 --with-expatlibdir=/usr/lib64 --with-zincludedir=/opt/zlib-1.2.3/include --with-zlibdir=/opt/zlib-1.2.3/lib --with-mylibgd --with-gdincludedir=/opt/gd-2.0.35/include --with-gdlibdir=/opt/gd-2.0.35/lib --with-iconvincludedir=/opt/libiconv-1.13.1/include --with-iconvlibdir=/opt/libiconv-1.13.1/lib --with-libiconv-prefix=/opt/libiconv-1.13.1 --with-freetype=/opt/freetype-2.3.12/lib --with-pngincludedir=/opt/libpng-1.2.39/include --with-pnglibdir=/opt/libpng-1.2.39/lib --with-jpegincludedir=/opt/jpeg-8a/include --with-jpeglibdir=/opt/jpeg-8a/lib (这样加了如下几个配置:--with-gts=no --with-extralibdir=/usr/lib64 --with-expatlibdir=/usr/lib64) 另外,下面的有些我没有安装上,请高人指点,留言。 先安装 pkg-config pixman cario glib libpng 然后安装pango 安装 pkg-config ./configure CC=/usr/bin/gcc --prefix=/opt/pkg-config-0.23/ 安装 pixman ./configure CC=/usr/bin/gcc --prefix=/opt/pixman-0.15.20/ 安装cairo (没有安装上,请高人指点) ./configure CC=/usr/bin/gcc PKG_CONFIG=/opt/pkg-config-0.23/bin/pkg-config pixman_CFLAGS=/usr/bin/gcc pixman_LIBS=/opt/pixman-0.15.20/lib/pkgconfig/ png_CFLAGS=/usr/bin/gcc png_LIBS=/opt/libpng-1.2.39/lib/--prefix=/opt/cairo-1.8.6/ 安装 pango(没有安装上,请高人指点) ./configure CC=/usr/bin/gcc GLIB_CFLAGS=CC=/usr/bin/gcc GLIB_LIBS=/opt/glib-2.22.0/lib --prefix=/opt/pango/pango-1.26.0 gmake gmake install 上面老兄的原文如下: 首先按照http://www.graphviz.org/doc/build.html这个上面所列的文件,下载到本地$HOME/graphviz下,一一解压缩。 安装须知:首先每个软件都有自己的特性,这个时候需要运行它特有的configure --help来查看它的安装特性,然后设置相关参数。 安 装心得:由于版本和系统问题,unix下安装软件或多或少的都会出些问题,本次是从源代码安装的,所以需要察看Makefile文件确认是否有出入;需要 认真阅读软件下的readme或者INSTALL文件;需要留意./configure 命令出来的警告和错误;必要的时候需要修改makefile甚至 代码;找不到某个文件的时候要特别留意环境变量。 安装步骤: 编译jpeg-6b ./configure --enable-static --prefix=$HOME/graphviz --exec-prefix=$HOME/graphviz gmake gmake install gmake install-lib gmake install-headers 此步骤几乎不会出问题,记得吧lib和header安装到自己所需目录下 编译libiconv-1.8 ./configure --enable-static=yes --prefix=$HOME/graphviz gmake gmake install 此步骤也比较顺利 编译zlib-1.2.3 ./configure --prefix=$HOME/graphviz --exec-prefix=$HOME/graphviz gmake gmake install 安装这个之前需要首先阅读libpng-1.2.5下的INSTALL,里面有具体要求 编译libpng-1.2.5 修改makefile gmake gmake install 编译freetype-2.1.3 gmake gmake install DESTDIR=$HOME/graphviz/ 这个有点怪,把文件安装到指定目录下的usr/local里了,还得挪出来,具体应该修改哪个文件就可以直接安装到指定目录我没仔细看 编译expat-1.95.5 ./configure --enable-static --prefix=$HOME/graphviz gmake gmake install 比较顺利的步骤,xml解析必备 编译gettext-0.11.5 ./configure --enable- static --prefix=$HOME/graphviz --with-libiconv-prefix=$HOME /graphviz --with-libexpat-prefix=$HOME/graphviz gmake gmake install 这个地方一定要指定expat路径! 编译tcl8.3.5 cd unix ./configure --enable-64bit=yes --enable-shared=no --prefix=$HOME/graphviz gmake gmake install graphviz所需要的脚本工具,具体设定见graphviz安装。 编译libtool-1.5.22 ./configure --prefix=$HOME/graphviz gmake gmake install 比较顺利。 编译gd-2.0.28 ./configure --prefix=$HOME /graphviz --with-libiconv-prefix=$HOME/graphviz --with-png=$HOME /graphviz --with-freetype=$HOME/graphviz --with-jpeg=$HOME/graphviz gmake gmake install 这里一定要注意./configure 执行中的输出信息,我最终看到的是它找到了jpeg所需要的所有信息,而没有找到png的lib库所以我最终的生成工具不支持png格式,至于为什么没有找到png,我没有去深究。 中间除了点问题,连接的时候有两个方法找不到实现,我修改了./configure 命令生成的Makefile文件。 编译graphviz-2.12 ./configure --enable- shared=no --prefix=$HOME/graphviz --with-tclsh=$HOME/graphviz/bin /tclsh8.3 --with-expatincludedir=$HOME/graphviz/include --with- expatlibdir=$HOME/graphviz/lib --with-zincludedir=$HOME/graphviz /include --with-zlibdir=$HOME/graphviz/lib --with-mylibgd --with- gdincludedir=$HOME/graphviz/include --with-gdlibdir=$HOME/graphviz /lib --with-iconvincludedir=$HOME/graphviz/include --with- iconvlibdir=$HOME/graphviz/lib --with-libiconv-prefix=$HOME /graphviz --with-freetype=$HOME/graphviz --with-pngincludedir=$HOME /graphviz/include --with-pnglibdir=$HOME/graphviz/lib --with- jpegincludedir=$HOME/graphviz/include --with-jpeglibdir=$HOME/graphviz /lib gmake gmake install 必须设置相应的参数,这里一定要用./configure --help看清楚。如果安装gd-2.0.28没有修改Makefile,这里也会报函数没有找到的错误,我不知道是否是我单独遇到的。 |
评论