Bug 185237

Summary: Removing some libtool .la files breaks convert
Product: [Fedora] Fedora Reporter: Robert Scheck <redhat-bugzilla>
Component: ImageMagickAssignee: Matthias Clasen <mclasen>
Status: CLOSED RAWHIDE QA Contact: Mike McLean <mikem>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: mtasaka, pahan, rc040203, rdieter, stefan.hoelldampf
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 6.2.5.4-4.2.1.fc5.3 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-05-26 15:13:18 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Robert Scheck 2006-03-12 14:32:20 UTC
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):
ImageMagick-6.2.5.4-4.2.1

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 14:37:17 UTC
Will be fixed in the next build

Comment 2 Robert Scheck 2006-03-22 20:00:16 UTC
I think, I'm introducing a bug with this request (noticed this morning by 
myself), originally:
> convert -list format | wc -l
182
>

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

Nevertheless, the current *.la behaviour in ImageMagick <= 6.2.5.4-4.2.1 *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 10:04:17 UTC
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}/
ImageMagick-*/modules*/*/*.la

Comment 4 Rex Dieter 2006-05-25 12:03:22 UTC
Yep, not good:

$ rpm -q ImageMagick
ImageMagick-6.2.5.4-4.2.1.fc5.2

$ 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 12:13:22 UTC
Current ImageMagick-6.2.5.4-4.2.1.fc5.2 seems to have removed
modules-Q16/coders/*.la files.

Now at least display, convert no longer work.

Comment 6 Mamoru TASAKA 2006-05-25 15:43:41 UTC
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 16:08:52 UTC
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 04:26:33 UTC
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 04:50:37 UTC
For FC5 issue, the *.la problem seems to be solved by bug 191325.

Comment 10 Mamoru TASAKA 2006-05-26 04:52:09 UTC
Sorry, by bug 193125, not by bug 191325.

Comment 11 Robert Scheck 2006-05-26 15:13:18 UTC
ImageMagick-6.2.5.4-4.2.1.fc5.3 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).