zoukankan      html  css  js  c++  java
  • 编译安装gimp插件之Mathmap(流水记录)

    本文为在Fedora 20下编译安装Mathmap1.3.5的编译过程,如果你仅仅需要快速的安装Mathmap,那么请拉至文末的“快速安装” 其实,过程还是很有趣的,充满Error,曲折,学会使用搜索才能解决遇到的种种问题,探索的过程是重要的,这也是本文流水式记录安装过程的原因,以前也编译过软件,但是失败的经历甚多,曾经由于不会的实在太多,导致编译gimp结果把桌面搞崩。本次安装过程仍是胡乱摸索,文末会有收获及总结。 如果你要在Ubuntu下编译Mathmap,你可能需要去看下面这个帖子 链接:http://tieba.baidu.com/p/2108398262 —————————————————————————————————————————

    安装依赖

      Mathmap的INSTALL文件说明,需要的依赖: * The GIMP 2.4 * GSL (GNU Scientific Library), including GSL CBLAS * fftw3 * libgtksourceview * libjpeg, libpng, libgif (preferred) or libungif * gettext /* 最开始认为只需安装提供的文件名即可,于是“yum search gsl”,真有这个软件包就直接安上了 */ (1)sudo yum install gsl (2)fftw3,使用C语言进行傅立叶变换 链接:http://www.fftw.org/download.html 压缩包双击打开,解压缩到一个文件夹中,终端进入,执行: [shell] cd fftw-3.3.4/ ./configure make sudo make install [/shell] 没有错误,继续 /* 开始时搜索的“libgtksourceview”没有结果,然后就去下载了源代码包 */ (3)安装gtksourceview 下载地址:http://ftp.acc.umu.se/pub/gnome/sources/gtksourceview/ 我下载的是最新的3.11 请求如下的包: [code] No package 'glib-2.0' found No package 'gio-2.0' found No package 'gtk+-3.0' found No package 'libxml-2.0' found [/code]   [shell] sudo yum install glib2-devel su -c 'yum install gtk3-devel' sudo yum install libxml2-devel [/shell] Requested 'gtk+-3.0 >= 3.11.0' but version of GTK+ is 3.10.6 进GTK官网一看,没有3.11的版本,但是这个软件竟然请求,没办法,重新下载的gtksourceview 3.10编译 成功! (4)安装intltool [code] ./configure: line 12598: intltool-update: command not found checking for intltool >= 0.40... found configure: error: Your intltool is too old. You need intltool 0.40 or later. [/code] 解决办法: [shell] sudo yum install intltool [/shell] /* 这个地方也纠结了好一会 */ (5)安装libjpeg,libpng,libgif /* 由于搜索"libgif"没有结果,所以没有安装 */ [shell] sudo yum install libjpeg-turbo sudo yum install libpng [/shell] —————————————————————————————————————————-

    编译Mathmap

      现在需要的环境基本上都OK了,开始编译Mathmap。现在进入mathmap的目录编译 没有configure文件,直接“make”,有必要说下,make出错,再解决完问题后,要先“make clean”以下,再重新运行“make”编译 1,提示没有“g++” Fedora下安装g++的命令是 [shell] sudo yum install gcc-c++ [/shell] 2,mathmap_common.c:40:18: 致命错误:glib.h:没有那个文件或目录 /* pygtk2-devel这个是网搜到的,但是安装后没有解决,在安装 gtksourceview2-devel后解决,不能确定pygtk2-devel是否有用,先在这里记录下,测试的同学先无视先 */ [shell] sudo yum install pygtk2-devel sudo yum install gtksourceview2-devel [/shell] 3,compiler.h:27:28: 致命错误:gsl/gsl_matrix.h:没有那个文件或目录 [shell] sudo yum install gsl-devel [/shell] 4,userval.h:30:26: 致命错误:libgimp/gimp.h:没有那个文件或目录 [shell] sudo yum install gimp-devel [/shell] 5,错误:提领指向不完全类型的指针 [code] In file included from /usr/include/pngconf.h:72:0, from /usr/include/png.h:445, from rwpng.c:28: rwpng.c: In function 'open_png_file_reading': rwpng.c:61:29: error: dereferencing pointer to incomplete type if (setjmp(data->png_ptr->jmpbuf)) ^ rwpng.c:68:28: error: dereferencing pointer to incomplete type *width = data->info_ptr->width; ^ rwpng.c:69:29: error: dereferencing pointer to incomplete type *height = data->info_ptr->height; ^ rwpng.c:71:23: error: dereferencing pointer to incomplete type if (data->info_ptr->bit_depth != 8 && data->info_ptr->bit_depth != 16) ^ rwpng.c:71:57: error: dereferencing pointer to incomplete type if (data->info_ptr->bit_depth != 8 && data->info_ptr->bit_depth != 16) ^ rwpng.c:78:23: error: dereferencing pointer to incomplete type if (data->info_ptr->color_type != PNG_COLOR_TYPE_RGB ^ rwpng.c:79:19: error: dereferencing pointer to incomplete type && data->info_ptr->color_type != PNG_COLOR_TYPE_RGB_ALPHA ^ ...... [/code] 上面的一堆错误,嗯...怎么说呢,搜索了半天,貌似是一个BUG... /* 在源中搜索的时候就发现libpng的结果如下,好多版本,而且前辈们似乎使用不同版本也没能解决问题 */ [code] libpng12.i686 : Old version of libpng, needed to run old binaries libpng10.i686 : Old version of libpng, needed to run old binaries libpng10.x86_64 : Old version of libpng, needed to run old binaries libpng10-devel.i686 : Development tools for version 1.0 of libpng libpng10-devel.x86_64 : Development tools for version 1.0 of libpng libpng12.x86_64 : Old version of libpng, needed to run old binaries libpng12-devel.i686 : Development files for libpng 1.2 libpng12-devel.x86_64 : Development files for libpng 1.2 libpng15.i686 : Old version of libpng, needed to run old binaries libpng15.x86_64 : Old version of libpng, needed to run old binaries ...... [/code] 请看相关问题的讨论: https://bugs.gentoo.org/show_bug.cgi?id=356625 (提示去github下载) https://groups.google.com/forum/#!msg/mathmap/Yl2UG2Lx12c/4GfLyXt7pzEJ (同样问题,无人回答) 在上面的网址提到了github可能更新了。于是重新到github下载 链接:https://github.com/schani/mathmap /* 这里由于知识匮乏导致获取出错,我直接点击网页Download下载的文件 */ 6,make: clisp: Command not found [shell] sudo yum install clisp [/shell] 7,No package 'fftw3' found [code] Package fftw3 was not found in the pkg-config search path. Perhaps you should add the directory containing `fftw3.pc' to the PKG_CONFIG_PATH environment variable No package 'fftw3' found Package fftw3 was not found in the pkg-config search path. Perhaps you should add the directory containing `fftw3.pc' to the PKG_CONFIG_PATH environment variable No package 'fftw3' found [/code] /* 明明安装了fftw3,为何找不到呢,根据上面的经验,搜索了下fftw,找到了fftw-devel */ [shell] sudo yum install fftw-devel [/shell] 8,A file with name lisp-utils/utils.lisp does not exist clisp builtins.lisp *** - LOAD: A file with name lisp-utils/utils.lisp does not exist make: *** [compiler_types.h] Error 1 同样的问题:https://groups.google.com/forum/#!msg/mathmap/KjULqZ76bfI/cXIiJvt1kHAJ 使用 [shell] git clone https://github.com/schani/mathmap.git mathmap [/shell] 获取mathmap 稍等以下会在你的当前目录下会出现一个mathmap的文件夹,cd进入,然后执行如下命令 [shell] git submodule init && git submodule update [/shell] 9,make: bison: Command not found [shell] sudo yum install bison [/shell] 10,rwjpeg.c:30:21: fatal error: jpeglib.h: No such file or directory [shell] sudo yum install libjpeg-turbo-devel [/shell] 11,rwgif.c:29:21: fatal error: gif_lib.h: No such file or directory /* 这里本打算去下载libgif的,不过偶然搜索到了giflib,一搜,果然有devel包 */ [shell] sudo yum install giflib-devel [/shell] 这样,GIMP插件Mathmap就安装完成了,暂时还用不好,不过没关系啦~先装上再说,哈哈 —————————————————————————————————————————-

    编译总结

      1,Fedora下安装软件XXX包会作为XXX-devel的依赖,所以安装时优先选择devel安装,可以避免很多问题 2,当软件所依赖的包太新,如果非必要安装最新版,可以尝试下载稍低版本以解决依赖问题 3,很多问题都是系统环境缺少包导致,如非必要,尽量不要去更改环境变量和设置 4,当报错的中文提示在度娘上找不到时,那么“export LANG=en_US”,看下英文的错误信息,丢到谷歌上试试 5,在源中找不到相应的软件包,尝试把你的搜索关键字去头去尾再搜索以下 6,最后,最重要的就是:安装软件之前先读“README”。也可省下你很多的时间 —————————————————————————————————————————-

    快速安装

      1,下载Mathmap 在终端下进入一个目录,比如Document 运行: [shell] sudo yum install git git clone https://github.com/schani/mathmap.git mathmap cd mathmap git submodule init && git submodule update [/shell] 2,安装依赖 如果你新安装的系统,那么安装下开发环境吧。 [shell] sudo yum groupinstall "Development Tools" sudo yum install gcc-c++ sudo yum install gimp-devel gsl-devel wget wget http://www.fftw.org/fftw-3.3.4.tar.gz tar -xzvf fftw-3.3.4..tar.gz cd fftw-3.3.4/ ./configure make sudo make install cd .. sudo yum install fftw-devel sudo yum install gtksourceview2-devel (如安装后出错请参考上面的安装过程,有说明) sudo yum install intltool gettext-devel sudo yum insatll libjpeg-turbo-devel libpng-devel giflib-devel sudo yum install clisp-devel bison-devel [/shell] 3,安装 [shell] make sudo make install [/shell] 打开方式,在GIMP中的“滤镜 - 常规 - Mathmap - mathmap” mathmap135
  • 相关阅读:
    Enterprise Library系列文章回顾与总结
    .NET设计模式系列文章
    从Google趋势看.NET下的Ajax框架
    Atlas学习手记(18):使用DragPanel实现拖放面板
    Atlas学习手记(2):全面了解ScriptManager
    .NET设计模式(17):命令模式(Command Pattern)
    Atlas学习手记(3):由UpdatePanel开始
    Atlas学习手记(16):使用PasswordStrength检测密码强度
    Atlas学习手记(17):使用FilteredTextBox过滤字符
    用Windows Live Writer在博客园发布Post
  • 原文地址:https://www.cnblogs.com/ishell/p/4240151.html
Copyright © 2011-2022 走看看