LSHKIT 安装笔记

基本介绍

项目主页:http://lshkit.sourceforge.net/

安装boost

boost主页:http://www.boost.org/

下载boost源码
https://sourceforge.net/projects/boost/files/boost/1.60.0/

解压,进入目录。

1
2
3
./bootstrap.sh
./b2
sudo ./b2 install

安装GSL(GNU Scientific Library)

下载地址: http://ftp.gnu.org/gnu/gsl/gsl-2.1.tar.gz

查看项目中的INSTALL文本文件可知:

1
2
3
4
5
./configure
make -j4
make check[optional]
sudo make install
sudo make installcheck[optional]

LSH安装

下载源代码:https://sourceforge.net/projects/lshkit/files/

  1. Copy the file lshkit\FindGSL.cmake to /share/cmake-xxx/Modules, where is where you install CMake, which is usually /usr.

  2. make a temporary building directory, change to it.

  3. Run “cmake LSHKIT_DIR”, where LSHKIT_DIR is the LSHKIT root directory. You can also use “cmake -DCMAKE_BUILD_TYPE=RELEASE LSHKIT_DIR” or “cmake -DCMAKE_BUILD_TYPE=DEBUG LSHKIT_DIR” to specify the build type.

  4. A makefile should have been generated. Run make.

  5. The making process will last for a while. After that, the LSHKIT library will be in the “lib” directory and the executables will be in the “bin” directory.

潜在的坑

编译过程中遇到一个问题

1
/home/*/lshkit/lshkit-0.2.1/tools/fitdata.cpp:57:17: error: ‘tr1’ is not a namespace-name

我的解决办法是直接将源码中使用tr1的那一行注释掉。

参考资料

[1] LSHKIT库学习记录