I'm trying to compile and install branch php7 of phpredis repository but i'm getting the following error:
/bin/sh /root/phpredis/libtool --mode=compile cc -I. -I/root/phpredis - DPHP_ATOM_INC -I/root/phpredis/include -I/root/phpredis/main -I/root/phpredis -I/usr/lib64/php7.0/include/php -I/usr/lib64/php7.0/include/php/main -I/usr/lib64/php7.0/include/php/TSRM -I/usr/lib64/php7.0/include/php/Zend -I/usr/lib64/php7.0/include/php/ext -I/usr/lib64/php7.0/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /root/phpredis/redis.c -o redis.lo libtool: Version mismatch error. This is libtool 2.4.6, but the libtool: definition of this LT_INIT comes from an older release. libtool: You should recreate aclocal.m4 with macros from libtool 2.4.6 libtool: and run autoconf again. Makefile:193: recipe for target 'redis.lo' failed make: *** [redis.lo] Error 63
By now this is are the steps i followed:
git clone https://github.com/phpredis/phpredis.git cd phpredis/ git checkout php7 phpize && ./configure --with-php-config=/usr/bin/php-config && make
Tools versions:
# autoconf --version autoconf (GNU Autoconf) 2.69 # aclocal --version aclocal (GNU automake) 1.15 # libtoolize --version libtoolize (GNU libtool) 2.4.6
Running autoreconf --force --install
i get the following:
# autoreconf --force --install libtoolize: putting auxiliary files in '.'. libtoolize: copying file './ltmain.sh' libtoolize: You should add the contents of the following files to 'aclocal.m4': libtoolize: '/usr/share/aclocal/libtool.m4' libtoolize: '/usr/share/aclocal/ltoptions.m4' libtoolize: '/usr/share/aclocal/ltsugar.m4' libtoolize: '/usr/share/aclocal/ltversion.m4' libtoolize: '/usr/share/aclocal/lt~obsolete.m4' libtoolize: Consider adding 'AC_CONFIG_MACRO_DIRS([m4])' to configure.in, libtoolize: and rerunning libtoolize and aclocal. libtoolize: Consider adding '-I m4' to ACLOCAL_AMFLAGS in Makefile.am.
So then i do:
cat /usr/share/aclocal/libtool.m4 /usr/share/aclocal/ltoptions.m4 /usr/share/aclocal/ltsugar.m4 /usr/share/aclocal/ltversion.m4 /usr/share/aclocal/lt~obsolete.m4 >> aclocal.m4
Then i add AC_CONFIG_MACRO_DIRS([m4]) to the top level of configure.in
And now running autoreconf --force --install
gives not output but i still get the same error when trying to compile phpredis.
AC_CONFIG_MACRO_DIRS([m4])
inconfigure.ac
, followed by, say,LT_PREREQ([2.4.6])
andLT_INIT
later. This would probably take care of putting everything in the right place with:autoreconf -fvi
– Brett Hale