ID: 15436 Updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] -Status: Feedback +Status: Open Bug Type: Compile Failure Operating System: RedHat 7.2 PHP Version: 4.0CVS-2002-02-07 New Comment:
> Can you try to remove (or rename) libmysqlclient.a > in /usr/lib/mysql/ ? This is not a proper way in fixing bugs! It should be a php configure script decision to use or not use any kind of libs. But lets try: > 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/ $ cd /usr/lib/mysql/ ; go away static lib $ mv libmysqlclient.a libmysqlclient.a_ $ cd > 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/ ; 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. Is this ok? I'm waiting for feedback: http://www.mnogosearch.org/board/message.php?id=4102 Compilation of mnogosearch was done when there was no libmysqlclient.a file in /usr/lib/mysql/ dir. > Php ; 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/sapi/cli -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 -o php -export-dynamic libphp4cli.la gcc: /usr/lib/mysql/libmysqlclient.a: No such file or directory make[2]: *** [php] Error 1 make[2]: Leaving directory `/root/php4-200202071200/sapi/cli' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/root/php4-200202071200/sapi/cli' make: *** [all-recursive] Error 1 ------------------------------------------------------ $ cd .. :( Previous Comments: ------------------------------------------------------------------------ [2002-02-07 17:20:54] [EMAIL PROTECTED] Can you try to remove (or rename) libmysqlclient.a in /usr/lib/mysql/ ? Derick ------------------------------------------------------------------------ [2002-02-07 17:18:39] [EMAIL PROTECTED] ------------------------------------------------------------------------ [2002-02-07 16:38:37] [EMAIL PROTECTED] > Please install MySQL-shared-3.23.47-1 and recompile both > mnogosearch & php. Check, after Derick segestion. > 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 ; lets clean old stuff from previous compilation $ 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. Is this ok? I'm waiting for feedback: http://www.mnogosearch.org/board/message.php?id=4102 > Php ; lets clean old stuff from previous compilation $ 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' /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(libmysql.o)(.text+0x1ad0): first defined here /usr/lib/mysql/libmysqlclient.a(libmysql.o): In function `mysql_change_user': libmysql.o(.text+0x19b4): multiple definition of `mysql_change_user' /usr/lib/mysql/libmysqlclient.a(libmysql.o)(.text+0x19b4): first defined here /usr/lib/mysql/libmysqlclient.a(libmysql.o): In function `mysql_read_query_result': libmysql.o(.text+0x1cdc): multiple definition of `mysql_read_query_result' /usr/lib/mysql/libmysqlclient.a(libmysql.o)(.text+0x1cdc): first defined here /usr/lib/mysql/libmysqlclient.a(libmysql.o): In function `mysql_store_result': libmysql.o(.text+0x2200): multiple definition of `mysql_store_result' /usr/lib/mysql/libmysqlclient.a(libmysql.o)(.text+0x2200): first defined here /usr/lib/mysql/libmysqlclient.a(libmysql.o): In function `mysql_fetch_row': libmysql.o(.text+0x242c): multiple definition of `mysql_fetch_row' /usr/lib/mysql/libmysqlclient.a(libmysql.o)(.text+0x242c): first defined here /usr/lib/mysql/libmysqlclient.a(libmysql.o): In function `mysql_list_dbs': libmysql.o(.text+0x25b8): multiple definition of `mysql_list_dbs' /usr/lib/mysql/libmysqlclient.a(libmysql.o)(.text+0x25b8): first defined here /usr/lib/mysql/libmysqlclient.a(libmysql.o): In function `mysql_real_query': libmysql.o(.text+0x2f70): multiple definition of `mysql_real_query' [... and lots more of this ....] ------------------------------------------------------ $ cd .. Derick segestion does not solve problem. :( ------------------------------------------------------------------------ [2002-02-07 16:15:09] [EMAIL PROTECTED] Please install MySQL-shared-3.23.47-1 and recompile both mnogosearch & php That should work (it does for me :) Derick ------------------------------------------------------------------------ [2002-02-07 16:11:48] [EMAIL PROTECTED] > 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? ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=15436&edit=1 -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, visit: http://www.php.net/unsub.php