Bug 185237 - Removing some libtool .la files breaks convert
Removing some libtool .la files breaks convert
Product: Fedora
Classification: Fedora
Component: ImageMagick (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Matthias Clasen
Mike McLean
Depends On:
  Show dependency treegraph
Reported: 2006-03-12 09:32 EST by Robert Scheck
Modified: 2010-05-30 12:06 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2006-05-26 11:13:18 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Robert Scheck 2006-03-12 09:32:20 EST
Description of problem:
$RPM_BUILD_ROOT%{_libdir}/*.la is removed, but $RPM_BUILD_ROOT%{_libdir}/
ImageMagick-*/modules*/*/*.la is skipped. Is there a special reason for skipping 
the rest of the .la files? 

Version-Release number of selected component (if applicable):

How reproducible:
Rebuild ImageMagick using rpm 4.4.5 and it will stop at installing with a failed 
libtool dependency.

Actual results:
Including the %{_libdir}/ImageMagick-*/modules*/*/*.la files but not the whole 
rest of *.la in ImageMagick will break installing of the ImageMagick package at 
least with the new rpm 4.4.5 which has libtool detection. At least the current 
behaviour of different handling of *.la files in ImageMagick is inconsistent and 
broken, which is another reason to apply the patch below.

Expected results:
Please apply the following fix (or better) to the ImageMagick spec file (maybe 
you need --ignore-whitespace as patch argument) for the next rebuilding:

--- ImageMagick.spec       2006-03-08 01:18:13.000000000 +0100
+++ ImageMagick.spec.rsc   2006-03-12 15:20:43.000000000 +0100
@@ -158,7 +158,7 @@
 # Keep config
 rm -rf $RPM_BUILD_ROOT%{_datadir}/%{name}-%{VER}/[a-b,d-z,A-Z]*
 rm -rf $RPM_BUILD_ROOT%{_libdir}/libltdl.*
-rm -f  $RPM_BUILD_ROOT%{_libdir}/ImageMagick-*/modules*/*/*.a
+rm -f  $RPM_BUILD_ROOT%{_libdir}/ImageMagick-*/modules*/*/*.{a,la}
 rm -f  $RPM_BUILD_ROOT%{_libdir}/*.la

 # link docs

At least this change shouldn't break anything else, as far as I can see while 
doing some other rebuilding tests. Thank you! :)

Additional info:
rpm 4.4.5 is not yet in Rawhide, but should hopefully come up after FC5 release.
Comment 1 Matthias Clasen 2006-03-20 09:37:17 EST
Will be fixed in the next build
Comment 2 Robert Scheck 2006-03-22 15:00:16 EST
I think, I'm introducing a bug with this request (noticed this morning by 
myself), originally:
> convert -list format | wc -l

After my suggested change:
> convert -list format | wc -l

Nevertheless, the current *.la behaviour in ImageMagick <= *is* 
broken, because the %{_libdir}/ImageMagick-*/modules*/*/*.la just require and 
really need %{_libdir}/lib*.la to satisfy dependencies.

Hell, I don't know what best is now. Maybe include %{_libdir}/lib*.la into the 
main package, because otherwise the -devel always would be required (and 
normally, *.la should end up in -devel). Or you could just remove %{_libdir}/
lib*.la requirements using sed/perl?

But this decision is up to you as Red Hat maintainer, I already (unfortunately) 
broke the stuff :-S
Comment 3 Robert Scheck 2006-03-24 05:04:17 EST
Ah, for my own use I decided to only nuke the dependency libs of the *.la files 
to be close to the previous stuff (and convert is working again):

sed -i "s/dependency_libs='.*'/dependency_libs=''/g" $RPM_BUILD_ROOT%{_libdir}/
Comment 4 Rex Dieter 2006-05-25 08:03:22 EDT
Yep, not good:

$ rpm -q ImageMagick

$ identify -list format
   Format  Module    Mode  Description
* native blob support

IMO, you shouldn't touch/remove anything but %{_libdir}/lib*.la files.  

If rpm pulls deps from non-shared libs' .la files (ie, ImageMagick's loadable
modules in %{_libdir}/ImageMagick-*/modules*/*/*.la), that's a bug in rpm.
Comment 5 Mamoru TASAKA 2006-05-25 08:13:22 EDT
Current ImageMagick- seems to have removed
modules-Q16/coders/*.la files.

Now at least display, convert no longer work.
Comment 6 Mamoru TASAKA 2006-05-25 11:43:41 EDT
Actually, magick/module.c, especially the funtion  TagToModuleName() 
explicitly requires modules*/*/*.la files to find and load modules.

modules*/*/*.la files should be included in ImageMagick MAIN package, again!!
Comment 7 Robert Scheck 2006-05-25 12:08:52 EDT
Matthias, please revert my initial patch for next rebuilding as I suggested in 
comment #2 two months ago. As pulling deps from non-shared libs' .la files could 
be also an RPM problem, I opened up bug #193134.
Comment 8 Ralf Corsepius 2006-05-26 00:26:33 EDT
Matthias, you _must_ not remove *.la's from a package having been released as
part of a release. Once they are in, they _must_ stay at least for the life-time
of the release. 

I.e. you can remove them from devel if you feel like doing it, but you must not
remove them FCN releases.
Comment 9 Mamoru TASAKA 2006-05-26 00:50:37 EDT
For FC5 issue, the *.la problem seems to be solved by bug 191325.
Comment 10 Mamoru TASAKA 2006-05-26 00:52:09 EDT
Sorry, by bug 193125, not by bug 191325.
Comment 11 Robert Scheck 2006-05-26 11:13:18 EDT
ImageMagick- was built in Rawhide today reverting the
problem -> closing this bug report. The RPM related part was moved to bug 
#193134 (already mentioned yesterday in comment #7).

Note You need to log in before you can comment on or make changes to this bug.