Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 492640 - libtool.eclass: uclibc-conf patches fails to apply for multiple packages when running elibtoolize
Summary: libtool.eclass: uclibc-conf patches fails to apply for multiple packages when...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-11-26 21:27 UTC by Anthony Basile
Modified: 2013-12-05 16:52 UTC (History)
0 users

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


Attachments
updated patch (uclibc-conf.patch,1.22 KB, patch)
2013-11-26 21:55 UTC, Anthony Basile
Details | Diff
Remove the warning for uclibc is patching fails. (libtool.eclass-remove-uclibc-warning.patch,424 bytes, patch)
2013-12-03 21:56 UTC, Anthony Basile
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Anthony Basile gentoo-dev 2013-11-26 21:27:58 UTC
When building uclibc stage1's, you get a bunch of warning of the form:

 * Messages for package sys-apps/file-5.12-r1 merged to /tmp/stage1root/:

 *   uClibc patch set 'uclibc-conf' failed to apply!

This is coming from the patches applied by elibtoolize at

   $PORTDIR/eclass/ELT-patches/uclibc-conf/{1.2.0,1.3.0c}

Its easy to confirm that these fail if you try to apply them manually.

The build succeed despite the fact that the patch fails.  Other patches succeed.

Reproducible: Always
Comment 1 Anthony Basile gentoo-dev 2013-11-26 21:55:28 UTC
Created attachment 364036 [details, diff]
updated patch

These patches date back to 2005 so I'm not even sure what the numbers 1.2.0 or 1.3.0c refer to.  Nonetheless, hunk 2 seems to have no equivalent in the newer configure scripts and it was just there for even older configure scripts, so it might have been simply dropped by upstream.

For what its worth, this is the updated patch.
Comment 2 SpanKY gentoo-dev 2013-11-28 21:02:46 UTC
(In reply to Anthony Basile from comment #1)

the versions reflect the *libtool* version they're attempting to patch.  the whole point of elibtoolize is to not require the latest libtool version, nor require re-running of autotools.

i'm not sure these patches are needed with newer libtool versions.  iirc, the newer libtool versions "just work" for uclibc targets.
Comment 3 Anthony Basile gentoo-dev 2013-11-29 01:56:45 UTC
(In reply to SpanKY from comment #2)
> (In reply to Anthony Basile from comment #1)
> 
> the versions reflect the *libtool* version they're attempting to patch.  the
> whole point of elibtoolize is to not require the latest libtool version, nor
> require re-running of autotools.
> 
> i'm not sure these patches are needed with newer libtool versions.  iirc,
> the newer libtool versions "just work" for uclibc targets.

I'm pretty sure they do.  I'll test.
Comment 4 Anthony Basile gentoo-dev 2013-11-30 18:52:04 UTC
(In reply to Anthony Basile from comment #3)
> (In reply to SpanKY from comment #2)
> > (In reply to Anthony Basile from comment #1)
> > 
> > the versions reflect the *libtool* version they're attempting to patch.  the
> > whole point of elibtoolize is to not require the latest libtool version, nor
> > require re-running of autotools.
> > 
> > i'm not sure these patches are needed with newer libtool versions.  iirc,
> > the newer libtool versions "just work" for uclibc targets.
> 
> I'm pretty sure they do.  I'll test.

1) This bug was triggered by the last commit

----------------------------
revision 1.107
date: 2013-11-22 04:05:55 -0500;  author: haubi;  state: Exp;  lines: +84 -89;  commitid: a50528f1e3b4567;
libtool.eclass elibtoolize(): Besides ltmain.sh, explicitly locate configure
to apply patches rather than guessing based on where ltmain.sh was found.
----------------------------

2) The uclibc-conf patch is not needed for any of the in-tree versions of libtool and its just works for uclibc.


I recommend we just remove it:

1) cvs rm eclass/ELT-patches/uclibc-conf/{1.2.0,1.3.0c}

2) We apply the following patch to libtool.eclass

diff -Nuar /usr/portage/eclass/libtool.eclass eclass/libtool.eclass
--- /usr/portage/eclass/libtool.eclass	2013-11-22 09:31:16.000000000 +0000
+++ eclass/libtool.eclass	2013-11-30 17:59:39.990179604 +0000
@@ -185,7 +185,7 @@
 		esac
 	done
 
-	[[ ${do_uclibc} == "yes" ]] && elt_patches+=" uclibc-conf uclibc-ltconf"
+	[[ ${do_uclibc} == "yes" ]] && elt_patches+=" uclibc-ltconf"
 
 	case ${CHOST} in
 		*-aix*)     elt_patches+=" hardcode aixrtl aix-noundef" ;; #213277
@@ -375,12 +375,6 @@
 			ret=0
 
 			case ${p} in
-				uclibc-conf)
-					if grep -qs 'Transform linux' "${d}/configure" ; then
-						ELT_walk_patches "${d}/configure" "${p}"
-						ret=$?
-					fi
-					;;
 				fbsd-conf)
 					if grep -qs 'version_type=freebsd-' "${d}/configure" ; then
 						ELT_walk_patches "${d}/configure" "${p}"
Comment 5 Anthony Basile gentoo-dev 2013-11-30 19:23:07 UTC
Sorry for the wrap in the patch on the previous post.

Actually, we don't need either uclibc-conf or uclibc-ltconf patches, so we could go even further and remove all special treatment of uclibc in libtool.eclass.  I tested with >=sys-devel/libtool-1.5.26-r1 on several packages running elibtoolize abd found no issues.

NOTE: For some reason I haven't figure out yet, =sys-devel/libtool-1.3.5 fails to build on uclibc. libltdl.so doesn't get built although libltdl.a does.
Comment 6 SpanKY gentoo-dev 2013-11-30 23:09:12 UTC
(In reply to Anthony Basile from comment #4)

i think you're misunderstanding the point of these patches.  it doesn't matter what version of libtool is installed in /usr/bin/.  when packages are made, they are done so with the libtool version installed at that time.  then we live with those for a long time until the maintainer updates their distro/build packages, and releases a new version.

at this point, the number of packages we still build that use older than libtool-1.5.x is probably pretty low, but i suspect it is not zero.

we probably can just drop the warning now though.  it made a lot of sense in the early days of the uClibc port (10 years ago), but since things are largely sane now, it's probably useless.  let's just delete the warning.
Comment 7 Anthony Basile gentoo-dev 2013-12-03 21:55:19 UTC
(In reply to SpanKY from comment #6)
> (In reply to Anthony Basile from comment #4)
> 
> i think you're misunderstanding the point of these patches.  it doesn't
> matter what version of libtool is installed in /usr/bin/.  when packages are
> made, they are done so with the libtool version installed at that time. 
> then we live with those for a long time until the maintainer updates their
> distro/build packages, and releases a new version.

Yeah, after reading the eclass its pretty clear what's going on.

> 
> at this point, the number of packages we still build that use older than
> libtool-1.5.x is probably pretty low, but i suspect it is not zero.

It would be hard to know, so we can't drop those patches.

> 
> we probably can just drop the warning now though.  it made a lot of sense in
> the early days of the uClibc port (10 years ago), but since things are
> largely sane now, it's probably useless.  let's just delete the warning.


Dropping the warning is good enough.
Comment 8 Anthony Basile gentoo-dev 2013-12-03 21:56:15 UTC
Created attachment 364558 [details, diff]
Remove the warning for uclibc is patching fails.
Comment 9 SpanKY gentoo-dev 2013-12-05 01:59:00 UTC
Comment on attachment 364558 [details, diff]
Remove the warning for uclibc is patching fails.

doooooooooo it
Comment 10 Anthony Basile gentoo-dev 2013-12-05 16:52:53 UTC
(In reply to SpanKY from comment #9)
> Comment on attachment 364558 [details, diff] [details, diff]
> Remove the warning for uclibc is patching fails.
> 
> doooooooooo it

done