LoginSignup
0
0

More than 3 years have passed since last update.

compat-gccを使ってmysql4.0をビルド

Last updated at Posted at 2019-09-19

手順 (CentOS7) mysql4.0.30

yum install -y \
 wget \
 ncurses-devel \
 compat-gcc-44 \
 compat-gcc-44-c++

tar xzf mysql-4.0.30.tar.gz
configure
CC=/usr/bin/gcc44
CXX=/usr/bin/g++44
./configure ()

手順 (CentOS6) mysql4.0.27

yum install -y \
 wget \
 ncurses-devel \
 compat-gcc-34 \
 compat-gcc-34-c++

tar xzf mysql-4.0.27.tar.gz

コンパイル時のエラーを回避

コンパイル時に「my_fast_mutexattr」が定義されていないとエラーが出る場合がある為、
定義を強制してエラーを回避します。
解凍したディレクトリに移動して「mysys/my_thr_init.c」ファイルを修正します。

cd mysql-4.0.27/
vim mysys/my_thr_init.c
mysys/my_thr_init.c
- #ifdef PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP
  pthread_mutexattr_t my_fast_mutexattr;
- #endif
configure
CC=/usr/bin/gcc34
CXX=/usr/bin/g++34
./configure ()
0
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
0
0