#navi(../)
* flexのバージョンアップ [#ra2a3879]

#contents
#htmlinsertpcsp(db-top.html,db-sp.html)

PostgreSQL9.xをコンパイルしてインストールしようと思いtarballをダウンロードしてconfigureを実施。~
以下のWARNINGが出力されたので、flexをバージョンアップ(インストール)することにした。~
以降、flexのソースをダウンロードしてインストールした手順を記述する。~
尚、利用したディストリビューションはCentOS5です。


 [sakura@centos postgresql-9.1.0]$ ./configure
 checking build system type... x86_64-unknown-linux-gnu
 checking host system type... x86_64-unknown-linux-gnu
 checking which template to use... linux
 checking whether to build with 64-bit integer date/time support... yes
 <snip>
 checking for bison... /usr/bin/bison
 configure: using bison (GNU Bison) 2.3
 checking for flex... configure: WARNING:
 *** The installed version of Flex, /usr/bin/flex, is too old to use with PostgreSQL.
 *** Flex version 2.5.31 or later is required, but this is /usr/bin/flex version 2.5.4.
 configure: WARNING:
 *** The installed version of Flex, /usr/bin/lex, is too old to use with PostgreSQL.
 *** Flex version 2.5.31 or later is required, but this is /usr/bin/lex version 2.5.4.
 no
 configure: WARNING:
 *** Without Flex you will not be able to build PostgreSQL from Git nor
 *** change any of the scanner definition files.  You can obtain Flex from
 *** a GNU mirror site.  (If you are using the official distribution of
 *** PostgreSQL then you do not need to worry about this because the Flex
 *** output is pre-generated.)
 checking for perl... /usr/bin/perl
 configure: using perl 5.8.8
 checking for main in -lm... yes
 <snip>

* flexの入手 [#p5414079]
flexは以下のURLより入手しました。~
http://flex.sourceforge.net/~
入手したflexのtarballおよびバージョンは以下の通りです。~
flex-2.5.35.tar.gz~
ダウンロード : http://sourceforge.net/projects/flex/files/flex/flex-2.5.35/flex-2.5.35.tar.gz/download


* flexのコンパイルとインストール [#t309cfdb]
以下の作業はrootユーザで行ってください。~
ダウンロードしたファイルは/usr/local/srcにあるものとします。

 [root@centos src]# cd /usr/local/src
 [root@centos src]# pwd
 /usr/local/src
 [root@centos src]# ls
 flex-2.5.35.tar.gz
 [root@centos src]# tar xzf flex-2.5.35.tar.gz
 [root@centos src]# cd flex-2.5.35
 [root@centos flex-2.5.35]# ./configure --prefix=/usr/local
 <snip>
 [root@centos src]# make
 <snip>
 [root@centos src]# make install
 <snip>

flexは以下の通り、/usr/local/binにインストールされています。
 [sakura@centos ~]$ which flex
 /usr/local/bin/flex

通常、PATHの環境変数値を確認すると、/usr/local/binにパスが通っており、/usr/binなどより前に設定されているので、.bashrcなどの設定も不要と思います。~
PATHが通ってい無い場合は変更してください。

 [sakura@centos ~]$ echo $PATH
 /usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/home/sakura/bin

以上、CentOS上でPostgreSQL9をソースからコンパイルするために必要なflexのバージョンアップ手順です。~
あくまでも当方がPostgreSQL9.xをコンパイルするために行った手順です。~
本資料により直接的および間接的障害が生じても一切責任を負いません。~
自己責任のもとで本資料をご利用ください。~


#htmlinsertpcsp(db-btm.html,db-sp.html)

トップ   編集 差分 バックアップ 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS