Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Libtool Version Mismatch issue
View unanswered posts
View posts from last 24 hours

Goto page 1, 2  Next  
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
Pita
Tux's lil' helper
Tux's lil' helper


Joined: 09 Apr 2020
Posts: 101

PostPosted: Wed May 20, 2020 12:20 pm    Post subject: Libtool Version Mismatch issue Reply with quote

I've been trying to make a php ext for our project described here: https://forums.gentoo.org/viewtopic-t-1113056.html and I'm running into a version mismatch error for libtool. When I run make on my ext, I get this error:
Code:
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.
make: *** [Makefile:192: php_tsync.lo] Error 63


This is what is run to build:
Code:

phpize --clean && phpize && aclocal && libtoolize --force && autoheader && autoconf && ./configure --enable-tsync && make clean && make


I tried following the advice of this: https://stackoverflow.com/questions/3096989/libtool-version-mismatch-error but their solutions seem to not be working. Any ideas?
Back to top
View user's profile Send private message
UlFie
Tux's lil' helper
Tux's lil' helper


Joined: 01 Nov 2011
Posts: 112
Location: Wuppertal

PostPosted: Wed May 20, 2020 3:44 pm    Post subject: Re: Libtool Version Mismatch issue Reply with quote

Pita wrote:
Code:
phpize --clean && phpize && aclocal && libtoolize --force && autoheader && autoconf && ./configure --enable-tsync && make clean && make

Which of these 9 (nine!) commands is it that fails? Run them one by one, look at the output each of them yields up to the error (not the one on screen which seems to be empty; I would assume, they write out certain files), and tell us more!
Back to top
View user's profile Send private message
Pita
Tux's lil' helper
Tux's lil' helper


Joined: 09 Apr 2020
Posts: 101

PostPosted: Wed May 20, 2020 4:26 pm    Post subject: Reply with quote

It fails on the make. Here's the full output:
Code:

 phpize --clean && phpize && aclocal && libtoolize --force && autoheader && autoconf && ./configure --enable-tsync && make clean && make
Cleaning..
Configuring for:
PHP Api Version:         20190902
Zend Module Api No:      20190902
Zend Extension Api No:   320190902
autoconf-2.69: warning: both `configure.ac' and `configure.in' are present.
autoconf-2.69: warning: proceeding with `configure.ac'.
autoheader-2.69: 'configure.ac' and 'configure.in' both present.
autoheader-2.69: proceeding with 'configure.ac'
aclocal-1.16: warning: autoconf input should be named 'configure.ac', not 'configure.in'
aclocal-1.16: warning: 'configure.ac' and 'configure.in' both present.
aclocal-1.16: proceeding with 'configure.ac'
build/libtool.m4:274: warning: underquoted definition of _LT_AC_TRY_LINK
build/libtool.m4:274:   run info Automake 'Extending aclocal'
build/libtool.m4:274:   or see https://www.gnu.org/software/automake/manual/automake.html#Extending-aclocal
libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, 'build'.
libtoolize: linking file 'build/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.ac,
libtoolize: and rerunning libtoolize and aclocal.
libtoolize: Consider adding '-I m4' to ACLOCAL_AMFLAGS in Makefile.am.
autoheader-2.69: 'configure.ac' and 'configure.in' both present.
autoheader-2.69: proceeding with 'configure.ac'
autoconf-2.69: warning: both `configure.ac' and `configure.in' are present.
autoconf-2.69: warning: proceeding with `configure.ac'.
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for a sed that does not truncate output... /bin/sed
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for cc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking how to run the C preprocessor... cc -E
checking for icc... no
checking for suncc... no
checking for system library directory... lib
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
checking for PHP prefix... /usr/lib/php7.4
checking for PHP includes... -I/usr/lib/php7.4/include/php -I/usr/lib/php7.4/include/php/main -I/usr/lib/php7.4/include/php/TSRM -I/usr/lib/php7.4/include/php/Zend -I/usr/lib/php7.4/include/php/ext -I/usr/lib/php7.4/include/php/ext/date/lib
checking for PHP extension directory... /usr/lib/php7.4/lib/extensions/no-debug-non-zts-20190902
checking for PHP installed headers prefix... /usr/lib/php7.4/include/php
checking if debug is enabled... no
checking if zts is enabled... no
checking for gawk... gawk
checking whether to enable tsync support... yes, shared
checking for a sed that does not truncate output... /bin/sed
checking for ld used by cc... /usr/i686-pc-linux-gnu/bin/ld
checking if the linker (/usr/i686-pc-linux-gnu/bin/ld) is GNU ld... yes
checking for /usr/i686-pc-linux-gnu/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/bin/nm -B
checking whether ln -s works... yes
checking how to recognize dependent libraries... pass_all
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking the maximum length of command line arguments... 1572864
checking command to parse /usr/bin/nm -B output from cc object... ok
checking for objdir... .libs
checking for ar... ar
checking for ranlib... ranlib
checking for strip... strip
checking if cc supports -fno-rtti -fno-exceptions... no
checking for cc option to produce PIC... -fPIC
checking if cc PIC flag -fPIC works... yes
checking if cc static flag -static works... yes
checking if cc supports -c -o file.o... yes
checking whether the cc linker (/usr/i686-pc-linux-gnu/bin/ld) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no

creating libtool
appending configuration tag "CXX" to libtool
configure: patching config.h.in
configure: creating ./config.status
config.status: creating config.h
find . -name \*.gcno -o -name \*.gcda | xargs rm -f
find . -name \*.lo -o -name \*.o | xargs rm -f
find . -name \*.la -o -name \*.a | xargs rm -f
find . -name \*.so | xargs rm -f
find . -name .libs -a -type d|xargs rm -rf
rm -f libphp.la      modules/* libs/*
/bin/sh /usr/src/spectracom/phpext/tsync/libtool --mode=compile cc  -I. -I/usr/src/spectracom/phpext/tsync -DPHP_ATOM_INC -I/usr/src/spectracom/phpext/tsync/include -I/usr/src/spectracom/phpext/tsync/main -I/usr/src/spectracom/phpext/tsync -I/usr/lib/php7.4/include/php -I/usr/lib/php7.4/include/php/main -I/usr/lib/php7.4/include/php/TSRM -I/usr/lib/php7.4/include/php/Zend -I/usr/lib/php7.4/include/php/ext -I/usr/lib/php7.4/include/php/ext/date/lib -I/usr/src/spectracom/phpext/tsync/.. -I/usr/src/spectracom/tsync/lafayette/include -I/usr/src/spectracom/tsync/tsync/common/h -I/usr/src/spectracom/tsync/tsync/common/lib -I/usr/src/spectracom/tsync/tsync/common/tsync/lib -I/usr/src/spectracom/tsync/tsync/common/tsync/h -I/usr/src/spectracom/tsync/tsync/linux/h -I/usr/src/spectracom/tsync/tsync/linux/tsync/h -I/usr/src/spectracom/tsync/tsync/examples  -DHAVE_CONFIG_H  -g -O2 -DLAFAYETTE   -c /usr/src/spectracom/phpext/tsync/php_tsync.c -o php_tsync.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.
make: *** [Makefile:192: php_tsync.lo] Error 63

Back to top
View user's profile Send private message
UlFie
Tux's lil' helper
Tux's lil' helper


Joined: 01 Nov 2011
Posts: 112
Location: Wuppertal

PostPosted: Wed May 20, 2020 5:30 pm    Post subject: Reply with quote

It's never a good idea to ignore early warnings ;-) .

Pita wrote:
Code:
autoconf-2.69: warning: both `configure.ac' and `configure.in' are present.
autoheader-2.69: 'configure.ac' and 'configure.in' both present.
aclocal-1.16: warning: autoconf input should be named 'configure.ac', not 'configure.in'
aclocal-1.16: warning: 'configure.ac' and 'configure.in' both present.
build/libtool.m4:274: warning: underquoted definition of _LT_AC_TRY_LINK
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.ac,
libtoolize: Consider adding '-I m4' to ACLOCAL_AMFLAGS in Makefile.am.
autoheader-2.69: 'configure.ac' and 'configure.in' both present.
autoconf-2.69: warning: both `configure.ac' and `configure.in' are present.

I'd suggest fixing all that. Especially the suggested changes for aclocal.m4 sound important, it's that file which contains something the final error complains about.
Back to top
View user's profile Send private message
Pita
Tux's lil' helper
Tux's lil' helper


Joined: 09 Apr 2020
Posts: 101

PostPosted: Wed May 20, 2020 7:13 pm    Post subject: Reply with quote

I've fixed them all and I still get the same error
Back to top
View user's profile Send private message
GDH-gentoo
Veteran
Veteran


Joined: 20 Jul 2019
Posts: 1541
Location: South America

PostPosted: Wed May 20, 2020 7:50 pm    Post subject: Reply with quote

You could try looking at the output of find . -name '*.m4' -exec grep -E 'macro_(version|revision)' {} +, in the same directory you were running those commands, and see if there's anything resembling a version number that is not 2.4.6.

Also, I believe it is generally recommended to use the autoreconf command with suitable options instead of individually calling aclocal, autoheader, libtoolize and autoconf. See info autoreconf.
Back to top
View user's profile Send private message
Pita
Tux's lil' helper
Tux's lil' helper


Joined: 09 Apr 2020
Posts: 101

PostPosted: Wed May 20, 2020 8:05 pm    Post subject: Reply with quote

Code:

gentooSS /usr/src/spectracom/phpext/tsync # find . -name '*.m4' -exec grep -E 'macro_(version|revision)' {} +
grep: ./m4/ltsugar.m4: No such file or directory
grep: ./m4/ltversion.m4: No such file or directory
grep: ./m4/libtool.m4: No such file or directory
grep: ./m4/lt~obsolete.m4: No such file or directory
grep: ./m4/ltoptions.m4: No such file or directory
Back to top
View user's profile Send private message
GDH-gentoo
Veteran
Veteran


Joined: 20 Jul 2019
Posts: 1541
Location: South America

PostPosted: Wed May 20, 2020 9:25 pm    Post subject: Reply with quote

find finds .m4 files but grep says that they do not exist 8O? Fine, try grep -E 'macro_(version|revision)' m4/* and see if there's anything resembling a version number that is not 2.4.6. Is m4/ the only directory that contains .m4 files?
Back to top
View user's profile Send private message
UlFie
Tux's lil' helper
Tux's lil' helper


Joined: 01 Nov 2011
Posts: 112
Location: Wuppertal

PostPosted: Wed May 20, 2020 11:47 pm    Post subject: Reply with quote

GDH-gentoo wrote:
find finds .m4 files but grep says that they do not exist 8O?

They could be symlinks pointing to non-existing files. What does ls -Fla m4 say?
Back to top
View user's profile Send private message
Pita
Tux's lil' helper
Tux's lil' helper


Joined: 09 Apr 2020
Posts: 101

PostPosted: Thu May 21, 2020 12:01 pm    Post subject: Reply with quote

Code:
gentooSS /target/gentoo/usr/src/spectracom/phpext/tsync # grep -E 'macro_(version|revision)' m4/*
m4/ltversion.m4:[macro_version='2.4.6'
m4/ltversion.m4:macro_revision='2.4.6'
m4/ltversion.m4:_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
m4/ltversion.m4:_LT_DECL(, macro_revision, 0)


Code:
gentooSS /target/gentoo/usr/src/spectracom/phpext/tsync # ls -Fla m4
total 8
drwxrwxr-x 2 root root 4096 May 20 14:07 ./
drwxrwxr-x 7 root root 4096 May 20 15:12 ../
lrwxrwxrwx 1 root root   29 May 20 14:07 libtool.m4 -> /usr/share/aclocal/libtool.m4
lrwxrwxrwx 1 root root   33 May 20 14:07 lt~obsolete.m4 -> /usr/share/aclocal/lt~obsolete.m4
lrwxrwxrwx 1 root root   31 May 20 14:07 ltoptions.m4 -> /usr/share/aclocal/ltoptions.m4
lrwxrwxrwx 1 root root   29 May 20 14:07 ltsugar.m4 -> /usr/share/aclocal/ltsugar.m4
lrwxrwxrwx 1 root root   31 May 20 14:07 ltversion.m4 -> /usr/share/aclocal/ltversion.m4
Back to top
View user's profile Send private message
GDH-gentoo
Veteran
Veteran


Joined: 20 Jul 2019
Posts: 1541
Location: South America

PostPosted: Thu May 21, 2020 12:58 pm    Post subject: Reply with quote

Are you changing things between each post and not telling? That looks OK, post now the output of grep -E '(macro_version|_revision|VERSION=)' libtool in the same directory you ran the original commands.
Back to top
View user's profile Send private message
Pita
Tux's lil' helper
Tux's lil' helper


Joined: 09 Apr 2020
Posts: 101

PostPosted: Thu May 21, 2020 1:11 pm    Post subject: Reply with quote

I haven't changed anything
Code:

gentooSS /usr/src/spectracom/phpext/tsync #  grep -E '(macro_version|_revision|VERSION=)' libtool
VERSION=2.4.6
package_revision=2.4.6
    if test "$package_revision" != "$macro_revision"; then
      if test "$VERSION" != "$macro_version"; then
        if test -z "$macro_version"; then
$progname: definition of this LT_INIT comes from $PACKAGE $macro_version.
$progname: Version mismatch error.  This is $PACKAGE $VERSION, revision $package_revision,
$progname: but the definition of this LT_INIT comes from revision $macro_revision.
$progname: You should recreate aclocal.m4 with macros from revision $package_revision
  generated_by_libtool_version='$macro_version'
          number_revision=$3
            revision=$number_revision

Back to top
View user's profile Send private message
GDH-gentoo
Veteran
Veteran


Joined: 20 Jul 2019
Posts: 1541
Location: South America

PostPosted: Thu May 21, 2020 1:48 pm    Post subject: Reply with quote

OK, now post the output of phpize --clean && phpize && autoreconf --force --install --verbose --symlink && ./configure --enable-tsync, and then redo the previous grep command.
Back to top
View user's profile Send private message
Pita
Tux's lil' helper
Tux's lil' helper


Joined: 09 Apr 2020
Posts: 101

PostPosted: Thu May 21, 2020 2:37 pm    Post subject: Reply with quote

Code:
gentooSS /usr/src/spectracom/phpext/tsync # grep -E '(macro_version|_revision|VERSION=)' libtool
VERSION=2.4.6
package_revision=2.4.6
    if test "$package_revision" != "$macro_revision"; then
      if test "$VERSION" != "$macro_version"; then
        if test -z "$macro_version"; then
$progname: definition of this LT_INIT comes from $PACKAGE $macro_version.
$progname: Version mismatch error.  This is $PACKAGE $VERSION, revision $package_revision,
$progname: but the definition of this LT_INIT comes from revision $macro_revision.
$progname: You should recreate aclocal.m4 with macros from revision $package_revision
  generated_by_libtool_version='$macro_version'
          number_revision=$3
            revision=$number_revision
Back to top
View user's profile Send private message
UlFie
Tux's lil' helper
Tux's lil' helper


Joined: 01 Nov 2011
Posts: 112
Location: Wuppertal

PostPosted: Thu May 21, 2020 2:52 pm    Post subject: Reply with quote

Pita wrote:
I haven't changed anything
Code:
gentooSS /usr/src/spectracom/phpext/tsync #

Well, actually you seem to be moving around in different directories as previously you showed us
Code:
gentooSS /target/gentoo/usr/src/spectracom/phpext/tsync #

Is this some prefix install or chroot jail? Make sure your symlinks in m4/ actually point where they should, and if this is a chroot jail make sure that the relevant packages are installed and up to date inside of it (and not just in the outside system).
Back to top
View user's profile Send private message
GDH-gentoo
Veteran
Veteran


Joined: 20 Jul 2019
Posts: 1541
Location: South America

PostPosted: Thu May 21, 2020 3:05 pm    Post subject: Reply with quote

Whatever the cause is, something is not working well with the build system. The libtool script is generated by the configure script, which is generated in turn from other components. This is what the output of grep for a generated libtool script should look like:

Code:
$ grep -E '(macro_version|_revision|VERSION=)' libtool
macro_version=2.4.6
macro_revision=2.4.6
VERSION=2.4.6
package_revision=2.4.6
    if test "$package_revision" != "$macro_revision"; then
      if test "$VERSION" != "$macro_version"; then
        if test -z "$macro_version"; then
$progname: definition of this LT_INIT comes from $PACKAGE $macro_version.
$progname: Version mismatch error.  This is $PACKAGE $VERSION, revision $package_revision,
$progname: but the definition of this LT_INIT comes from revision $macro_revision.
$progname: You should recreate aclocal.m4 with macros from revision $package_revision
  generated_by_libtool_version='$macro_version'
     number_revision=$3
       revision=$number_revision

See the extra lines at the beginning? You don't have them, and with the information you posted so far, it's impossible to diagnose why.
Back to top
View user's profile Send private message
Pita
Tux's lil' helper
Tux's lil' helper


Joined: 09 Apr 2020
Posts: 101

PostPosted: Thu May 21, 2020 3:43 pm    Post subject: Reply with quote

What additional information do you need to help diagnose this? I'll post whatever you need
Back to top
View user's profile Send private message
GDH-gentoo
Veteran
Veteran


Joined: 20 Jul 2019
Posts: 1541
Location: South America

PostPosted: Thu May 21, 2020 4:31 pm    Post subject: Reply with quote

You didn't post the requested output. This would provide better information about what the build system is doing before starting to compile.

GDH-gentoo wrote:
OK, now post the output of phpize --clean && phpize && autoreconf --force --install --verbose --symlink && ./configure --enable-tsync
Back to top
View user's profile Send private message
Pita
Tux's lil' helper
Tux's lil' helper


Joined: 09 Apr 2020
Posts: 101

PostPosted: Thu May 21, 2020 4:33 pm    Post subject: Reply with quote

Code:

gentooSS /usr/src/spectracom/phpext/tsync # phpize --clean && phpize && autoreconf --force --install --verbose --symlink && ./configure --enable-tsync
Cleaning..
Configuring for:
PHP Api Version:         20190902
Zend Module Api No:      20190902
Zend Extension Api No:   320190902
autoconf-2.69: warning: both `configure.ac' and `configure.in' are present.
autoconf-2.69: warning: proceeding with `configure.ac'.
autoheader-2.69: 'configure.ac' and 'configure.in' both present.
autoheader-2.69: proceeding with 'configure.ac'
autoreconf-2.69: 'configure.ac' and 'configure.in' both present.
autoreconf-2.69: proceeding with 'configure.ac'
autoreconf-2.69: Entering directory `.'
autoreconf-2.69: configure.ac: not using Gettext
autoreconf-2.69: running: aclocal --force
aclocal-1.16: warning: autoconf input should be named 'configure.ac', not 'configure.in'
aclocal-1.16: warning: 'configure.ac' and 'configure.in' both present.
aclocal-1.16: proceeding with 'configure.ac'
build/libtool.m4:274: warning: underquoted definition of _LT_AC_TRY_LINK
build/libtool.m4:274:   run info Automake 'Extending aclocal'
build/libtool.m4:274:   or see https://www.gnu.org/software/automake/manual/automake.html#Extending-aclocal
autoreconf-2.69: configure.ac: tracing
autoconf-2.69: warning: both `configure.ac' and `configure.in' are present.
autoconf-2.69: warning: proceeding with `configure.ac'.
autoreconf-2.69: running: libtoolize --force
libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, 'build'.
libtoolize: linking file 'build/ltmain.sh'
libtoolize: warning: no serial number on '/usr/share/aclocal/libtool.m4', not copying.
libtoolize: warning: no serial number on '/usr/share/aclocal/ltoptions.m4', not copying.
libtoolize: warning: no serial number on '/usr/share/aclocal/ltsugar.m4', not copying.
libtoolize: warning: no serial number on '/usr/share/aclocal/ltversion.m4', not copying.
libtoolize: warning: no serial number on '/usr/share/aclocal/lt~obsolete.m4', not copying.
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.ac,
libtoolize: and rerunning libtoolize and aclocal.
libtoolize: Consider adding '-I m4' to ACLOCAL_AMFLAGS in Makefile.am.
aclocal-1.16: warning: autoconf input should be named 'configure.ac', not 'configure.in'
aclocal-1.16: warning: 'configure.ac' and 'configure.in' both present.
aclocal-1.16: proceeding with 'configure.ac'
build/libtool.m4:274: warning: underquoted definition of _LT_AC_TRY_LINK
build/libtool.m4:274:   run info Automake 'Extending aclocal'
build/libtool.m4:274:   or see https://www.gnu.org/software/automake/manual/automake.html#Extending-aclocal
autoreconf-2.69: running: /usr/bin/autoconf-2.69 --force
autoconf-2.69: warning: both `configure.ac' and `configure.in' are present.
autoconf-2.69: warning: proceeding with `configure.ac'.
autoreconf-2.69: running: /usr/bin/autoheader-2.69 --force
autoheader-2.69: 'configure.ac' and 'configure.in' both present.
autoheader-2.69: proceeding with 'configure.ac'
autoreconf-2.69: configure.ac: not using Automake
autoreconf-2.69: Leaving directory `.'
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for a sed that does not truncate output... /bin/sed
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for cc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking how to run the C preprocessor... cc -E
checking for icc... no
checking for suncc... no
checking for system library directory... lib
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
checking for PHP prefix... /usr/lib/php7.4
checking for PHP includes... -I/usr/lib/php7.4/include/php -I/usr/lib/php7.4/include/php/main -I/usr/lib/php7.4/include/php/TSRM -I/usr/lib/php7.4/include/php/Zend -I/usr/lib/php7.4/include/php/ext -I/usr/lib/php7.4/include/php/ext/date/lib
checking for PHP extension directory... /usr/lib/php7.4/lib/extensions/no-debug-non-zts-20190902
checking for PHP installed headers prefix... /usr/lib/php7.4/include/php
checking if debug is enabled... no
checking if zts is enabled... no
checking for gawk... gawk
checking whether to enable tsync support... yes, shared
checking for a sed that does not truncate output... /bin/sed
checking for ld used by cc... /usr/i686-pc-linux-gnu/bin/ld
checking if the linker (/usr/i686-pc-linux-gnu/bin/ld) is GNU ld... yes
checking for /usr/i686-pc-linux-gnu/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/bin/nm -B
checking whether ln -s works... yes
checking how to recognize dependent libraries... pass_all
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking the maximum length of command line arguments... 1572864
checking command to parse /usr/bin/nm -B output from cc object... ok
checking for objdir... .libs
checking for ar... ar
checking for ranlib... ranlib
checking for strip... strip
checking if cc supports -fno-rtti -fno-exceptions... no
checking for cc option to produce PIC... -fPIC
checking if cc PIC flag -fPIC works... yes
checking if cc static flag -static works... yes
checking if cc supports -c -o file.o... yes
checking whether the cc linker (/usr/i686-pc-linux-gnu/bin/ld) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no

creating libtool
appending configuration tag "CXX" to libtool
configure: patching config.h.in
configure: creating ./config.status
config.status: creating config.h
Back to top
View user's profile Send private message
GDH-gentoo
Veteran
Veteran


Joined: 20 Jul 2019
Posts: 1541
Location: South America

PostPosted: Thu May 21, 2020 5:28 pm    Post subject: Reply with quote

Pita wrote:
Code:
build/libtool.m4:274: warning: underquoted definition of _LT_AC_TRY_LINK
build/libtool.m4:274:   run info Automake 'Extending aclocal'
build/libtool.m4:274:   or see https://www.gnu.org/software/automake/manual/automake.html#Extending-aclocal
...
libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, 'build'.
libtoolize: linking file 'build/ltmain.sh'
Is there a build/ subdirectory there? If yes, what is its content?

Pita wrote:
Code:
libtoolize: warning: no serial number on '/usr/share/aclocal/libtool.m4', not copying.
libtoolize: warning: no serial number on '/usr/share/aclocal/ltoptions.m4', not copying.
libtoolize: warning: no serial number on '/usr/share/aclocal/ltsugar.m4', not copying.
libtoolize: warning: no serial number on '/usr/share/aclocal/ltversion.m4', not copying.
libtoolize: warning: no serial number on '/usr/share/aclocal/lt~obsolete.m4', not copying.
Oh? What's the output of grep '# serial' m4/*? For Libtool 2.4.6 it should be:

Code:
m4/libtool.m4:# serial 58 LT_INIT
m4/lt~obsolete.m4:# serial 5 lt~obsolete.m4
m4/ltoptions.m4:# serial 8 ltoptions.m4
m4/ltsugar.m4:# serial 6 ltsugar.m4
m4/ltversion.m4:# serial 4179 ltversion.m4
Back to top
View user's profile Send private message
Pita
Tux's lil' helper
Tux's lil' helper


Joined: 09 Apr 2020
Posts: 101

PostPosted: Thu May 21, 2020 5:50 pm    Post subject: Reply with quote

GDH-gentoo wrote:
Pita wrote:
Code:
build/libtool.m4:274: warning: underquoted definition of _LT_AC_TRY_LINK
build/libtool.m4:274:   run info Automake 'Extending aclocal'
build/libtool.m4:274:   or see https://www.gnu.org/software/automake/manual/automake.html#Extending-aclocal
...
libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, 'build'.
libtoolize: linking file 'build/ltmain.sh'
Is there a build/ subdirectory there? If yes, what is its content?

Pita wrote:
Code:
libtoolize: warning: no serial number on '/usr/share/aclocal/libtool.m4', not copying.
libtoolize: warning: no serial number on '/usr/share/aclocal/ltoptions.m4', not copying.
libtoolize: warning: no serial number on '/usr/share/aclocal/ltsugar.m4', not copying.
libtoolize: warning: no serial number on '/usr/share/aclocal/ltversion.m4', not copying.
libtoolize: warning: no serial number on '/usr/share/aclocal/lt~obsolete.m4', not copying.
Oh? What's the output of grep '# serial' m4/*? For Libtool 2.4.6 it should be:

Code:
m4/libtool.m4:# serial 58 LT_INIT
m4/lt~obsolete.m4:# serial 5 lt~obsolete.m4
m4/ltoptions.m4:# serial 8 ltoptions.m4
m4/ltsugar.m4:# serial 6 ltsugar.m4
m4/ltversion.m4:# serial 4179 ltversion.m4


Code:
gentooSS /usr/src/spectracom/phpext/tsync # ls build
ax_check_compile_flag.m4  config.guess  libtool.m4  Makefile.global            php.m4  shtool
ax_gcc_func_attribute.m4  config.sub    ltmain.sh   php_cxx_compile_stdcxx.m4  pkg.m4


Code:

gentooSS /usr/src/spectracom/phpext/tsync # grep '# serial' m4/*
grep: m4/libtool.m4: No such file or directory
grep: m4/lt~obsolete.m4: No such file or directory
grep: m4/ltoptions.m4: No such file or directory
grep: m4/ltsugar.m4: No such file or directory
grep: m4/ltversion.m4: No such file or directory
Back to top
View user's profile Send private message
GDH-gentoo
Veteran
Veteran


Joined: 20 Jul 2019
Posts: 1541
Location: South America

PostPosted: Thu May 21, 2020 6:14 pm    Post subject: Reply with quote

Pita wrote:
Code:
# grep '# serial' m4/*
grep: m4/libtool.m4: No such file or directory
grep: m4/lt~obsolete.m4: No such file or directory
grep: m4/ltoptions.m4: No such file or directory
grep: m4/ltsugar.m4: No such file or directory
grep: m4/ltversion.m4: No such file or directory

Pita wrote:
Code:
# ls -Fla m4
total 8
drwxrwxr-x 2 root root 4096 May 20 14:07 ./
drwxrwxr-x 7 root root 4096 May 20 15:12 ../
lrwxrwxrwx 1 root root   29 May 20 14:07 libtool.m4 -> /usr/share/aclocal/libtool.m4
lrwxrwxrwx 1 root root   33 May 20 14:07 lt~obsolete.m4 -> /usr/share/aclocal/lt~obsolete.m4
lrwxrwxrwx 1 root root   31 May 20 14:07 ltoptions.m4 -> /usr/share/aclocal/ltoptions.m4
lrwxrwxrwx 1 root root   29 May 20 14:07 ltsugar.m4 -> /usr/share/aclocal/ltsugar.m4
lrwxrwxrwx 1 root root   31 May 20 14:07 ltversion.m4 -> /usr/share/aclocal/ltversion.m4

Are these dangling symlinks? I.e. do the files they point to actually exist? Have you read UlFie's post and checked?
UlFie wrote:
Is this some prefix install or chroot jail? Make sure your symlinks in m4/ actually point where they should, and if this is a chroot jail make sure that the relevant packages are installed and up to date inside of it (and not just in the outside system).

How did this even succeed before?
Pita wrote:
Code:
# grep -E 'macro_(version|revision)' m4/*
m4/ltversion.m4:[macro_version='2.4.6'
m4/ltversion.m4:macro_revision='2.4.6'
m4/ltversion.m4:_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
m4/ltversion.m4:_LT_DECL(, macro_revision, 0)
Back to top
View user's profile Send private message
UlFie
Tux's lil' helper
Tux's lil' helper


Joined: 01 Nov 2011
Posts: 112
Location: Wuppertal

PostPosted: Thu May 21, 2020 6:58 pm    Post subject: Reply with quote

GDH-gentoo wrote:
How did this even succeed before?

That was in a subdirectory of /target/gentoo! The outside system has the files the symlinks point to in /usr/share/aclocal , what must be a chroot jail does not (i.e. these files do not exist in /target/gentoo/usr/share/aclocal of the outside system).
Back to top
View user's profile Send private message
GDH-gentoo
Veteran
Veteran


Joined: 20 Jul 2019
Posts: 1541
Location: South America

PostPosted: Thu May 21, 2020 7:16 pm    Post subject: Reply with quote

UlFie wrote:
That was in a subdirectory of /target/gentoo! The outside system has the files the symlinks point to in /usr/share/aclocal , what must be a chroot jail does not (i.e. these files do not exist in /target/gentoo/usr/share/aclocal of the outside system).
Ah, that's a good observation.
Back to top
View user's profile Send private message
thammer
n00b
n00b


Joined: 14 May 2020
Posts: 15

PostPosted: Wed Jun 17, 2020 7:19 pm    Post subject: Reply with quote

After dealing with a few other items in this upgrade saga, I am back to this issue. As a summary, at this step we are building some PHP extension code and have experienced a failure due to "macro_revision" not being defined in the generated libtool script.
My biggest frustration is that this occurs randomly in the pre-upgrade environment (if I just run the build multiple times, it will eventually succeed). When we first encountered it during this upgrade process it was happening every time. One person found that by deleting a backup file ({something}~) in the directory it started working.
I have since "started" over with the upgrade process and now seem to be back to it happening every time I try to build.


As you all have gleaned, the build is done in a chroot jail (and unfortunately some of the previous posts jumped back and forth between the host and the chroot environments). I will make all references and commands from within the chroot jail from here on.

After a hint in another libtool issue thread, I realized that the ltmain.sh in /usr/lib/php7.4/lib/build/ was VERSION=1.5.6. After resolving that other issue, I re-emerged dev-lang/php thinking it would resolve this issue. However, that file still is 1.5.6. (and I confirmed that it is actually coming from the php-7.4.6 tarball that emerge is using).
Still thinking it might be related, I copied the 2.4.6 ltmain.sh file from /usr/share/libtool/build-aux/ to /usr/lib/php7.4/lib/build/ but it made no difference.
So, I am back to still trying to figure this out the hard way...


I am stepping through the individual commands in build line that was originally posted trying to determine where things go awry, but have yet to locate it. The phpize step creates the build/ directory with (most of?) the m4 files and some others including ltmain.sh which shows VERSION=2.4.6.

The aclocal step still shows the warning:
Code:

gentooSS /usr/src/spectracom/phpext/tsync # aclocal
build/libtool.m4:274: warning: underquoted definition of _LT_AC_TRY_LINK
build/libtool.m4:274:   run info Automake 'Extending aclocal'
build/libtool.m4:274:   or see https://www.gnu.org/software/automake/manual/automake.html#Extending-aclocal

This could be a real issue, but I do not understand how it is being caused at that variable only occurs in generated files.

Similarly, the libtoolize step still has warnings:
Code:

gentooSS /usr/src/spectracom/phpext/tsync # libtoolize --force
libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, 'build'.
libtoolize: linking file 'build/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.ac,
libtoolize: and rerunning libtoolize and aclocal.
libtoolize: Consider adding '-I m4' to ACLOCAL_AMFLAGS in Makefile.am.

I created aclocal.m4 with all of that content in this directory, but still get those messages. Should it be in another location?
But again, I do not understand what is actually going on. Since phpize creates build/libtool.m4, what did it use to create that if not /usr/share/aclocal/libtool.m4? And could there be conflicts between the two?

The ./configure step does not indicate any issues. libtool is created and shows VERSION=2.4.6 but does not have a macro_version or macro_revision defined.
And then, unsurprisingly, we get the libtool error:
Code:

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.

I am not sure what "You should recreate aclocal.m4 with macros from libtool 2.4.6". Do I have to put the macro_version and macro_revision in aclocal.m4? Seems like that will be a maintenance hassle (at a minimum).


GDH-gentoo wrote:
OK, now post the output of phpize --clean && phpize && autoreconf --force --install --verbose --symlink && ./configure --enable-tsync

I ran the autoreconf command in place of 'aclocal && libtoolize --force && autoheader && autoconf'. The generated libtool still does not have macro_version or macro_revision and we still get the version mismatch error.


Any further thoughts or suggestions will be greatly appreciated.
_________________
--
.Tim
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum