LoginSignup
1
0

More than 5 years have passed since last update.

Android上でlibdb 4.8をコンパイルする

Last updated at Posted at 2018-02-18

注意

ここに書いた内容だけで、ここを見ている皆様が全員再現できる保証はございません。機種によってはできないことがありますのでご了承下さい。
私はTermux推しですが、Termuxではコンパイルには失敗してしまうようです。残念

はじめに

Androidでlibdb 4.8をコンパイルするという長年の夢(?)がついに叶ってしまったようなのでご報告までに。

これは何だったのか

必要なもの

今回の環境

コンパイルとインストール

解説はコメントとして書いておきました。
先にbuild-essentialsなどを入れておいて下さい。

# libdbのソースコードをダウンロードしてコンパイル (PCでの方法と同じ)
wget http://download.oracle.com/berkeley-db/db-4.8.30.NC.tar.gz
tar zxvf db-4.8.30.NC.tar.gz
cd db-4.8.30.NC/build_unix 

# config.{guess,sub}を更新 (Androidでコンパイルするには必須)
chmod a+rw ../dist/config.{guess,sub}
wget -O../dist/config.guess 'http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD'
wget -O../dist/config.sub 'http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD'

# コンパイル (PCでの方法と同じ)
../dist/configure --disable-shared --enable-cxx --disable-replication --with-pic
make

# インストール (PCでの方法と同じ)
make install_lib install_include

# 他ソフトウェアでのconfigureが失敗するのでコピーしておく (任意)
cd /usr/local/
cp -R BerkeleyDB.4.8/* .

# おしまい
cd 

最後に

ご意見、ご質問等ございましたらコメントやTwitter等にてお願いします。

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0