|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2002-02-07 16:11 UTC] seba at iq dot pl
> System
RedHat linux for i386
> MySQL
$ rpm -qa |grep MySQL
MySQL-devel-3.23.47-1
MySQL-client-3.23.47-1
MySQL-3.23.47-1
There is no shared lib of mysql. Just only .a (_static_ lib) and
.h files.
> Apache
Apache was not instaled witch distro, this is first and only one
instalation in system.
; we are 100% sure that no old stuff left
$ rm -rf /usr/local/apache/ apache_1.3.22/
$ tar zxfv apache_1.3.22.tar.gz ; cd apache_1.3.22
; standard instalation
$./configure --with-layout=Apache --enable-module=rewrite \
--enable-module=expires --enable-module=headers \
--enable-shared=rewrite --enable-shared=expires \
--enable-shared=headers
$ make && make install
; done
$ cd ..
> Mnogosearch
Mnogosearch was not instaled witch distro, this is first and
only one instalation in system.
; we are 100% sure that no old stuff left
$ rm -rf mnogosearch-3.1.19/ /usr/local/mnogosearch-3.1.19
$ tar zxfv mnogosearch-3.1.19.tar.gz ; cd mnogosearch-3.1.19/
; standard instalation
$ ./configure --with-mysql=/usr \
--prefix=/usr/local/mnogosearch-3.1.19
$ make && make install
; done
$ cd ..
; lets check whats installed
$ ls /usr/local/mnogosearch-3.1.19/lib/
libudmsearch.a libudmsearch.la
After install stage only _static_ lib was found in lib dir of
mnogosearch. There was no shared .so lib.
> Php
Php was not instaled witch distro.
; we are 100% sure that no old stuff left
$ rm -rf php4-200202071200/
$ tar zxfv php4-200202071200.tar.gz ; cd php4-200202071200/
; standard instalation
$ ./configure --with-apxs=/usr/local/apache/bin/apxs \
--with-mysql=/usr --with-zlib --enable-memory-limit \
--with-mnogosearch=/usr/local/mnogosearch-3.1.19
$ make
- error ----------------------------------------------
/bin/sh /root/php4-200202071200/libtool --silent --mode=link gcc
-I. -I/root/php4-200202071200/ -I/root/php4-200202071200/main
-I/root/php4-200202071200 -I/usr/local/apache/include
-I/root/php4-200202071200/Zend
-I/usr/local/mnogosearch-3.1.19/include -I/usr/include/mysql
-I/root/php4-200202071200/ext/xml/expat -DLINUX=22 -DUSE_HSREGEX
-I/root/php4-200202071200/TSRM -g -O2 -prefer-pic -o libphp4.la
-rpath /root/php4-200202071200/libs -avoid-version
-L/usr/lib/mysql -L/usr/local/mnogosearch-3.1.19/lib -R
/usr/lib/mysql -R /usr/local/mnogosearch-3.1.19/lib stub.lo
Zend/libZend.la sapi/apache/libsapi.la main/libmain.la
regex/libregex.la /root/php4-200202071200/ext/zlib/libzlib.la
/root/php4-200202071200/ext/mnogosearch/libmnogosearch.la
/root/php4-200202071200/ext/mysql/libmysql.la
/root/php4-200202071200/ext/overload/liboverload.la
/root/php4-200202071200/ext/pcre/libpcre.la
/root/php4-200202071200/ext/posix/libposix.la
/root/php4-200202071200/ext/session/libsession.la
/root/php4-200202071200/ext/standard/libstandard.la
/root/php4-200202071200/ext/xml/libxml.la TSRM/libtsrm.la -lpam
-lmysqlclient -lz -ludmsearch -lz -lm -lmysqlclient -lz -lcrypt
-lresolv -lm -ldl -lnsl -lresolv -lcrypt -ldl
/usr/lib/mysql/libmysqlclient.a(libmysql.o)(.data+0x4): multiple
definition of `mysql_port'
/usr/lib/mysql/libmysqlclient.a(libmysql.o)(.data+0x4): first
defined here
/usr/lib/mysql/libmysqlclient.a(libmysql.o)(.data+0x8): multiple
definition of `mysql_unix_port'
/usr/lib/mysql/libmysqlclient.a(libmysql.o)(.data+0x8): first
defined here
/usr/lib/mysql/libmysqlclient.a(libmysql.o): In function
`net_safe_read':
libmysql.o(.text+0x1cc): multiple definition of `net_safe_read'
/usr/lib/mysql/libmysqlclient.a(libmysql.o)(.text+0x1cc): first
defined here
/usr/lib/mysql/libmysqlclient.a(libmysql.o): In function
`simple_command':
libmysql.o(.text+0x2d4): multiple definition of `simple_command'
/usr/lib/mysql/libmysqlclient.a(libmysql.o)(.text+0x2d4): first
defined here
/usr/lib/mysql/libmysqlclient.a(libmysql.o): In function
`mysql_real_connect':
libmysql.o(.text+0xc6c): multiple definition of
`mysql_real_connect'
[... and lots more of this ....]
------------------------------------------------------
$ cd ..
Why? And don't know. Maybe someday/someone fix this...
But, lets try other way:
$ rm -rf php4-200202071200/
$ tar zxfv php4-200202071200.tar.gz ; cd php4-200202071200/
; lets add shared to "--with-mysql"
$ ./configure --with-apxs=/usr/local/apache/bin/apxs \
--with-mysql=shared,/usr --with-zlib --enable-memory-limit \
--with-mnogosearch=/usr/local/mnogosearch-3.1.19
$ make
; compilation done :)
; check what is/isn't shared
$ ldd .libs/libphp4.so
libdl.so.2 => /lib/libdl.so.2 (0x40182000)
libpam.so.0 => /lib/libpam.so.0 (0x40186000)
libz.so.1 => /usr/lib/libz.so.1 (0x4018e000)
libm.so.6 => /lib/i686/libm.so.6 (0x4019c000)
libcrypt.so.1 => /lib/libcrypt.so.1 (0x401bf000)
libresolv.so.2 => /lib/libresolv.so.2 (0x401ec000)
libnsl.so.1 => /lib/libnsl.so.1 (0x401fe000)
libc.so.6 => /lib/i686/libc.so.6 (0x40215000)
/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x80000000)
$ cd ..
Compilation done, thats ok :) but why?
Why php could not detect their dependences at configure stage?
When I add "shared" ony to "--with-mnogosearch" - php compiles
fine.
When I add "shared" to both "--with-mnogosearch" and
"--with-mysql" - php compiles fine.
When I skip "shared" in both "--with-mnogosearch" and
"--with-mysql" - php compilation fails.
What this "shared" option really means? There was no .so lib of
mysql and mnogosearch.
Is there (in php) more hacks like this one?
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Nov 01 17:00:02 2025 UTC |
Check, after Gluke sugestion. > MySQL $ rpm -qa |grep MySQL MySQL-devel-3.23.47-1 MySQL-shared-3.23.47-1 MySQL-client-3.23.47-1 MySQL-3.23.47-1 Info about some locations from rpm'ed mysql: libmysqlclient.so is located in /usr/lib/ libmysqlclient.a in /usr/lib/mysql/ .h files in /usr/include/mysql/ > Apache There is nothing to touch from previous instalation. > Mnogosearch ; we are 100% sure that no old stuff left $ rm -rf mnogosearch-3.1.19/ /usr/local/mnogosearch-3.1.19 $ tar zxfv mnogosearch-3.1.19.tar.gz ; cd mnogosearch-3.1.19/ ; gluke config $ ./configure --with-mysql --enable-shared \ --prefix=/usr/local/mnogosearch-3.1.19 $ make && make install ; done $ cd .. ; lets check whats installed $ ls /usr/local/mnogosearch-3.1.19/lib/ libudmsearch-3.1.so libudmsearch.a libudmsearch.la libudmsearch.so It's too easy, lets check something: $ ldd /usr/local/mnogosearch-3.1.19/lib/libudmsearch.so libm.so.6 => /lib/i686/libm.so.6 (0x40072000) libz.so.1 => /usr/lib/libz.so.1 (0x40095000) libc.so.6 => /lib/i686/libc.so.6 (0x400a3000) /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x80000000) Where is link to dynamic lib of mysql? Still no straight feedback from mnogosearch dev. team: http://www.mnogosearch.org/board/message.php?id=4102 > Php ; let's try an up-to-date shap $ tar zxfv php4-200202211200.tar.gz ; php4-200202211200/ ; standard instalation $ ./configure --with-apxs=/usr/local/apache/bin/apxs \ --with-mysql=/usr --with-zlib --enable-memory-limit \ --with-mnogosearch=/usr/local/mnogosearch-3.1.19 $ make - error ---------------------------------------------- /bin/sh /root/php4-200202211200/libtool --silent --mode=link gcc -I. -I/root/php4-200202211200/ -I/root/php4-200202211200/main -I/root/php4-200202211200 -I/usr/local/apache/include -I/root/php4-200202211200/Zend -I/usr/local/mnogosearch-3.1.19/include -I/usr/include/mysql -I/root/php4-200202211200/ext/xml/expat -DLINUX=22 -DUSE_HSREGEX -I/root/php4-200202211200/TSRM -g -O2 -prefer-pic -o libphp4.la -rpath /root/php4-200202211200/libs -avoid-version -L/usr/lib/mysql -L/usr/local/mnogosearch-3.1.19/lib -R /usr/lib/mysql -R /usr/local/mnogosearch-3.1.19/lib stub.lo Zend/libZend.la sapi/apache/libsapi.la main/libmain.la regex/libregex.la /root/php4-200202211200/ext/zlib/libzlib.la /root/php4-200202211200/ext/mnogosearch/libmnogosearch.la /root/php4-200202211200/ext/mysql/libmysql.la /root/php4-200202211200/ext/overload/liboverload.la /root/php4-200202211200/ext/pcre/libpcre.la /root/php4-200202211200/ext/posix/libposix.la /root/php4-200202211200/ext/session/libsession.la /root/php4-200202211200/ext/standard/libstandard.la /root/php4-200202211200/ext/xml/libxml.la TSRM/libtsrm.la -lpam -lmysqlclient -lz -ludmsearch -lz -lm -lmysqlclient -lz -lcrypt -lresolv -lm -ldl -lnsl -lresolv -lcrypt -ldl /usr/lib/mysql/libmysqlclient.a(libmysql.o)(.data+0x4): multiple definition of `mysql_port' /usr/lib/mysql/libmysqlclient.a(libmysql.o)(.data+0x4): first defined here /usr/lib/mysql/libmysqlclient.a(libmysql.o)(.data+0x8): multiple definition of `mysql_unix_port' /usr/lib/mysql/libmysqlclient.a(libmysql.o)(.data+0x8): first defined here /usr/lib/mysql/libmysqlclient.a(libmysql.o): In function `net_safe_read': libmysql.o(.text+0x1cc): multiple definition of `net_safe_read' /usr/lib/mysql/libmysqlclient.a(libmysql.o)(.text+0x1cc): first defined here /usr/lib/mysql/libmysqlclient.a(libmysql.o): In function `simple_command': libmysql.o(.text+0x2d4): multiple definition of `simple_command' /usr/lib/mysql/libmysqlclient.a(libmysql.o)(.text+0x2d4): first defined here /usr/lib/mysql/libmysqlclient.a(libmysql.o): In function `mysql_real_connect': libmysql.o(.text+0xc6c): multiple definition of `mysql_real_connect' /usr/lib/mysql/libmysqlclient.a(libmysql.o)(.text+0xc6c): first defined here /usr/lib/mysql/libmysqlclient.a(libmysql.o): In function `mysql_select_db': libmysql.o(.text+0x2e68): multiple definition of `mysql_select_db' /usr/lib/mysql/libmysqlclient.a(libmysql.o)(.text+0x2e68): first defined here /usr/lib/mysql/libmysqlclient.a(libmysql.o): In function `mysql_query': libmysql.o(.text+0x2ef4): multiple definition of `mysql_query' /usr/lib/mysql/libmysqlclient.a(libmysql.o)(.text+0x2ef4): first defined here /usr/lib/mysql/libmysqlclient.a(libmysql.o): In function `mysql_use_result': libmysql.o(.text+0x2338): multiple definition of `mysql_use_result' /usr/lib/mysql/libmysqlclient.a(libmysql.o)(.text+0x2338): first defined here /usr/lib/mysql/libmysqlclient.a(libmysql.o): In function `mysql_close': libmysql.o(.text+0x1ad0): multiple definition of `mysql_close' [...] /usr/lib/mysql/libmysqlclient.a(dbug.o): In function `_db_return_': dbug.o(.text+0x9bc): multiple definition of `_db_return_' /usr/lib/mysql/libmysqlclient.a(dbug.o)(.text+0x9bc): first defined here /usr/lib/mysql/libmysqlclient.a(dbug.o): In function `_db_pargs_': dbug.o(.text+0xac8): multiple definition of `_db_pargs_' /usr/lib/mysql/libmysqlclient.a(dbug.o)(.text+0xac8): first defined here /usr/lib/mysql/libmysqlclient.a(dbug.o): In function `_db_lock_file': dbug.o(.text+0xae0): multiple definition of `_db_lock_file' /usr/lib/mysql/libmysqlclient.a(dbug.o)(.text+0xae0): first defined here /usr/lib/mysql/libmysqlclient.a(dbug.o): In function `_db_unlock_file': dbug.o(.text+0xaf4): multiple definition of `_db_unlock_file' /usr/lib/mysql/libmysqlclient.a(dbug.o)(.text+0xaf4): first defined here collect2: ld returned 1 exit status make[1]: *** [libphp4.la] Error 1 make[1]: Leaving directory `/root/php4-200202211200' make: *** [all-recursive] Error 1 ------------------------------------------------------ $ cd .. :(