My perl interpeter (versione 5.8.5) was compiled with ithreads (USE=ithreads). After installing ImageMagick and PerlMagick 6.1.8.8 any Perl script that contained something as simple as "use Image::Magick" gave out the following error: /usr/bin/perl: symbol lookup error: /usr/lib/perl5/site_perl/5.8.5/i686-linux-thread-multi/auto/Image/Magick/Magick.so: undefined symbol: InitializeMagick After a suggestion I got in Gentoo forums, I recompiled Perl without ithreads and now everything works. Reproducible: Always Steps to Reproduce: 1. emerge perl with USE=ithreads 2. emerge ImageMagick and PerlMagick 3. try a Perl script which uses Image::Magick. Actual Results: The following error appeared: /usr/bin/perl: symbol lookup error: /usr/lib/perl5/site_perl/5.8.5/i686-linux-thread-multi/auto/Image/Magick/Magick.so: undefined symbol: InitializeMagick
read `grep -C 3 ithreads /usr/portage/dev-lang/perl/perl-5.8.5-r4.ebuild`
I read it, hoever I asked on ImageMagick/PerlMagick forums and they know of no compatibility problem between PerlMagick and a threaded Perl interpreter. Here's the link to the discussion: http://studio.imagemagick.org/magick/viewtopic.php?t=3763&highlight= So, I thought it might be a Gentoo package problem...
well...
Unless you can reproduce this with an un-threaded perl, I can't help you. No one that I know of on the perl herd uses a threaded perl since it breaks too many other applications that we do use.
Hi Michael! Unfortunately I can't, as with a threaded perl PerlMagick works just fine... Thanks anyway.
I was struck with an idea while working on another ithreads problem, may have something to get back to you with on this (might not, but maybe :) )
Egads, the answer here was so simple. It appears that ImageMagick installed a copy of the perl libraries during the initial build as well, only it placed them in /path/to/perl/site_perl/ instead of vendor_perl - where the perlmagick ebuild placed them. So...you have to copies of the same perl module (albeit, at least on my box, with .so files of vastly different sizes) sitting in your @INC - perl gets confused, symbol error. Temporarily, you can remove the copy in site_perl (move it out of the way if you don't feel brave) and you should be fine. Now, I'm off to see why imagemagick is building the module in the first place...
*** Bug 88284 has been marked as a duplicate of this bug. ***
OK, here's the skinny kids, and sekretarz and I are working on it: The ebuild for imagemagick is creating a bad version of perlmagick and installing it in site_perl (shouldn't be doing either). Perlmagick is building correctly independently, but because of the precedence of @INC, perl is using the bad version in site_perl. Fastest solution to move you along: Move out the copy of the library in site_perl. Slower solution: wait for us to post the new ebuilds that correct this.
Another (and more simple) work around is to simply install the module from CPAN. perl -MCPAN -e "install Image::Magick"
It's always an option. But if you ever emerge anything that deps it, it will overwride it. Or upgrade imagemagick. YMMV.
imagemagick-6.2.1.5 is now in the tree (~arch'd). It will build the perlmagick portion at the same time rather than separately, doesn't exhibit the dreaded symbol lookup failure, and will be resulting in the phase out of the perlmagick ebuild completely. Please test, install, enjoy, etc.. I intend to close this bug out soon - the cpan suggestion aside, there are at least 2 different options now for getting around this.
I tried the new package and it works very well on my AMD64. Unfortunately, the perl interpreter I have now is not threaded, so I can't test the *real* problem. I had to install that because vim won't compile with a threaded perl (!). I'll try and reinstall the threaded one as soon as I can, so I'll see if I can report the vim bug as well. ;-)
This was fixed (and then the fix was ported over into the merging of perlmagick and imagemagick)