本文为在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”

编译安装gimp插件之Mathmap(流水记录)的更多相关文章

  1. Ubuntu13.04 Eclipse下编译安装Hadoop插件及使用小例

    Ubuntu13.04 Eclipse下编译安装Hadoop插件及使用小例 一.在Eclipse下编译安装Hadoop插件 Hadoop的Eclipse插件现在已经没有二进制版直接提供,只能自己编译. ...

  2. CentOS7 编译安装nodejs,配置环境变量记录

    每次都装,每次都查 阿里云备案了一个域名,续费了好多年,但是没钱买服务器,就挂在github上.今天收到消息:域名解析服务器不在阿里云,要被GG.只能咬牙买了个阿里云乞丐版. 所有服务都装好了,pin ...

  3. vim的编译安装及其插件YouCompleteMe安装

    相关的环境: win 7 x64 vs2013 community python 2.7.10 AMD64 python 3.5 AMD64 LLVM 3.5 cmake 3.5   YouCompl ...

  4. 不要着急改代码,先想想--centos 6.8下编译安装tmux

    诸位读者新年好,2017开年第一篇博客,请允许我先问候一下看到这篇博客的诸位.写博客是我2017年定下的目标之一,希望我会坚持下去. 最近打算尝试一下tmux这个神器,于是有了这一篇关于思维方式的Bl ...

  5. Ubuntu 20.04下源码编译安装ROS 2 Foxy Fitzroy

    ROS 2 Foxy Fitzroy(以下简称Foxy)于2020年6月5日正式发布了,是LTS版本,支持到2023年5月.本文主要根据官方的编译安装教程[1]完成,并记录编译过程中遇到的问题. 1. ...

  6. linux下编译安装vim7.4并安装clang_complete插件

    linux下编译安装vim7.4并安装clang_complete插件 因为debian里软件仓库中下载安装的vim是不支持python写的插件的(可以打开vim,在命令模式先输入:py测试一下),导 ...

  7. linux-i386(ubuntu)下编译安装gsoap_2.8.17过程记录

    过程记录 :  1.下载gsoap_2.8.17.zip 并 解压 : $unzip gsoap_2.8.17.zip     2.进入解压后的目录gsoap-2.8   3.自动配置编译环境:  $ ...

  8. Red Gate系列之五 .NET Reflector 7.6.1.824 Edition .NET程序反编译神器(附插件安装教程2012-10-13更新) 完全破解+使用教程

    原文:Red Gate系列之五 .NET Reflector 7.6.1.824 Edition .NET程序反编译神器(附插件安装教程2012-10-13更新) 完全破解+使用教程 Red Gate ...

  9. 在CentOS6上编译安装实现LAMP(php-modules)+phpMyAdmin安装过程全记录

    php与apache协作有三种模式:CGI.modules.FastCGI. 在CGI模式下,用户请求php文件时,apache会启动响应进程,调用php处理器处理请求,然后将结果返回给客户端.用户响 ...

随机推荐

  1. Tempdb怎么会成为性能瓶颈

    原文:Tempdb怎么会成为性能瓶颈 转自:http://blogs.msdn.com/b/apgcdsd/archive/2011/01/25/tempdb.aspx 我曾经遇到过这样一个性能问题. ...

  2. USACO maze1 BFS

    不写了很长的时间bfs该,很长一段时间的中间失误,当延期一次延伸成功的新节点的节点应该被标记为参观.否则,在某些情况下无限期延长队列. 输入一个小坑爹处理称号,能够进来当字符串被读取.然后用周围的墙上 ...

  3. nmap 使用注意事项

    1.可行的网络主机的高速发现 nmap -sP 192.168.1.*  要么 nmap -sP 192.168.1.-254 2.扫描UDPport DP扫描方式用于推断UDPport的情况. 向目 ...

  4. UVA 193 Graph Coloring 图染色 DFS 数据

    题意:图上的点染色,给出的边的两个点不能都染成黑色,问最多可以染多少黑色. 很水的一题,用dfs回溯即可.先判断和当前点相连的点是否染成黑色,看这一点是否能染黑色,能染色就分染成黑色和白色两种情况递归 ...

  5. Android学习路线(十一)管理Activity的生命周期

    当一个用户进入.退出,再次进入你的应用时,你的应用中的Activity 会在它的生命周期的各个状态下切换. 比如,当你的activity第一次启动.它出如今系统的前方接受用户的焦点.在这个过程中,An ...

  6. ajaxfileupload.js插件结合一般处理文件实现Ajax无刷新上传

    先上几张图更直观展示一下要实现的功能.本功能主要通过Jquery ajaxfileupload.js插件结合ajaxUpFile.ashx一般应用程序处理文件实现Ajax无刷新上传功能,结合NPOI2 ...

  7. (大数据工程师学习路径)第一步 Linux 基础入门----命令执行顺序控制与管道

    介绍 顺序执行.选择执行.管道.cut 命令.grep 命令.wc 命令.sort 命令等,高效率使用 Linux 的技巧. 一.命令执行顺序的控制 1.顺序执行多条命令 通常情况下,我们每次只能在终 ...

  8. Is it always safe to call getClass() within the subclass constructor?(转)

    14down votefavorite   An article on classloading states that the method getClass() should not be cal ...

  9. ios正在使用NSDateComponents、NSDate、NSCalendar它的结论是在当前时间是在一段时间在一天。

    一般应用程序设置这一组的存在,比如夜间模式,如果你.从8:00-23:00.在这个当前的时间是如何推断出期间.主要的困难在于如何使用NSDate生成8:00时间和23:00时间.然后用当前时间,也许有 ...

  10. 一些有用的javascript实例分析(三)

    原文:一些有用的javascript实例分析(三) 10 输入两个数字,比较大小 window.onload = function () { var aInput = document.getElem ...