[pgsql-jp: 40753] Re: solaris10 への postgres8.3.14 のインストール (SUNcc) において、 __divdi3 エラー
yamachan @ j-net21.jp
yamachan @ j-net21.jp
2011年 4月 28日 (木) 23:53:59 JST
やまもとといいます。
参考になるかもしれません。
http://wikis.sun.com/display/DBonSolaris/BuildingPostgreSQL
で、↑のとおりやってみました。
OpenSolaris 10 でわたしがだいぶまえにコンパイルしたときの設定です。
SUNWspro はパッケージではなくてダウンロードして、opt 以下に展開しました
が、ちょっと古いかもしれません。
#!/usr/bin/bash
PGVER=8.4pgdg
ROOT=/usr
#Don't enable the pl/perl option when building 64-bit PostgreSQL i.e.
ommit "--with-perl" when running configure.
CFLAGS="-xO3 -xtarget=generic -m64 -xspace -Xa -xildoff -xCC"
./configure CC=/opt/SUNWspro/bin/cc \
"CFLAGS=$CFLAGS" \
"LD_OPTIONS=-R/usr/sfw/lib -L/usr/sfw/lib -M /usr/lib/ld/map.noexstk"
\
MAKE=/usr/bin/gmake \
--prefix=/postgres/$PGVER \
--exec-prefix=/postgres/$PGVER \
--bindir=/postgres/$PGVER/bin \
--libexecdir=/postgres/$PGVER/bin \
--sbindir=/postgres/$PGVER/bin \
--datadir=/postgres/$PGVER/share \
--sysconfdir=/postgres/$PGVER/etc \
--mandir=/postgres/$PGVER/man \
--libdir=/postgres/$PGVER/lib \
--includedir=/postgres/$PGVER/include \
--sharedstatedir=/var/postgres/$PGVER \
--localstatedir=/var/postgres/$PGVER \
--enable-nls \
--with-docdir=/postgres/$PGVER/doc \
--with-system-tzdata=/usr/share/lib/zoneinfo \
--with-tcl --with-python \
--with-pam --with-openssl --with-krb5 \
--with-libxml --with-libxslt \
--enable-thread-safety \
--enable-dtrace \
--with-includes=/usr/include:/usr/sfw/include:/usr/include/kerberosv5
\
--with-tclconfig=/usr/lib \
--with-libs=/usr/lib:/usr/sfw/lib
make は以下で
gmake 'LD_OPTIONS=-R\$\$ORIGIN/../lib:/usr/sfw/lib -L/usr/sfw/lib -M /
usr/lib/ld/map.noexstk' MAKE=/usr/bin/gmake all
cc と postgres のバージョン
[yamachan @ os postgresql-8.4.4]$ /opt/SUNWspro/bin/cc -V
cc: Sun C 5.9 SunOS_i386 Patch 124868-10 2009/04/30
usage: cc [ options] files. Use 'cc -flags' for details
v6 については、
data/pg_hba.conf で対応できないでしょうか。コメントアウトしてしまうとか。
未確認です。
# IPv6 local connections:
#host all all ::1/128 ident
Tsuchida takayuki <akashouse @ yahoo.co.jp>さん:
はじめまして。
Solaris 10へpostgres8.3.14を入れようとしているのですが、
※postgisを使いたいので8.3
gcc(3.4.3)では上手くいくのですが、
configure
make
make install
./configure CC=で、SUNcc(Sun C 5.11)を指定して行うと、
makeで、
未定義の 最初に参照している
シンボル ファイル
__lshrdi3 utils/SUBSYS.o
__divdi3 utils/SUBSYS.o
__floatdidf optimizer/SUBSYS.o
__floatdisf postmaster/SUBSYS.o
__moddi3 postmaster/SUBSYS.o
__muldi3 utils/SUBSYS.o
__ashldi3 utils/SUBSYS.o
__ashrdi3 utils/SUBSYS.o
__udivdi3 utils/SUBSYS.o
__umoddi3 utils/SUBSYS.o
ld: 重大なエラー: シンボル参照エラー。postgres に書き込
まれる出力はありません。
とエラーが出ます。
なお、gccでコンパイルした物は問題無く起動するのですが、
起動時に”could not bind IPv6 socket: 要求されたアドレス
を割り当てられません。”
と表示されます。
※ポート番号を変えても同じコメントが表示されます
psqlではアクセスでき、問題なく動きます。
ps -efで見ると、
pg_ctlが四つ起動しており、一度に四つ起動してそれぞれが
ポートを要求しているように思われます。
pg_ctl stop -D ...で止めた後に、pg_ctl startをすると同
じ状態なので4つ一度に起動しているようなので。
アドバイス、よろしくお願いいたします。
pgsql-jp メーリングリストの案内