プロが教える店舗&オフィスのセキュリティ対策術

お世話になります。
Cygwin(ver:1.7.10-1)でPostgreSQL(ver:8.3.13)をインストールしたいのですが、make all時に以下のエラーが発生します。
Cygwinパッケージの不足等があるのでしょうか?何かアドバイスをいただけるとありがたいです。


======================================================
rm -f thread.c && ln -s ../../../../src/port/thread.c .
gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Winline -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -fwrapv -I../include -I../../../../src/interfaces/ecpg/include -I../../../../src/interfaces/libpq -I../../../../src/port -I../../../../src/include -DBUILDING_DLL -c -o thread.o thread.c
dlltool --export-all --output-def ecpg.def execute.o typename.o descriptor.o data.o error.o prepare.o memory.o connect.o misc.o path.o pgstrcasecmp.o thread.o
dllwrap -Wl,--enable-auto-import -o cygecpg.dll --dllname cygecpg.dll --def ecpg.def execute.o typename.o descriptor.o data.o error.o prepare.o memory.o connect.o misc.o path.o pgstrcasecmp.o thread.o -L../pgtypeslib -L../../../../src/interfaces/libpq -L../../../../src/port -L/usr/local/lib -lpgtypes -lpq -lm
execute.o:execute.c:(.text+0x20e1): undefined reference to `_libintl_setlocale'
execute.o:execute.c:(.text+0x2107): undefined reference to `_libintl_setlocale'
execute.o:execute.c:(.text+0x251b): undefined reference to `_libintl_setlocale'
execute.o:execute.c:(.text+0x255b): undefined reference to `_libintl_setlocale'
execute.o:execute.c:(.text+0x262f): undefined reference to `_libintl_setlocale'
execute.o:execute.c:(.text+0x26fb): more undefined references to `_libintl_setlocale' follow
collect2: ld はステータス 1 で終了しました
dllwrap: gcc exited with status 1
../../../../src/Makefile.shlib:314: recipe for target `libecpg.a' failed
make[4]: *** [libecpg.a] Error 1
make[4]: ディレクトリ `/home/nabe/postgresql-8.3.13/src/interfaces/ecpg/ecpglib' から出ます
Makefile:6: recipe for target `all' failed
make[3]: *** [all] Error 2
make[3]: ディレクトリ `/home/nabe/postgresql-8.3.13/src/interfaces/ecpg' から出ます
Makefile:20: recipe for target `all' failed
make[2]: *** [all] Error 2
make[2]: ディレクトリ `/home/nabe/postgresql-8.3.13/src/interfaces' から出ます
Makefile:17: recipe for target `all' failed
make[1]: *** [all] Error 2
make[1]: ディレクトリ `/home/nabe/postgresql-8.3.13/src' から出ます
GNUmakefile:12: recipe for target `all' failed
make: *** [all] Error 2

A 回答 (1件)

configure時に--enable-nlsとか付けていません?


付けているのであれば、事前にgettextとlibiconvのインストールが必要です。
    • good
    • 0
この回答へのお礼

entreeさん、ご回答ありがとうございます。

確認したところ、libiconvはver1.14-2、gettextはver0.18.1.1-2をインストールしていました。

当方で行っている作業手順は
 1.cygwinのインストール
 2.cygwinコンソールでPostgreSQLのダウンロード(ver8.3.13)
 3.ダウンロードファイルの展開(tar jxvf postgre・・・・)
 4.展開したディレクトリへ移動(cd postgre・・・)
 5.PostgreSQLの設定(./configure --enable-nls=ja)
 6.PostgreSQLのコンパイル(make all)
です。

昨日も色々と調べて、libintlのバージョンが0.18の場合、Windowsでは不具合が起きるかも・・・
という情報を見つけて、c:\cygwin\home\owner\postedsql-8.3.13\src\includeにある
port.hというファイルを以下の通り変更して、上記の操作を行いましたが、
現象は変わりませんでした。

============== 変更部分 ここから ================
#undef printf
#endif

@@@@@@@@@ここから追加@@@@@@@@
/*
* Versions of libintl >= 0.18? try to replace setlocale() with a macro
* to their own versions. Disable the macro, if it exists.
*/
#if defined(setlocale) && defined(WIN32)
#undef setlocale
#endif
@@@@@@@@@ここまで追加@@@@@@@@

extern intpg_vsnprintf(char *str, size_t count, const char *fmt, va_list args);
extern int
============== 変更部分 ここまで ================

ちなみに参考にしたサイトは
http://archives.postgresql.org/message-id/4D416D …
http://archives.postgresql.org/pgsql-hackers/201 …
です。

申し訳ありませんが、上記の手順等でお気づきの点や、
ほかに対応すべき点がありましたら、ご教授いただけるとありがたいです。

よろしくお願いします。

お礼日時:2012/02/23 09:48

お探しのQ&Aが見つからない時は、教えて!gooで質問しましょう!