yael在CentOS6.5上的安装

简介

yael是一款用于图像检索的工具包,它实现了许多计算密集型的函数,比如聚类,最近邻算法,工具包在blas和LAPACK的基础上,向用户提供了C,Python和MATLAB的接口。它支持Fedora10、11,Ubuntu Karmic和Mac OS X,但不支持Windows(早期的版本似乎支持)。

安装

1.仔细阅读README

发现安装yael的先决条件有三个,(1)blas和lapack (2)Python (3)swig。第一个是必须的,后两个可以不安装,就是一个是否需要yael提供相应接口问题。

2.执行./configure.sh

执行这一步可以知道需要哪些依赖,得到如下结果:

#./configure.sh 
Found python development version 2.6
/usr/local/swig-3.0.7/bin/swig

# generated by ./configure.sh 

CFLAGS=-fPIC -Wall -g -O3 
LDFLAGS=-g -fPIC 

PYTHONCFLAGS = -I/usr/include/python2.6

YAELCONF=linux64
YAELCFLAGS=-I/root/Downloads/yael_v318
YAELLDFLAGS=-L/root/Downloads/yael_v318/yael -Wl,-rpath,/root/Downloads/yael_v318/yael -lyael


SWIG=swig -python

WRAPLDFLAGS=-shared
LAPACKLDFLAGS=/usr/lib64/atlas/libf77blas.so.3 /usr/lib64/atlas/liblapack.so.3
LAPACKCFLAGS=-DFINTEGER=int

USEARPACK=no
ARPACKLDFLAGS=/usr/lib64/libarpack.so.2

USETHREADS=yes
THREADCFLAGS=-DHAVE_THREADS

SHAREDEXT=so
SHAREDFLAGS=-shared
YAELSHAREDFLAGS=-shared

USENUMPY=
NUMPYCFLAGS=
NUMPYSWIGFLAGS=


USEOPENMP=yes

发现之前安装caffe已经装好了blas和lapack,这里不需要再安装了。

3.安装Python

#yum install python python-devel

4.安装swig

SWIG是一个能将C或者C++编写的程序与其它各种高级语言如Perl, Python, Ruby, 和 Tcl进行联接的开发工具。其原理是从C/C++头文件中找到申明并利用他们生成脚本语言访问C/C++代码所必须的封装代码。SWIG具有高度可自定义的特点,它能帮助你生成适合你的应用程序的封装包。参考swig中文网http://www.swig.org/translations/chinese/exec.html

a. 确保已安装了g++,gcc,命令是sudo yum install gcc gcc-c++
b. 安装pcre
# yum install pcre-devel
c. 下载swig源码http://sourceforge.net/projects/swig/files/swig/swig-3.0.7/swig-3.0.7.tar.gz/download?use_mirror=superb-dca2
d. tar xvf swig-3.0.7.tar.gz && cd swig-3.0.7
e. #./configure --prefix=/usr/local/swig-3.0.7
这个过程中会检查安装swig的先决条件,我的输出如下:

# ./configure --prefix=/usr/local/swig-3.0.7
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking maximum warning verbosity option... -Wall -W -ansi -pedantic for C++ -Wall -W -ansi -pedantic for C
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for bool... yes
checking for popen... yes
checking whether to enable PCRE support... yes
checking whether to use local PCRE... no
checking for a sed that does not truncate output... /bin/sed
checking for pcre-config... /usr/bin/pcre-config
checking whether to enable ccache-swig... yes

Checking packages required for SWIG developers.
Note : None of the following packages are required for users to compile and install SWIG from the distributed tarball

checking for bison... bison -y
checking for ranlib... ranlib
checking for ar... ar
checking for yodl2man... no
checking for yodl2html... no

Checking for installed target languages and other information in order to compile and run
the examples and test-suite invoked by 'make check'.
Note : None of the following packages are required for users to compile and install SWIG from the distributed tarball

checking for boostlib >= 1.20.0... yes
configure: ISYSTEM: -isystem 
checking SO... .so
checking LDSHARED... gcc -shared
checking CXXSHARED... gcc -shared
checking TRYLINKINGWITHCXX... CXXSHARED= g++ -shared 
checking CCSHARED... -fpic
checking RPATH... -Xlinker -rpath $(exec_prefix)/lib -Xlinker -rpath .
checking LINKFORSHARED... -Xlinker -export-dynamic
checking PLATCFLAGS... 
checking whether to enable C++11 testing... no
checking for dlopen in -ldl... yes
checking for shl_load in -ldld... no
checking for library containing t_open... no
checking for library containing gethostbyname... none required
checking for library containing socket... none required
checking for swill_init in -lswill... no
checking for main in -lieee... yes
checking for crypt in -lcrypt... yes
checking for pkg-config... pkg-config
checking for Tcl configuration... no
checking for Tcl header files... not found
checking for Tcl library... not found
checking for python... python
checking for python major version number... 2
checking for Python prefix... /root/anaconda2
checking for Python exec-prefix... /root/anaconda2
checking for Python os.name... posix
checking for Python version... python2.7
checking for Python lib dir... lib
checking for Python header files... -I/root/anaconda2/include/python2.7 -I/root/anaconda2/lib/python2.7/config
checking for Python library directory... /root/anaconda2/lib/python2.7/config
checking for Python library... -lpython2.7
checking for python3... no
checking for python3.9... no
checking for python3.8... no
checking for python3.7... no
checking for python3.6... no
checking for python3.5... no
checking for python3.4... no
checking for python3.3... no
checking for python3.2... no
checking for python3.1... no
checking for python3.0... no
checking for python... python
checking for python-config... python-config
checking for python major version number... 2
checking for pep8... pep8
checking for perl... perl
checking for Perl5 header files... /usr/lib64/perl5/CORE
checking for Perl5 library... perl
checking for Perl5 ccflags... -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -fstack-protector -isystem /usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
checking for Perl5 ccdlflags... -Wl,-E -Wl,-rpath,/usr/lib64/perl5/CORE
checking for Perl5 cccdlflags... -fPIC
checking for Perl5 ldflags...  -fstack-protector
checking for Perl5 Test::More module... found
checking for octave... no
checking for scilab... no
checking for java JDK... no (JAVA_HOME is not defined)
checking for java... java
checking for javac... no
checking for java include file jni.h... not found
checking for node... no
checking for JavaScriptCore/JavaScript.h... not found
checking for JavaScriptCore/Webkit library... not found
checking for V8 Javascript v8.h... not found
checking for V8 Javascript library... not found
checking for gcj... no
checking for gcjh... no
checking for android... no
checking for adb... no
checking for ant... no
checking for ndk-build... no
checking for guile-config... no
checking for mzscheme... no
checking for mzc... no
checking for ruby... no
checking for Ruby header files... could not figure out how to run ruby
checking for php5... no
checking for php... no
checking for PHP header files... found PHP , but only PHP 5 is supported
checking for Ocaml DL load generator... checking for ocamldlgen... no
checking for Ocaml package tool... checking for ocamlfind... no
checking for Ocaml compiler... checking for ocamlc... no
checking for Ocaml toplevel creator... checking for ocamlmktop... no
checking for Ocaml Pre-Processor-Pretty-Printer... checking for camlp4... no
checking for pike... no
checking for pike7.8... no
checking for pike7.6... no
checking for pike7.4... no
checking for pike7.2... no
checking for chicken... no
checking for csc... no
checking for csi... no
checking for mono-csc... no
checking for gmcs... no
checking for mcs... no
checking for cscc... no
checking for lua5.2... no
checking for lua5.1... no
checking for lua... /usr/bin/lua
checking Lua version... Lua 5.1 or later
checking whether Lua dynamic loading is enabled... yes
checking lua.h usability... no
checking lua.h presence... no
checking for lua.h... no
checking for lua.h in other locations... not found
checking for library containing lua_close... no
checking for alisp... no
checking for clisp... no
checking for R... no
checking for go... no
checking for gccgo... no
checking for dmd... no
checking for ldmd... no
checking for gdmd... no
checking for dmd... no
checking for gdmd... no
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating swig.spec
config.status: creating Examples/Makefile
config.status: creating Examples/d/example.mk
config.status: creating Examples/xml/Makefile
config.status: creating Examples/test-suite/errors/Makefile
config.status: creating Examples/test-suite/chicken/Makefile
config.status: creating Examples/test-suite/csharp/Makefile
config.status: creating Examples/test-suite/d/Makefile
config.status: creating Examples/test-suite/guile/Makefile
config.status: creating Examples/test-suite/java/Makefile
config.status: creating Examples/test-suite/javascript/Makefile
config.status: creating Examples/test-suite/mzscheme/Makefile
config.status: creating Examples/test-suite/ocaml/Makefile
config.status: creating Examples/test-suite/octave/Makefile
config.status: creating Examples/test-suite/perl5/Makefile
config.status: creating Examples/test-suite/php/Makefile
config.status: creating Examples/test-suite/pike/Makefile
config.status: creating Examples/test-suite/python/Makefile
config.status: creating Examples/test-suite/ruby/Makefile
config.status: creating Examples/test-suite/scilab/Makefile
config.status: creating Examples/test-suite/tcl/Makefile
config.status: creating Examples/test-suite/lua/Makefile
config.status: creating Examples/test-suite/allegrocl/Makefile
config.status: creating Examples/test-suite/clisp/Makefile
config.status: creating Examples/test-suite/cffi/Makefile
config.status: creating Examples/test-suite/uffi/Makefile
config.status: creating Examples/test-suite/r/Makefile
config.status: creating Examples/test-suite/go/Makefile
config.status: creating Source/Makefile
config.status: creating Tools/javascript/Makefile
config.status: creating preinst-swig
config.status: creating CCache/ccache_swig_config.h
config.status: creating Source/Include/swigconfig.h
config.status: executing depfiles commands
config.status: executing Examples commands
=== configuring in CCache (/root/Downloads/swig-3.0.7/CCache)
configure: running /bin/sh ./configure --disable-option-checking '--prefix=/usr/local/swig-3.0.7'  --cache-file=/dev/null --srcdir=.
configure: Configuring ccache
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc -E
checking for a BSD-compatible install... /usr/bin/install -c
checking for dirent.h that defines DIR... yes
checking for library containing opendir... none required
checking whether time.h and sys/time.h may both be included... yes
checking for sys/wait.h that is POSIX.1 compatible... yes
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking ctype.h usability... yes
checking ctype.h presence... yes
checking for ctype.h... yes
checking for strings.h... (cached) yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking pwd.h usability... yes
checking pwd.h presence... yes
checking for pwd.h... yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking for realpath... yes
checking for snprintf... yes
checking for vsnprintf... yes
checking for vasprintf... yes
checking for asprintf... yes
checking for mkstemp... yes
checking for gethostname... yes
checking for getpwuid... yes
checking for utimes... yes
checking for compar_fn_t in stdlib.h... yes
checking for C99 vsnprintf... yes
checking zlib.h usability... yes
checking zlib.h presence... yes
checking for zlib.h... yes
checking for gzdopen in -lz... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating config.h

The SWIG test-suite and examples are configured for the following languages:
perl5 python 

f.编译安装 make -j16 &&make install

5.安装MATLAB

参考:http://blog.csdn.net/CHIERYU/article/details/50311637

6.编译yael

#make
#cd matlab && make
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值