RPM compiling from SRPMs on Fedora Core 6 -- The Bug Fix
Posted: 2006-12-20T20:42:50-07:00
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....
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.