编译rnnlib

简介: rnnlib,一个多年不更新的rnn库,编译的过程有点麻烦,好多东西要选特定版本的。这里记录一下我的配置脚本,在ubuntu14.04下测试ok。P.S fedora下好像不能直接用包管理来安装指定版本的gcc/g++,这一点上ubuntu还是很人性化的。

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
目录
相关文章
|
6月前
|
机器学习/深度学习 运维 自然语言处理
系统程序的编译与处理
系统程序的编译与处理
|
程序员 Linux Android开发
libYuv编译
安卓使用NDK编译libYuv库
300 0
|
10月前
|
缓存 Java Shell
ThingsBoard详细编译指南2.4.3
ThingsBoard详细编译指南2.4.3
339 0
|
10月前
|
C++
C++程序的编译过程
C++程序的编译过程
|
自然语言处理 编译器 C语言
C/C++程序的编译过程
C/C++程序的编译过程
181 0
C/C++程序的编译过程
jpegNPP编译为so
jpegNPP编译为so
59 0
|
自然语言处理
编译
编译
92 0
|
Web App开发 存储 缓存
V8 编译浅谈
本文是一个 V8 编译原理知识的介绍文章,旨在让大家感性的了解 JavaScript 在 V8 中的解析过程。
V8 编译浅谈
|
开发工具 C++ git
DCMTK-001-3.6.6编译
DCMTK-001-3.6.6编译
241 0
DCMTK-001-3.6.6编译
|
Python
编译过程
编译系统的运行过程 源代码 --> 机器代码 解释器运行程序的方法 1.直接运行高级编程语言 2.转换高级编程语言码到一些有效率的字节码(Bytecode),并运行这些字节码 Python解释语言特点 "拆解"代码: 首先当用户键入代码交给Python处理的时候会先进行此法分析,例如用户...
772 0