RPM compiling from SRPMs on Fedora Core 6 -- The Bug Fix

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
User avatar
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

RPM compiling from SRPMs on Fedora Core 6 -- The Bug Fix

Post by anthony »

The ImageMagick source RPM fails to compile under Fedora Core 6 with a 'ld' error for Perl Magick.

After a lot of tracing I found this is being caused by a OS error in the Perl Module Build process and NOT a ImageMagick bug.

The problem is that the configuration item $Config{'lddlflags'} has lots of GCC options whcih do not work for LD. the solution is to remove all those options from the module (outside IM).

Edit /usr/lib/perl5/5.8.8/i386-linux-thread-multi/Config_heavy.pl
look for the line lddlflags=...
and replace with lddlflags='-shared -L/usr/local/lib'

Now RPM builds work fine on Fedora Core 6.

For example, build RPMs from the downloaded src.rpm file....

Code: Select all

rm -rf /usr/src/redhat/RPMS/*/* /usr/src/redhat/{SOURCES,SPECS,BUILD}/*
nice rpmbuild --nodeps --rebuild ImageMagick-*.src.rpm
cp -p /usr/src/redhat/RPMS/i386/ImageMagick-[6p]*.i386.rpm  .
rm -rf /usr/src/redhat/RPMS/*/* /usr/src/redhat/{SOURCES,SPECS,BUILD}/*
Last week, when the moon was full, the clouds were thick, and
formahaut was above the horizon, I typed f77, and lo, it did compile.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
Post Reply