Webboard: Make error with "--with-mysql" specified in main build

[email protected] Thu, 7 Mar 2013 00:04:57 +0400 (MSK)
Newsgroups gmane.comp.web.mnogosearch.php-frontend
Message-ID <[email protected]>
Author: Alexander Barkov
Email: 
Message:
> I've compiled and installed mnoGoSearch 3.3.13.
> I've configured mnoGoSearch "--with-mysql" by adding the path to the glibc sources I've downloaded from here:
> http://downloads.mysql.com/archives.php?p=mysql-5.1&v=5.1.44
> 
> So the --with-mysql param looks like this:
> 
> --with-mysql=/opt/support/shelpzag/build/mysql-5.1.44-linux-x86_64-glibc23
> 
> 
> But when I try to compile the PHP extension a make error occurs.
> These are the last lines of the make command:
> 
> /bin/sh /opt/support/shelpzag/build/mnogosearch-3.3.13/php/libtool --mode=link gcc -std=gnu99 -DPHP_ATOM_INC -I/opt/support/shelpzag/build/mnogosearch-3.3.13/php/include -I/opt/support/shelpzag/build/mnogosearch-3.3.13/php/main -I/opt/support/shelpzag/build/mnogosearch-3.3.13
> /php -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib -I/opt/support/shelpzag/mnogosearch3313/include  -DHAVE_CONFIG_H  -g -O2   -o mnogosearch.la -export-dynamic -avoid-version -prefer-pic -module
>  -rpath /opt/support/shelpzag/build/mnogosearch-3.3.13/php/modules  php_mnogo.lo -Wl,-rpath,/opt/support/shelpzag/mnogosearch3313/lib -L/opt/support/shelpzag/mnogosearch3313/lib -Wl,-rpath,/opt/support/shelpzag/build/mysql-5.1.44-linux-x86_64-glibc23/lib -L/opt/support/shelpzag/build/mysql-5.1
> .44-linux-x86_64-glibc23/lib -lm -lrt -lz -lmysqlclient -lmnogosearch -lmnogocharset
> libtool: link: warning: library `/opt/support/shelpzag/build/mysql-5.1.44-linux-x86_64-glibc23/lib/libz.la' was moved.
> libtool: link: warning: library `/opt/support/shelpzag/build/mysql-5.1.44-linux-x86_64-glibc23/lib/libmysqlclient.la' was moved.
> grep: /usr/local/mysql/lib/libmysqlclient.la: No such file or directory
> /usr/bin/sed: can't read /usr/local/mysql/lib/libmysqlclient.la: No such file or directory
> libtool: link: `/usr/local/mysql/lib/libmysqlclient.la' is not a valid libtool archive
> make: *** [mnogosearch.la] Error 1
> 
> The two warnings about "libz.la was moved" and "libmysqlclient.la was moved" are not correct. The files are there.
> 
> The configure script (in php) didn't output any errors.
> 
> Any ideas?
> Amar

The MySQL archive you downloaded is assumed to be unpacked to
/usr/local/mysql.

There is a hack to make it work in your location.

Open this file:
/opt/support/shelpzag/build/mysql-5.1.44-linux-x86_64-glibc23/lib/libmysqlclient.la

Find this line:

libdir='/usr/local/mysql/lib'

and fix it to:

libdir=/opt/support/shelpzag/build/mysql-5.1.44-linux-x86_64-glibc23/lib


After that you need to compile mnoGoSearch again in a fresh
source tree:

rm -rf mnogosearch-3.3.13
tar -zxf mnogosearch-3.3.13.tar.gz
cd mnogosearch-3.3.13
./configure --with-mysql=....
make
make install

Then go to /php subdirectory and compile the PHP module.
It should work fine.


But I'd suggest to consider installing MySQL libraries from
the package manager instead of compiling with this downloaded
archive.

For example:

yum install mysql-devel             (on CentOS or Fedora)
apt-get install libmysqlclient-dev  (on Debian or Ubuntu)

and compiling mnoGoSearch with them.

This will help to avoid errors and give you smoother
integration into your system.



Reply: <http://www.mnogosearch.org/board/message.php?id=21517>

_______________________________________________
Php-frontend mailing list
[email protected]
http://lists.mnogosearch.org/listinfo/php-frontend