rnnlib,一个多年不更新的rnn库,编译的过程有点麻烦,好多东西要选特定版本的。这里记录一下我的配置脚本,在ubuntu14.04下测试ok。

P.S fedora下好像不能直接用包管理来安装指定版本的gcc/g++,这一点上ubuntu还是很人性化的。

##################################################
# Filename: install.sh
# Description: a script for instaling rnnlib on ubuntu14.04
# Author: ChrisZZ
# E-mail: zchrissirhcz@163.com
# Created Time: 2015年08月14日 星期五 21时20分41秒
##################################################
#!/bin/bash #change directory to your workspace
cd $HOME
mkdir -p workspace
cd workspace #config gcc with version 4.4
sudo apt-get install -y vim git
sudo apt-get install -y gcc
sudo apt-get install -y g++
sudo apt-get install -y gcc-4.4
sudo apt-get install -y g++-4.4
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.4 50
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.4 50 #get the source code of netcdf-c and netcdf-c++, then compile and install them with specified parameters.
wget 218.244.143.208/rnnlib/install_rnnlib/netcdf-4.3.3.1.tar.gz
wget 218.244.143.208/rnnlib/install_rnnlib/netcdf-cxx4-4.2.1.tar.gz
tar -zxvf netcdf-4.3.3.1.tar.gz
tar -zxvf netcdf-cxx4-4.2.1.tar.gz
cd netcdf-4.3.3.1
./configure --disable-dap --disable-netcdf-4
make
sudo make install
cd ..
cd netcdf-cxx4-4.2.1
CPPFLAGS=-I/home/`whoami`/workspace/netcdf-4.3.3.1/include ./configure
CPPFLAGS=-I/home/`whoami`/workspace/netcdf-4.3.3.1/include LDFLAGS=-L/usr/local/netcdf/lib make
sudo make install
cd .. #get rnnlib and boost1.46 source code. compile rnnlib with specified boost source directory
wget 218.244.143.208/rnnlib/install_rnnlib/boost_1_46_0.tar.gz
wget 218.244.143.208/rnnlib/install_rnnlib/rnnlib.tar.gz
tar -zxvf boost_1_46_0.tar.gz
tar -zxvf rnnlib.tar.gz
cd rnnlib_source_forge_version sudo apt-get install -y python-netcdf
sudo apt-get install -y libnetcdf-dev
sudo apt-get install -y automake
sed -i '344 s/size/difference/' src/Helpers.hpp
CXXFLAGS=-I/home/`whoami`/workspace/boost_1_46_0 ./configure
make
sudo make install #cp necessary helper file to example directory
cp utils/netcdf_helpers.py examples/arabic_offline_handwriting
cp utils/netcdf_helpers.py examples/arabic_online_handwriting
cp utils/netcdf_helpers.py examples/farsi_offline_handwriting

编译rnnlib的更多相关文章

  1. TODO:macOS编译PHP7.1

    TODO:macOS编译PHP7.1 本文主要介绍在macOS上编译PHP7.1,有兴趣的朋友可以去尝试一下. 1.下载PHP7.1源码,建议到PHP官网下载纯净到源码包php-7.1.0.tar.g ...

  2. Centos6.5下编译安装mysql 5.6

    一:卸载旧版本 使用下面的命令检查是否安装有MySQL Server rpm -qa | grep mysql 有的话通过下面的命令来卸载掉 rpm -e mysql //普通删除模式 rpm -e ...

  3. CENTOS 6.5 平台离线编译安装 PHP5.6.6

    一.下载php源码包 http://cn2.php.net/get/php-5.6.6.tar.gz/from/this/mirror 二.编译 编译之前可能会缺少一些必要的依赖包,加载一个本地yum ...

  4. CENTOS 6.5 平台离线编译安装 Mysql5.6.22

    一.下载源码包 http://cdn.mysql.com/archives/mysql-5.6/mysql-5.6.22.tar.gz 二.准备工作 卸载之前本机自带的MYSQL 安装 cmake,编 ...

  5. Android注解使用之注解编译android-apt如何切换到annotationProcessor

    前言: 自从EventBus 3.x发布之后其通过注解预编译的方式解决了之前通过反射机制所引起的性能效率问题,其中注解预编译所采用的的就是android-apt的方式,不过最近Apt工具的作者宣布了不 ...

  6. Hawk 6. 编译和扩展开发

    Hawk是开源项目,因此任何人都可以为其贡献代码.作者也非常欢迎使用者能够扩展出更有用的插件. 编译 编译需要Visual Stuido,版本建议使用2015, 2010及以上没有经过测试,但应该可以 ...

  7. android studio 使用 jni 编译 opencv 完整实例 之 图像边缘检测!从此在andrid中自由使用 图像匹配、识别、检测

    目录: 1,过程感慨: 2,运行环境: 3,准备工作: 4,编译 .so 5,遇到的关键问题及其解决方法 6,实现效果截图. (原创:转载声明出处:http://www.cnblogs.com/lin ...

  8. 在Windows上编译和调试CoreCLR

    生成CoreCLR - Windows篇 本文的唯一目的就是让你运行Hello World 运行环境 Window 7+ Visual studio 2015 确保C++ 工具已经被安装,默认是不安装 ...

  9. 【踩坑速记】二次依赖?android studio编译运行各种踩坑解决方案,杜绝弯路,总有你想要的~

    这篇博客,只是把自己在开发中经常遇到的打包编译问题以及解决方案给大家稍微分享一下,不求吸睛,但求有用. 1.大家都知道我们常常会遇到dex超出方法数的问题,所以很多人都会采用android.suppo ...

随机推荐

  1. 二维背包(钟神想要的)(不是DP)

    [问题描述] 背包是个好东西,希望我也有.给你一个二维的背包,它的体积是? × ?.现在你有一些大小为1× 2和1×3的物品,每个物品有自己的价值.你希望往背包里面装一些物品,使得它们的价值和最大,问 ...

  2. java 19 -14 File类的判断并输出案例

    package zl_file; import java.io.File; import java.io.FilenameFilter; /* 需求: 判断E盘目录下是否有后缀名为.jpg的文件,如果 ...

  3. 详解反射->Type.System

    反射先了解 一:system.Type 获取基本信息: Type.Name   //类名 Type.FullName //完整路径 Type.Namespace //空间名 public class ...

  4. a标签中有点击事件

    我们常用的在a标签中有点击事件:1. a href="javascript:js_method();" 这是我们平台上常用的方法,但是这种方法在传递this等参数的时候很容易出问题 ...

  5. intellij IDEA15 设置背景颜色

    File--> Settings 2. Appearance & Behavior --> Appearance 设置边框背景颜色 3. Editor --> Colors ...

  6. Silverlight 利用DataGrid行加载事件动态控制行列显示

    datagrid的绑定很好用,但有时候我们往往需要根据model内容来动态控制行或者列,该怎么办呢? 这时候,我们就需要用到行加载事件:在加载每一行数据的时候,根据数据的内容来控制相应的表格显示. 比 ...

  7. [Bug]redis问题解决(MISCONF Redis is configured to save RDB snapshots)

    redis问题解决(MISCONF Redis is configured to save RDB snapshots)   (error) MISCONF Redis is configured t ...

  8. C#字符格式化占位符

    using System; using System.Diagnostics; using System.Text; using System.Collections; using System.Co ...

  9. XPath 详解,总结

    XPath简介 XPath是W3C的一个标准.它最主要的目的是为了在XML1.0或XML1.1文档节点树中定位节点所设计.目前有XPath1.0和XPath2.0两个版本.其中Xpath1.0是199 ...

  10. [iOS翻译]《iOS7 by Tutorials》系列:iOS7的设计精髓(下)

    我们继续上篇的内容 四.聚焦于内容 在iOS7里,强调的不是眼花缭乱的装饰效果,而是最重要的内容本身. 下面我们来探讨这个主题: 1.删除不必要的内容 伟大的设计更多是减法和加法的组合. 虽然很酷的想 ...