Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 527506 - dev-libs/apr-1.5.1-r1 with =sys-devel/libtool-2.4.3 - libtool: Version mismatch error. This is libtool 2.4.3, but the definition of this LT_INIT comes from libtool 2.4.2.
Summary: dev-libs/apr-1.5.1-r1 with =sys-devel/libtool-2.4.3 - libtool: Version mismat...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: AMD64 Linux
: Normal normal with 1 vote (vote)
Assignee: Lars Wendler (Polynomial-C) (RETIRED)
URL:
Whiteboard:
Keywords:
: 527924 (view as bug list)
Depends on:
Blocks: 529580
  Show dependency tree
 
Reported: 2014-10-30 17:34 UTC by Timo Gurr (RETIRED)
Modified: 2015-01-12 14:21 UTC (History)
16 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (build.log,36.91 KB, text/plain)
2014-10-30 17:34 UTC, Timo Gurr (RETIRED)
Details
patch for apr to work with libtool 2.4.3 (apr-1.5.1-libtool-2.4.3.patch,307.14 KB, patch)
2014-11-01 13:08 UTC, Klemen Mihevc
Details | Diff
fixed .ebuild with simple sed to change libtool version (apr-1.5.1-r1.ebuild,4.27 KB, text/plain)
2014-11-02 12:29 UTC, Klemen Mihevc
Details
apr-1.5.0-r2.ebuild.patch (apr-1.5.0-r2.ebuild.patch,288 bytes, patch)
2014-11-11 09:24 UTC, Alexander Tsoy
Details | Diff
autotools.eclass.patch (autotools.eclass.patch,317 bytes, patch)
2014-11-13 19:06 UTC, Alexander Tsoy
Details | Diff
autotools.eclass.patch (autotools.eclass.patch,325 bytes, patch)
2014-11-14 10:40 UTC, Alexander Tsoy
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Timo Gurr (RETIRED) gentoo-dev 2014-10-30 17:34:37 UTC
[...]
Makefile:134: recipe for target 'tools/gen_test_char.lo' failed
make[1]: *** [tools/gen_test_char.lo] Error 63
make[1]: *** Waiting for unfinished jobs....
libtool: Version mismatch error.  This is libtool 2.4.3, but the
libtool: definition of this LT_INIT comes from libtool 2.4.2.
libtool: You should recreate aclocal.m4 with macros from libtool 2.4.3
libtool: and run autoconf again.
[...]

Portage 2.2.14 (python 3.3.5-final-0, default/linux/amd64/13.0, gcc-4.8.3, glibc-2.19-r1, 3.17.1-gentoo-r1 x86_64)
=================================================================
System uname: Linux-3.17.1-gentoo-r1-x86_64-Quad-Core_AMD_Opteron-tm-_Processor_2376-with-gentoo-2.2
KiB Mem:     4050928 total,    399188 free
KiB Swap:     530140 total,    530140 free
Timestamp of tree: Thu, 30 Oct 2014 16:45:01 +0000
ld GNU ld (GNU Binutils) 2.24
app-shells/bash:          4.3_p30
dev-java/java-config:     2.2.0
dev-lang/perl:            5.20.1-r2
dev-lang/python:          2.7.8, 3.3.5-r1, 3.4.1
dev-util/cmake:           3.0.2
dev-util/pkgconfig:       0.28-r2
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.13.2
sys-apps/sandbox:         2.6-r1
sys-devel/autoconf:       2.69
sys-devel/automake:       1.14.1
sys-devel/binutils:       2.24-r3
sys-devel/gcc:            4.8.3
sys-devel/gcc-config:     1.8
sys-devel/libtool:        2.4.3
sys-devel/make:           4.1-r1
sys-kernel/linux-headers: 3.17 (virtual/os-headers)
sys-libs/glibc:           2.19-r1

Complete build.log attached.

Reproducible: Always
Comment 1 Timo Gurr (RETIRED) gentoo-dev 2014-10-30 17:34:59 UTC
Created attachment 387822 [details]
build.log
Comment 2 Jeroen Roovers (RETIRED) gentoo-dev 2014-10-30 19:09:22 UTC

*** This bug has been marked as a duplicate of bug 527200 ***
Comment 3 Klemen Mihevc 2014-11-01 12:25:47 UTC
Same issue with sys-devel/libtool-2.4.3-r1
Comment 4 Klemen Mihevc 2014-11-01 13:08:55 UTC
Created attachment 387946 [details, diff]
patch for apr to work with libtool 2.4.3

took ltmain.sh and ltversion.m4 from libtool 2.4.3, fixed configure and created diff... however it must be some other way to fix this?
Comment 5 Rafał Mużyło 2014-11-02 07:39:01 UTC
*** Bug 527924 has been marked as a duplicate of this bug. ***
Comment 6 Klemen Mihevc 2014-11-02 12:29:11 UTC
Created attachment 388328 [details]
fixed .ebuild with simple sed to change libtool version

No need for that patch, since ebuild it self takes care for ltmain.sh and ltversion.m4... only needs fixing libtool version inside configure, for which simple sed is enough.
Comment 7 Karl Lindén 2014-11-02 16:49:47 UTC
The source includes a small script to prepare for building that can be invoked with "./buildconf". The script runs a python script so a python dependency has to be added. Running the script before building fixes this bug. Here is a patch that fixes the bug.
--- apr-1.5.1-r1.ebuild	2014-04-28 15:26:43.000000000 +0200
+++ apr-1.5.1-r2.ebuild	2014-11-02 17:41:03.739967990 +0100
@@ -4,7 +4,8 @@
 
 EAPI=5
 
-inherit autotools eutils libtool multilib toolchain-funcs
+PYTHON_COMPAT=( python2_7 )
+inherit autotools eutils libtool multilib python-any-r1 toolchain-funcs
 
 DESCRIPTION="Apache Portable Runtime Library"
 HOMEPAGE="http://apr.apache.org/"
@@ -18,6 +19,7 @@
 RDEPEND="elibc_glibc? ( >=sys-apps/util-linux-2.16 )
 	elibc_mintlib? ( >=sys-apps/util-linux-2.18 )"
 DEPEND="${RDEPEND}
+	${PYTHON_DEPS}
 	>=sys-devel/libtool-2.4.2
 	doc? ( app-doc/doxygen )"
 
@@ -32,6 +34,20 @@
 
 	epatch_user #449048
 
+	python_fix_shebang build/gen-build.py
+	ebegin "Running ./buildconf"
+	./buildconf >> "${T}/buildconf.log" 2>&1
+	if ! eend $? ; then
+		echo
+		eerror "Failed Running ./buildconf !"
+		eerror
+		eerror "Include in your bugreport the contents of:"
+		eerror
+		eerror "  ${T}/buildconf.log"
+		echo
+		die "Failed Running ./buildconf !"
+	fi
+
 	AT_M4DIR="build" eautoreconf
 	elibtoolize
Comment 8 Rafał Mużyło 2014-11-03 02:15:30 UTC
...:sigh:...

For various reasons - some of them have even been noted in older dev-libs/apr bugs - buildconf is not to be used by the ebuild.

Also, that script should (more or less) have the same result (at least wrt. to libtool) as eautoreconf.


Funny thing - it seems I can't reproduce this outside portage:

libtoolize --copy --force
aclocal -I build
autoconf -I build
autoheader -I build

results in a correctly updated tarball.

So, is build/ltversion.m4 after src_prepare one from libtool 2.4.3 ?

The weird part is that no aclocal.m4 is being created and build/ltversion.m4 is just about explicitly updated by libtoolize, so there should be no source for the stale macro.
Comment 9 Toralf Förster gentoo-dev 2014-11-09 14:53:38 UTC
FWIW, this bug do affect older ebuild versions  too, eg =dev-libs/apr-1.5.0-r2::gentoo
Comment 10 Alexander Tsoy 2014-11-10 07:50:48 UTC
Hmm.. libtool bug?


ltversion.m4 from libtool 2.4.2:

m4_define([LT_PACKAGE_VERSION], [2.4.2])
m4_define([LT_PACKAGE_REVISION], [1.3337])

AC_DEFUN([LTVERSION_VERSION],
[macro_version='2.4.2'
macro_revision='1.3337'
_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
_LT_DECL(, macro_revision, 0)
])


ltversion.m4 from libtool 2.4.3:

m4_define([LT_PACKAGE_VERSION], [2.4.2.458.26-92994])
m4_define([LT_PACKAGE_REVISION], [2.4.3])

AC_DEFUN([LTVERSION_VERSION],
[macro_version='2.4.2.458.26-92994'
macro_revision='2.4.3'
_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
_LT_DECL(, macro_revision, 0)
])
Comment 11 Alexander Tsoy 2014-11-10 15:03:22 UTC
Yeah. libtool's upstream released broken tarball. After running bootstrap ltversion.m4 looks fine:

m4_define([LT_PACKAGE_VERSION], [2.4.3])
m4_define([LT_PACKAGE_REVISION], [2.4.3])

AC_DEFUN([LTVERSION_VERSION],
[macro_version='2.4.3'
macro_revision='2.4.3'
_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
_LT_DECL(, macro_revision, 0)
])
Comment 12 Alexander Tsoy 2014-11-10 22:05:13 UTC
Err.. Please ignore my comments. Fixing ltversion.m4 in libtool doesn't fix apr.
Comment 13 Alexander Tsoy 2014-11-11 09:24:04 UTC
Created attachment 389064 [details, diff]
apr-1.5.0-r2.ebuild.patch

Run libtoolize before regenerating configure. Not sure why eautoreconf does not do that. This patch fixes build error.
Comment 14 Austin English (RETIRED) gentoo-dev 2014-11-11 22:59:56 UTC
(In reply to Alexander Tsoy from comment #13)
> Created attachment 389064 [details, diff] [details, diff]
> apr-1.5.0-r2.ebuild.patch
> 
> Run libtoolize before regenerating configure. Not sure why eautoreconf does
> not do that. This patch fixes build error.

The patch works for dev-libs/apr-1.5.1-r1 as well for me, with libtool-2.4.3-r2.
Comment 15 Xavier Miller (RETIRED) gentoo-dev 2014-11-13 17:59:06 UTC
The patch adding _elibtoolize works for me
Comment 16 Alexander Tsoy 2014-11-13 19:06:40 UTC
Created attachment 389256 [details, diff]
autotools.eclass.patch

(In reply to Alexander Tsoy from comment #13)
> Created attachment 389064 [details, diff] [details, diff]
> apr-1.5.0-r2.ebuild.patch
> 
> Run libtoolize before regenerating configure. Not sure why eautoreconf does
> not do that. This patch fixes build error.

Actually eautoreconf() also calls _elibtoolize(), but (probably) autotools_check_macro() from autotools.eclass generates autom4te.cache before _elibtoolize() is called. Autoconf uses that cache to generate configure instead of reading updated m4 files. Attached patch for autotools.eclass also fixes this bug.
Comment 17 Alexander Tsoy 2014-11-13 19:15:13 UTC
Note that the patch I've attached for autotools.eclass is just a PoC. Maybe cache should be better removed in eautoreconf() instead.

@base-system: What do you think? How this bug should be fixed? By adding _elibtoolize in ebuild or by removing autom4te.cache in autotools.eclass?
Comment 18 Alexander Tsoy 2014-11-14 10:40:29 UTC
Created attachment 389294 [details, diff]
autotools.eclass.patch

Sorry, I forgot about --force
Comment 19 Carter Young 2014-11-15 19:50:46 UTC
Added myself as I'm experiencing same issue, even with:
make[1]: Entering directory '/var/tmp/portage/dev-libs/apr-1.5.1-r1/work/apr-1.5.1'
/var/tmp/portage/dev-libs/apr-1.5.1-r1/work/apr-1.5.1/build/mkdir.sh tools
/bin/sh /var/tmp/portage/dev-libs/apr-1.5.1-r1/work/apr-1.5.1/libtool --silent --mode=compile x86_64-pc-linux-gnu-gcc -pthread  -march=amdfam10 -O2 -pipe -DHAVE_CONFIG_H  -DLINUX -D_REENTRANT -D_GNU_SOURCE   -I./include -I/var/tmp/portage/dev-libs/apr-1.5.1-r1/work/apr-1.5.1/include/arch/unix -I./include/arch/unix -I/var/tmp/portage/dev-libs/apr-1.5.1-r1/work/apr-1.5.1/include/arch/unix -I/var/tmp/portage/dev-libs/apr-1.5.1-r1/work/apr-1.5.1/include -I/var/tmp/portage/dev-libs/apr-1.5.1-r1/work/apr-1.5.1/include/private -I/var/tmp/portage/dev-libs/apr-1.5.1-r1/work/apr-1.5.1/include/private  -o tools/gen_test_char.lo -c tools/gen_test_char.c && touch tools/gen_test_char.lo
libtool: Version mismatch error.  This is libtool 2.4.3, but the
libtool: definition of this LT_INIT comes from libtool 2.4.2.
libtool: You should recreate aclocal.m4 with macros from libtool 2.4.3
libtool: and run autoconf again.
Makefile:134: recipe for target 'tools/gen_test_char.lo' failed
make[1]: *** [tools/gen_test_char.lo] Error 63
make[1]: Leaving directory '/var/tmp/portage/dev-libs/apr-1.5.1-r1/work/apr-1.5.1'
/var/tmp/portage/dev-libs/apr-1.5.1-r1/work/apr-1.5.1/build/apr_rules.mk:118: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1
 * ERROR: dev-libs/apr-1.5.1-r1::gentoo failed (compile phase):
 *   emake failed


I need libtool 2.4.3.  I cannot downgrade etc, so would someone commit this to the tree
Comment 20 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2014-11-15 20:45:12 UTC
+  15 Nov 2014; Lars Wendler <polynomial-c@gentoo.org> apr-1.5.1-r1.ebuild:
+  Added kludge to fix compilation with >=libtool-2.4.3 until autotools.eclass
+  got fixed (bug #527506).
+

Keeping this bug open until autotools.eclass got fixed.
Comment 21 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2015-01-12 14:21:25 UTC
+  12 Jan 2015; Lars Wendler <polynomial-c@gentoo.org> autotools.eclass:
+  Use "--force" when running eautoconf through eautoreconf (bug #527506).
+