[PHP-users 31541] php5.2.1 の「 --with-mysqli 」ついて

suprisedman @ yahoo.co.jp
2007年 2月 24日 (土) 19:48:50 JST


初めまして、健と申します。
php歴は初心者向けの書籍を勉強している所で、mysqlもその本で勉強しています
。
将来、本格的なphpを使ったWebサイトを運営していこうと思っています。

さて、今回のご用件はphp5.2.1環境下での「mysqli」のコンパイルエラーで困っ
ています。
phpのコンパイルオプションは下記の通りで
CFLAGS="-DBIND_8_COMPAT=1 -DEAPI -O3 -faltivec -mcpu=G4 -dead_strip"
./configure --prefix=/usr/local/bin/php5 --sysconfdir=/etc
--localstatedir=/var --mandir=/usr/share/man --enable-trans-sid
--with-kerberos=/usr --with-curl=/usr/local --with-ldap=/usr --enable-exif
--enable-ftp --enable--dbx --with-iodbc=/usr --enable-sockets
--enable-mbstring  --enable-mbregex --enable-zend-multibyte
--enable-memory-limit --enable-gd --with-gd=/usr/local/ --enable-cli
--with-apxs=/usr/sbin/apxs --with-openssl --with-zlib --with-ftp
--with-xml-dir=/usr/local -with-config-file-path=/usr/local/lib
--without-pear --with-freetype-dir=/usr/local --with-png-dir=/usr/local
--enable-gd-jis-conv --enable-gd-native-ttf --with-xsl=/usr
--with-mysqli=/usr/local/mysql/bin/mysql_config

php5.2.1をコンパイルの中にこんなエラーが吐いてしまいました。

ld: multiple definitions of symbol _CRYPTO_add_lock
/usr/lib/libcrypto.dylib(cryptlib.o) definition of _CRYPTO_add_lock
/usr/local/mysql/lib/libmysqlclient.a(libtaocrypt_la-misc.o) definition of
_CRYPTO_add_lock in section (__TEXT,__text)
ld: multiple definitions of symbol _CRYPTO_lock
/usr/lib/libcrypto.dylib(cryptlib.o) definition of _CRYPTO_lock
/usr/local/mysql/lib/libmysqlclient.a(libtaocrypt_la-misc.o) definition of
_CRYPTO_lock in section (__TEXT,__text)
ld: warning multiple definitions of symbol _regcomp
/usr/sbin/httpd definition of _regcomp
/usr/lib/libm.dylib(regcomp.So) definition of _regcomp
ld: warning multiple definitions of symbol _regexec
/usr/sbin/httpd definition of _regexec
/usr/lib/libm.dylib(regexec.So) definition of _regexec
ld: warning multiple definitions of symbol _regfree
/usr/sbin/httpd definition of _regfree
/usr/lib/libm.dylib(regfree.So) definition of _regfree
ld: warning multiple definitions of symbol _regerror
/usr/sbin/httpd definition of _regerror
/usr/lib/libm.dylib(regerror.So) definition of _regerror
make: *** [libs/libphp5.bundle] Error 1

コンパイルエラーの原因を突き止めるために、コンパイルオプションを1つ1つ
外していくと、--with-mysqliを外してコンパイルすると無事コンパイルできまし
た。
このエラーの原因はmysqliにあると思います。

また、今回とは関係あるかどうか分かりませんが、コンパイル中にposix.c:889で
エラーを吐きましたが、該当箇所をコメント文として扱わせた上で再コンパイル
すると成功しました。
grbuflen = sysconf(_SC_GETGR_R_SIZE_MAX);

本来MacOSXではphpがバンドルされていますが、OSが10.3なのでphpのバージョン
が古く、自分で構築することにしました。
それとどこかのサイトでphp5.2.1のパッケージがあったと思いますが、対応OSが10.4
以降なので使う事ができません。

過去のメーリングでmysqliのインストール関連のエラーの記事がありましたが、
今回のエラーとは関係がなくまた、yahooなどでも検索してみましたが見つかりま
せんでした。
それと、mysql公式サイトもみてみましたが見つかりませんでした。

OSはMacOSX10.3.9で、mysqlのバージョンは5.0.27(コンパイル済みパッケージ使
用)で、phpのバージョンは5.2.1で、Apacheのバージョンは1.3.33(Appleが提供
している物を使用)です。

以上宜しくお願いします

--
健
suprisedman @ yahoo.co.jp
--

--------------------------------------
Start Yahoo! Auction now! Check out the cool campaign
http://pr.mail.yahoo.co.jp/auction/



PHP-users メーリングリストの案内