postgres9のconfigureでエラー

このQ&Aのポイント
  • Solaris10にpostgres9.0.5をインストールしようとしています。エラーが発生しています。
  • configureのオプションを指定すると、thread-safetyエラーが発生します。
  • thread-safetyを無効にすることでエラーを回避できますが、9.0.4/9.1.1でも同様のエラーが発生します。
回答を見る
  • ベストアンサー

postgres9のconfigureでエラー

Solaris10にpostgres9.0.5をインストールしようとしています。 Solarisには現時点での最新パッチが当たっている状態です(詳細はちょっと不明) 以下のオプションでconfigureを行うと、エラーになります。 ./configure --prefix=/usr/local/postgres --without-readline --enable-thread-safety 以下エラー --------------------------------------------------------------- checking thread safety of required library functions... no configure: error: thread test program failed This platform is not thread-safe. Check the file 'config.log' or compile and run src/test/thread/thread_test for the exact reason. Use --disable-thread-safety to disable thread safety. --------------------------------------------------------------- config.logの中のエラーの内容 --------------------------------------------------------------- configure:28765: checking thread safety of required library functions configure:28798: gcc -m64 -o conftest -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wend if-labels -fno-strict-aliasing -fwrapv -pthreads -pthreads -D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS -D IN_CONFIGURE conftest.c -lz -lnsl -lsocket -lm -lpthread -lpthread >&5 Undefined first referenced symbol in file sched_yield /var/tmp//ccVp73Io.o collect2: ld returned 1 exit status ld: fatal: symbol referencing errors. No output written to conftest configure:28802: $? = 1 configure: program exited with status 1 --------------------------------------------------------------- thread-safetyを無効にすれば正常にインストールできます。 このエラーを回避するにはどうすればよいでしょうか? あまり参考にはならない情報かもしれませんが、9.0.4/9.1.1でも同様のエラーが出ます。

質問者が選んだベストアンサー

  • ベストアンサー
  • entree
  • ベストアンサー率55% (405/735)
回答No.1

> Undefined first referenced > symbol in file > sched_yield /var/tmp//ccVp73Io.o sched_yieldが見つからないと言っています。 それは、Solarisではsched_yieldがlibc.soにもlibpthread.soにも含まれていないからです。 では、それがどこにあるのか? librt.soにあります。 なので、LIBSに-lrtを設定してconfigureしてみては如何でしょうか? $ LIBS=-lrt ./configure --prefix=/usr/local/postgres --without-readline --enable-thread-safety ところで、configureで失敗したテストプログラムは以下ですが、 $(srcdir)/src/test/thread/thread_test.c 222行目の問題箇所を見ると、/* if this is a portability problem, remove it */ と書いてあるので、以下の2行を消してconfigureしてもOKかもしれません。 while (thread1_done == 0 || thread2_done == 0) sched_yield(); あと、余談ですが、psqlを使用することがあるなら、--without-readlineはあまりお勧めしません。

miyamura200000
質問者

お礼

ご回答ありがとうございました。 LIBSに-lrtを設定したら、configureからコンパイル、インストールまでうまくいきました。 今のところ動作も問題なくいっている模様です。 助かりました。

関連するQ&A

  • Postgresのthread-safetyについ

    Postgres9のconfigureで--disable-thread-safetyをセットした場合の影響について調べています。 マニュアルには -------------------------------------- クライアントライブラリのスレッドセーフを無効にします。これにより、libpqやECPGプログラム内 の同時実行スレッドは、安全にその固有の接続ハンドルを制御できなくなります。 -------------------------------------- と書かれています。 言葉の意味そのままだと、安全でなくなるように読み取れます。 JavaやPerlで作成したWebアプリからのDB操作を行なっていますが、 プログラム側で意図的にスレッドを作ったりはしていません。 このような環境で、--disable-thread-safetyにするのは何かしらの不都合が発生するのでしょうか? どういった問題が起こりえるのかを知りたいです。 どなたかご存じの方がいらっしゃいましたらご教授願います。

  • ./configureの次にmakeが出来ません

    ubuntu8.04を使っているLinux初心者です。 rcssbase-11.1.0.tar.gz というものをインストールしたいのですが、makeを行うと、'all'に対して行うべき事はありませんと出ます。 ./configureの段階でうまくいっていないのだとは思うのですが、何をどう改善すればいいのか分かりません。実行メッセージのどの部分を載せたらいいのか分からないので、怪しいかなと思う所(noやerrorが出た所)を載せます。 .......... checking whether the C++ compiler works... yes checking whether we are cross compiling... no checking for the pthreads library -lpthreads... no checking whether pthreads work without any flags... no checking whether pthreads work with -Kthread... no checking whether pthreads work with -kthread... no checking for the pthreads library -llthread... no checking whether pthreads work with -pthread... yes checking dl.h usability... no checking dl.h presence... no checking for dl.h... no checking sys/dl.h usability... no checking sys/dl.h presence... no checking for sys/dl.h... no checking dld.h usability... no checking dld.h presence... no checking for dld.h... no checking mach-o/dyld.h usability... no checking mach-o/dyld.h presence... no checking for mach-o/dyld.h... no checking ltdl.h usability... no checking ltdl.h presence... no checking for ltdl.h... no checking for cvs... no config.status: creating config.h config.status: config.h is unchanged .......... あと、config.logを表示させたらこんな表示がありました。 /usr/bin/uname -p = unknown /bin/uname -X = unknown /bin/arch = unknown /usr/bin/arch -k = unknown /usr/convex/getsysinfo = unknown /usr/bin/hostinfo = unknown /bin/machine = unknown /usr/bin/oslevel = unknown /bin/universe = unknown configure:8221: result: no /usr/bin/ld: cannot find -lsocket configure:8916: result: no /usr/bin/ld: cannot find -lposix4 ac_cv_func_shl_load=no ac_cv_header_dl_h=no ac_cv_header_dld_h=no ac_cv_header_errno_h=yes ac_cv_header_ltdl_h=no conftest.c:10:28: error: ac_nonexistent.h: No such file or directory conftest.c:10:28: error: ac_nonexistent.h: No such file or directory conftest.cpp:11:28: error: ac_nonexistent.h: No such file or directory conftest.cpp:11:28: error: ac_nonexistent.h: No such file or directory conftest.cpp:69: error: '_Bool' does not name a type conftest.cpp:73: error: 'ac__type_new_' was not declared in this scope conftest.cpp:73: error: expected primary-expression before ')' token conftest.cpp:73: error: expected `)' before numeric constant conftest.cpp:75: error: 'ac__type_new_' was not declared in this scope conftest.cpp:106:16: error: dl.h: No such file or directory conftest.cpp:73:16: error: dl.h: No such file or directory conftest.cpp:106:20: error: sys/dl.h: No such file or directory conftest.cpp:73:20: error: sys/dl.h: No such file or directory conftest.cpp:106:17: error: dld.h: No such file or directory conftest.cpp:73:17: error: dld.h: No such file or directory conftest.cpp:106:25: error: mach-o/dyld.h: No such file or directory conftest.cpp:73:25: error: mach-o/dyld.h: No such file or directory conftest.cpp:115:18: error: ltdl.h: No such file or directory conftest.cpp:82:18: error: ltdl.h: No such file or directory conftest.cpp:82:28: error: ac_nonexistent.h: No such file or directory ........ (dl.h...noなどの表示がありますが、これは何ですか?(すみません、検索してみてもよく分からなかったので)noというのは絶対にあってはいけないのですか?) 情報が足りなすぎるかもしれませんが、よろしくお願いします。

  • ./configureのエラー

    DEC XP1000 に フリーソフトの「ImageMagick」を インストールしたいのですが、 jpegライブラリがうまく ビルドできません。 jpegライブラリ単体での makeとinstallは うまく行ったのですが、 全体での./configureで jpegだけうまく行きません。 configのログを見ると、下記のconfdefs.hが 出てくる度に引っかかっているようです。 このファイルをWWWで検索するとヒットするのですが、 具体的に説明しているHPは見つかっていません。 どなたか、アドバイスや関連HPを教えていただければ、 助かります。 よろしくお願いします。 configure: failed program was: #line 1736 "configure" #include "confdefs.h" int main () { #ifndef __CYGWIN__ # define __CYGWIN__ __CYGWIN32__ #endif return __CYGWIN__; ; return 0; } configure:1758: result: no configure:1762: checking for mingw32 environment configure:1778: gcc -c -O conftest.c >&5 configure: In function `main': configure:1773: `__MINGW32__' undeclared (first use in this function) configure:1773: (Each undeclared identifier is reported only once configure:1773: for each function it appears in.) configure: failed program was:

  • PHPのconfigureでmysqlエラーが

    CentOS 5 x86_64上でapache+php+mysqlのサーバ構築中ですが、どうもうまくいきません。 apacheとphpでconfigureのオプションを付けてインストールしたいので、rpm -eでhttpdとphpをアンインストールしたうえで、apacheとphpをmake installしようとしました。 apacheはうまくinstallできたのですが、phpはconfigureでエラーが出てしまいます。 以前Cent OS 5.2(32bit)でやった時は問題なかったのですが・・・ ↓configure時のエラーメッセージ -------------------- checking for mSQL support... no checking for MSSQL support via FreeTDS... no checking for MySQL support... yes checking for specified location of the MySQL UNIX socket... no checking for MySQL UNIX socket location... /var/lib/mysql/mysql.sock checking for mysql_close in -lmysqlclient... no checking for mysql_error in -lmysqlclient... no configure: error: mysql configure failed. Please check config.log for more information. -------------------- ↓config.logのエラーメッセージ -------------------- configure:60440: checking for mysql_error in -lmysqlclient configure:60459: gcc -o conftest -I/usr/include -g -O2 -Wl,-rpath,/usr/lib/mysql -L/usr/lib/mysql -L/usr/lib -Wl,-rpath,/usr/kerberos/lib64 -L/usr/kerberos/lib64 -Wl,-rpath,/usr -L/usr conftest.c -lmysqlclient -lz -lfreetype -lpng -lz -ljpeg -lcurl -lz -lresolv -lm -ldl -lnsl -lxml2 -lz -lm -lssl -lcrypto -ldl -lz -lcurl -ldl -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lidn -lssl -lcrypto -lz -lxml2 -lz -lm 1>&5 /usr/bin/ld: skipping incompatible /usr/lib/mysql/libmysqlclient.so when searching for -lmysqlclient /usr/bin/ld: skipping incompatible /usr/lib/mysql/libmysqlclient.a when searching for -lmysqlclient /usr/bin/ld: cannot find -lmysqlclient collect2: ld returned 1 exit status configure: failed program was: #line 60448 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char mysql_error(); -------------------- ↓apacheのconfigure ------------------------- ./configure --enable-layout=Apache --disable-autoindex --disable-status --disable-userdir --enable-modules=so --enable-mods-shared=max --enable-ssl --with-ssl=/usr/share/ssl --enable-rewrite=shared --enable-ext-filter ------------------------- ↓phpのconfigure ------------------------- ./configure --with-apxs2=/usr/local/apache2/bin/apxs --enable-mbstring --enable-mbregex --enable-gd-native-ttf --with-gd --with-ttf --with-jpeg-dir --with-freetype-dir --with-png-dir --with-zlib --with-curl --with-openssl --with-mysql ------------------------- バージョンは apache:2.2.11 php:5.2.10, 5.3.0の両方で試しましたが結果は同じ mysql-5.0.45-7.el5.x86_64 mysql-devel-5.0.45-7.el5.x86_64 です。 どなたかご教授いただけますと助かります・・・

  • Postgres9インストールFlexが古い?

    お世話になります。 Centos5.8 64bitにPostgres9.0.8をソースからインストールしようとしていますが、./configure 実行時、以下のようなFlexの警告が表示されます。 どこに問題があるのかご存知の方教えていただけませんでしょうか? $ cd /usr/local/src/postgresql-9.0.8 $ ./configure 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 checking for library containing setproctitle... no checking for library containing dlopen... -ldl checking for library containing socket... none required checking for library containing shl_load... no checking for library containing getopt_long... none required checking for library containing crypt... -lcrypt checking for library containing fdatasync... none required checking for library containing gethostbyname_r... none required checking for library containing shmget... none required checking for -lreadline... no checking for -ledit... no configure: error: readline library not found If you have readline already installed, see config.log for details on the failure. It is possible the compiler isn't looking in the proper directory. Use --without-readline to disable readline support. インストールされているバージョンは古くないと思っているのですが、どうずればインストールを進めることができるでしょうか? $ rpm -qa | grep flex flex-2.5.4a-41.fc6 $ which flex /usr/bin/flex どうぞ宜しくお願い致します。

  • GCCでライブラリが足りない

    はじめまして。 LindowsOS4.0を使っています。 コンパイルができずに困っています。 GCCとMAKEをインストールしました(Lindowsはどちらも入っていないのです。Debian/Woodyベースと言われています)。 gcc 2.95.4 make 3.79.1 which gcc とすると、/usr/bin/gcc と表示されます。 で、./configure すると、 ..... checking whether the C compiler works ... no と表示されコンパイルエラーになります。 configure.log を見ると、 ------------------- checking for gcc configure:916: checking whether the C compiler (gcc ) works configure:932: gcc -o conftest conftest.c 1>&5 /usr/bin/ld: cannot open crt1.o: No such file or directory collect2: ld returned 1 exit status configure: failed program was: #line 927 "configure" #include "confdefs.h" main(){return(0);} --------------------- とか --------------------- checking for gcc configure:905: checking whether the C compiler (gcc ) works configure:921: gcc -o conftest conftest.c 1>&5 /usr/bin/ld: cannot open crt1.o: No such file or directory collect2: ld returned 1 exit status configure: failed program was: #line 916 "configure" #include "confdefs.h" main(){return(0);} ---------------------- とかなっています。 confdefs.hというのは何かのライブラリなのでしょうか?これが無いとconfigureできないのでしょうか?? よろしくお願いいたします。

  • Linuxにおけるoctaveのインストール

    CentOSでoctaveをインストールしようと思い、 以下のURLを参考にインストールしようとしました。 http://www.obihiro.ac.jp/~suzukim/masuda/octave/octave_version3_compile.html が、最後のOctaveの./configureを実行する際に 以下のようなエラーが出てしまいました。(抜粋) checking for long long int... yes checking for unsigned long long int... yes checking for sigset_t... yes checking for sig_atomic_t... yes checking for short... yes checking size of short... configure: error: cannot compute sizeof (short) See `config.log' for more details. config.logは以下のようになっていました。(抜粋) configure:17378: checking size of short configure:17728: gcc -o conftest -g -O2 -I/usr/local/include conftest.c -lhdf5 -lz -lm >&5 configure:17731: $? = 0 configure:17737: ./conftest ./conftest: error while loading shared libraries: libhdf5.so.0: cannot open shared object file: No such file or directory configure:17740: $? = 127 configure: program exited with status 127 configure: failed program was: | /* confdefs.h. */ | #define PACKAGE_NAME "" | #define PACKAGE_TARNAME "" | #define PACKAGE_VERSION "" (中略) | return 0; | } configure:17751: error: cannot compute sizeof (short) See `config.log' for more details. 参考URLに書いてあることは一通りやっています。 octaveのバージョンを変えてみてもダメでした。 何か解決策がわかる方いらっしゃいましたら、回答お待ちしております。

  • rsyncのインストール(エラー発生)

    solaris9のマシンでデータの同期を行いたい為、rsyncを導入しようと思いました。 http://ash.jp/freebsd/rsync.htm などのサイトを参考にインストールを実行しようとしたところ、 ------------------------------------------------------------ # ./configure configure: Configuring rsync 2.6.8 checking build system type... sparc-sun-solaris2.8 checking host system type... sparc-sun-solaris2.8 checking target system type... sparc-sun-solaris2.8 checking for gcc... no checking for cc... no checking for cc... no checking for cl... no configure: error: no acceptable C compiler found in $PATH See `config.log' for more details. # ------------------------------------------------------------ のようにエラーが発生してしまいました Cコンパイラが見つからない(?) のようなことだと思われるのですが 解決方法として如何すればよいのでしょうか? よろしくお願い致します。   

  • Firefox2のconfigureでエラーが出ます

    今Firefox2.0.0.8をコンパイルしてインストールすることを試みているのですが、configureで次のようなエラーが出てしまいます。 checking MOZ_GTK2_LIBS... -L/lib -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lm -lpangocairo-1.0 -lpango-1.0 -lcairo -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0 configure: error: --enable-application=APP is required GTK2もyum install gtk2-develでインストールしたはずなのですが、 --enable-application=APPが必要といわれても、GTK2も最新版を入れたはずなのでどこがおかしいのかわかりません。 OSはFedora Core 6(GNOME)です。 一応GoogleでMOZ_GTK2_LIBSなどを検索したり、 http://developer.mozilla.org/ja/docs/Build_Documentation を読んだのですが、MOZ_GTK2_LIBSに関する情報がありませんでした。 わかるかたはご回答をよろしくおねがいします。

  • make でエラー

    勉強中の身です。 環境 fedora 2 postgresqlをインストールして (postgresql-8.2.1) make コンパイルがうまくいきません [postgres@localhost postgresql-8.2.1]$ ./configure checking build system type... i686-pc-linux-gnuoldld checking host system type... i686-pc-linux-gnuoldld checking which template to use... linux checking whether to build with 64-bit integer date/time support... no checking whether NLS is wanted... no checking for default port number... 5432 checking for gcc... no checking for cc... no configure: error: no acceptable C compiler found in $PATH See `config.log' for more details. [postgres@localhost postgresql-8.2.1]$ make You need to run the 'configure' program first. See the file 'INSTALL' for installation instructions. make: *** [all] エラー 1 $ make とすると上記のようにエラーがでます。 ./configure -オプション が必要なのでしょうか? よろしくおねがいします。