PHP kompileringsproblem med mysql
Jag försöker kompilera php5 med mysql5.
./configure --with-apsx2=/www/bin/apxs --with-zlib-dir=/usr/include --with-mysql=/usr/local/mysql
Jag har alltså installerat mysql i /usr/local/mysql, och det funkar fint.
Dock när jag försöker kompilera php med config:en ovan, så får jag fel:
checking for MySQL UNIX socket location... no
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:58773: checking for mysql_error in -lmysqlclient
configure:58792: gcc -o conftest -I/usr/include -g -O2 -Wl,-rpath,/usr/local/mysql/lib -L/usr/local/mysql/lib -L/usr/lib -Wl,-rpath,/usr -L/usr conftest.c -lmysqlclient -lz -lz -lresolv -lm -ldl -lnsl -lxml2 -lz -lm -lxml2 -lz -lm 1>&5
/usr/local/mysql/lib/libmysqlclient.a(ssl.o)(.gnu.linkonce.d.__vt_Q25yaSSL7Message+0x8): undefined reference to `__pure_virtual'
/usr/local/mysql/lib/libmysqlclient.a(ssl.o)(.gnu.linkonce.d.__vt_Q25yaSSL7Message+0xc): undefined reference to `__pure_virtual'
/usr/local/mysql/lib/libmysqlclient.a(ssl.o)(.gnu.linkonce.d.__vt_Q25yaSSL7Message+0x10): undefined reference to `__pure_virtual'
/usr/local/mysql/lib/libmysqlclient.a(ssl.o)(.gnu.linkonce.d.__vt_Q25yaSSL7Message+0x14): undefined reference to `__pure_virtual'
/usr/local/mysql/lib/libmysqlclient.a(ssl.o)(.gnu.linkonce.d.__vt_Q25yaSSL7Message+0x18): undefined reference to `__pure_virtual'
/usr/local/mysql/lib/libmysqlclient.a(cert_wrapper.o)(.text+0x76): In function `yaSSL::x509::~x509(void)':
: undefined reference to `__builtin_delete'
/usr/local/mysql/lib/libmysqlclient.a(cert_wrapper.o)(.text+0x2e6): In function `yaSSL::CertManager::~CertManager(void)':
: undefined reference to `__builtin_delete'
/usr/local/mysql/lib/libmysqlclient.a(template_instnt.o)(.gnu.linkonce.t._._Q25mySTLt4list1ZPQ25yaSSL11SSL_SESSION+0x42): In function `mySTL::list<yaSSL::SSL_SESSION *>::~list(void)':
: undefined reference to `__builtin_delete'
/usr/local/mysql/lib/libmysqlclient.a(template_instnt.o)(.gnu.linkonce.t._._Q25mySTLt4list1ZPQ25yaSSL12input_buffer+0x42): In function `mySTL::list<yaSSL::input_buffer *>::~list(void)':
: undefined reference to `__builtin_delete'
/usr/local/mysql/lib/libmysqlclient.a(template_instnt.o)(.gnu.linkonce.t._._Q25mySTLt4list1ZPQ25yaSSL13output_buffer+0x42): In function `mySTL::list<yaSSL::output_buffer *>::~list(void)':
: undefined reference to `__builtin_delete'
/usr/local/mysql/lib/libmysqlclient.a(template_instnt.o)(.gnu.linkonce.t._._Q25mySTLt4list1ZPUc+0x42): more undefined references to `__builtin_delete' follow
/usr/local/mysql/lib/libmysqlclient.a(template_instnt.o)(.gnu.linkonce.d.__vt_Q25yaSSL13HandShakeBase+0x8): undefined reference to `__pure_virtual'
/usr/local/mysql/lib/libmysqlclient.a(template_instnt.o)(.gnu.linkonce.d.__vt_Q25yaSSL13HandShakeBase+0xc): undefined reference to `__pure_virtual'
/usr/local/mysql/lib/libmysqlclient.a(template_instnt.o)(.gnu.linkonce.d.__vt_Q25yaSSL13HandShakeBase+0x10): undefined reference to `__pure_virtual'
/usr/local/mysql/lib/libmysqlclient.a(template_instnt.o)(.gnu.linkonce.d.__vt_Q25yaSSL13HandShakeBase+0x14): undefined reference to `__pure_virtual'
/usr/local/mysql/lib/libmysqlclient.a(yassl_imp.o)(.text+0x295d): In function `yaSSL::ServerDHParams::~ServerDHParams(void)':
: undefined reference to `__builtin_delete'
/usr/local/mysql/lib/libmysqlclient.a(yassl_imp.o)(.text+0x4996): In function `yaSSL::Connection::~Connection(void)':
: undefined reference to `__builtin_delete'
/usr/local/mysql/lib/libmysqlclient.a(yassl_int.o)(.text+0x31b8): In function `yaSSL::SSL_SESSION::~SSL_SESSION(void)':
: undefined reference to `__builtin_delete'
/usr/local/mysql/lib/libmysqlclient.a(yassl_int.o)(.text+0x3332): In function `yaSSL::Sessions::~Sessions(void)':
: undefined reference to `__builtin_delete'
/usr/local/mysql/lib/libmysqlclient.a(yassl_int.o)(.text+0x369a): In function `yaSSL::SSL_CTX::~SSL_CTX(void)':
: undefined reference to `__builtin_delete'
/usr/local/mysql/lib/libmysqlclient.a(yassl_int.o)(.text+0x3b43): more undefined references to `__builtin_delete' follow
/usr/local/mysql/lib/libmysqlclient.a(libtaocrypt_la-asn.o)(.gnu.linkonce.d.__vt_Q28TaoCrypt4HASH+0xc): undefined reference to `__pure_virtual'
/usr/local/mysql/lib/libmysqlclient.a(libtaocrypt_la-asn.o)(.gnu.linkonce.d.__vt_Q28TaoCrypt4HASH+0x10): undefined reference to `__pure_virtual'
/usr/local/mysql/lib/libmysqlclient.a(libtaocrypt_la-asn.o)(.gnu.linkonce.d.__vt_Q28TaoCrypt4HASH+0x14): undefined reference to `__pure_virtual'
/usr/local/mysql/lib/libmysqlclient.a(libtaocrypt_la-asn.o)(.gnu.linkonce.d.__vt_Q28TaoCrypt4HASH+0x18): undefined reference to `__pure_virtual'
/usr/local/mysql/lib/libmysqlclient.a(libtaocrypt_la-asn.o)(.gnu.linkonce.d.__vt_Q28TaoCrypt4HASH+0x1c): undefined reference to `__pure_virtual'
/usr/local/mysql/lib/libmysqlclient.a(libtaocrypt_la-asn.o)(.gnu.linkonce.d.__vt_Q28TaoCrypt11BER_Decoder+0xc): more undefined references to `__pure_virtual' follow
/usr/local/mysql/lib/libmysqlclient.a(libtaocrypt_la-asn.o)(.gnu.linkonce.t._._Q28TaoCrypt13DSA_PublicKey+0xaa): In function `TaoCrypt::DSA_PublicKey::~DSA_PublicKey(void)':
: undefined reference to `__builtin_delete'
/usr/local/mysql/lib/libmysqlclient.a(libtaocrypt_la-random.o)(.text+0x171): In function `TaoCrypt::OS_Seed::~OS_Seed(void)':
: undefined reference to `__builtin_delete'
/usr/local/mysql/lib/libmysqlclient.a(libtaocrypt_la-hash.o)(.gnu.linkonce.d.__vt_Q28TaoCrypt17HASHwithTransform+0x14): undefined reference to `__pure_virtual'
/usr/local/mysql/lib/libmysqlclient.a(libtaocrypt_la-hash.o)(.gnu.linkonce.d.__vt_Q28TaoCrypt17HASHwithTransform+0x18): undefined reference to `__pure_virtual'
/usr/local/mysql/lib/libmysqlclient.a(libtaocrypt_la-hash.o)(.gnu.linkonce.d.__vt_Q28TaoCrypt17HASHwithTransform+0x1c): undefined reference to `__pure_virtual'
/usr/local/mysql/lib/libmysqlclient.a(libtaocrypt_la-hash.o)(.gnu.linkonce.d.__vt_Q28TaoCrypt17HASHwithTransform+0x20): undefined reference to `__pure_virtual'
/usr/local/mysql/lib/libmysqlclient.a(libtaocrypt_la-hash.o)(.gnu.linkonce.d.__vt_Q28TaoCrypt17HASHwithTransform+0x24): undefined reference to `__pure_virtual'
/usr/local/mysql/lib/libmysqlclient.a(libtaocrypt_la-hash.o)(.gnu.linkonce.d.__vt_Q28TaoCrypt17HASHwithTransform+0x28): more undefined references to `__pure_virtual' follow
/usr/local/mysql/lib/libmysqlclient.a(crypto_wrapper.o)(.text+0x1611): In function `yaSSL::RandomPool::~RandomPool(void)':
: undefined reference to `__builtin_delete'
/usr/local/mysql/lib/libmysqlclient.a(crypto_wrapper.o)(.text+0x200d): In function `yaSSL::Integer::~Integer(void)':
: undefined reference to `__builtin_delete'
/usr/local/mysql/lib/libmysqlclient.a(crypto_wrapper.o)(.text+0x2395): In function `yaSSL::DiffieHellman::~DiffieHellman(void)':
: undefined reference to `__builtin_delete'
/usr/local/mysql/lib/libmysqlclient.a(crypto_wrapper.o)(.gnu.linkonce.t._._Q35yaSSL3DES7DESImpl+0x51): In function `yaSSL::DES::DESImpl::~DESImpl(void)':
: undefined reference to `__builtin_delete'
/usr/local/mysql/lib/libmysqlclient.a(crypto_wrapper.o)(.gnu.linkonce.t._._Q35yaSSL7DES_EDE11DES_EDEImpl+0x3a): In function `yaSSL::DES_EDE::DES_EDEImpl::~DES_EDEImpl(void)':
: undefined reference to `__builtin_delete'
/usr/local/mysql/lib/libmysqlclient.a(crypto_wrapper.o)(.gnu.linkonce.t._._Q35yaSSL3AES7AESImpl+0x3a): more undefined references to `__builtin_delete' follow
/usr/local/mysql/lib/libmysqlclient.a(crypto_wrapper.o)(.gnu.linkonce.d.__vt_Q28TaoCrypt9Mode_BASE+0xc): undefined reference to `__pure_virtual'
/usr/local/mysql/lib/libmysqlclient.a(crypto_wrapper.o)(.gnu.linkonce.d.__vt_Q25yaSSL4Auth+0x8): undefined reference to `__pure_virtual'
/usr/local/mysql/lib/libmysqlclient.a(crypto_wrapper.o)(.gnu.linkonce.d.__vt_Q25yaSSL4Auth+0xc): undefined reference to `__pure_virtual'
/usr/local/mysql/lib/libmysqlclient.a(crypto_wrapper.o)(.gnu.linkonce.d.__vt_Q25yaSSL4Auth+0x10): undefined reference to `__pure_virtual'
/usr/local/mysql/lib/libmysqlclient.a(crypto_wrapper.o)(.gnu.linkonce.d.__vt_Q25yaSSL10BulkCipher+0x8): undefined reference to `__pure_virtual'
/usr/local/mysql/lib/libmysqlclient.a(crypto_wrapper.o)(.gnu.linkonce.d.__vt_Q25yaSSL10BulkCipher+0xc): more undefined references to `__pure_virtual' follow
/usr/local/mysql/lib/libmysqlclient.a(crypto_wrapper.o)(.gnu.linkonce.t._._Q28TaoCrypt14RSA_PrivateKey+0x12e): In function `TaoCrypt::RSA_PrivateKey::~RSA_PrivateKey(void)':
: undefined reference to `__builtin_delete'
/usr/local/mysql/lib/libmysqlclient.a(log.o)(.text+0x30): In function `yaSSL::Log::~Log(void)':
: undefined reference to `__builtin_delete'
/usr/local/mysql/lib/libmysqlclient.a(libtaocrypt_la-algebra.o)(.gnu.linkonce.d.__vt_Q28TaoCrypt23AbstractEuclideanDomain+0xc): undefined reference to `__pure_virtual'
/usr/local/mysql/lib/libmysqlclient.a(libtaocrypt_la-algebra.o)(.gnu.linkonce.d.__vt_Q28TaoCrypt23AbstractEuclideanDomain+0x10): undefined reference to `__pure_virtual'
/usr/local/mysql/lib/libmysqlclient.a(libtaocrypt_la-algebra.o)(.gnu.linkonce.d.__vt_Q28TaoCrypt23AbstractEuclideanDomain+0x14): undefined reference to `__pure_virtual'
/usr/local/mysql/lib/libmysqlclient.a(libtaocrypt_la-algebra.o)(.gnu.linkonce.d.__vt_Q28TaoCrypt23AbstractEuclideanDomain+0x18): undefined reference to `__pure_virtual'
/usr/local/mysql/lib/libmysqlclient.a(libtaocrypt_la-algebra.o)(.gnu.linkonce.d.__vt_Q28TaoCrypt23AbstractEuclideanDomain+0x3c): undefined reference to `__pure_virtual'
/usr/local/mysql/lib/libmysqlclient.a(libtaocrypt_la-algebra.o)(.gnu.linkonce.d.__vt_Q28TaoCrypt23AbstractEuclideanDomain+0x40): more undefined references to `__pure_virtual' follow
/usr/local/mysql/lib/libmysqlclient.a(libtaocrypt_la-file.o)(.text+0x88): In function `TaoCrypt::FileSource::~FileSource(void)':
: undefined reference to `__builtin_delete'
/usr/local/mysql/lib/libmysqlclient.a(libtaocrypt_la-file.o)(.text+0x28c): In function `TaoCrypt::FileSink::~FileSink(void)':
: undefined reference to `__builtin_delete'
collect2: ld returned 1 exit status
configure: failed program was:
#line 58781 "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();
int main() {
mysql_error()
; return 0; }
Varför funkar det inte?
Jag kör slackware 10.2.
Jag har hört att man ska installera mysql-devel? Jag har testat genom att köra rpm2tgz, sedan pkgtool och installerat det. Men vart ska jag länka från php-configen? --with-mysql= vad?
EDIT: Efter att ha installerat mysql-devel så är det bara att köra --with-mysql i php-configen.