Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 83337 - dev-perl/perlmagick doesn't work if perl is compiled with ithreads
Summary: dev-perl/perlmagick doesn't work if perl is compiled with ithreads
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Gentoo Perl team
URL:
Whiteboard:
Keywords:
: 88284 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-02-25 15:03 UTC by Michele Beltrame
Modified: 2005-05-16 09:16 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michele Beltrame 2005-02-25 15:03:08 UTC
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
Comment 1 Carsten Lohrke (RETIRED) gentoo-dev 2005-02-25 16:11:33 UTC
read `grep -C 3 ithreads /usr/portage/dev-lang/perl/perl-5.8.5-r4.ebuild`
Comment 2 Michele Beltrame 2005-02-26 08:25:05 UTC
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...
Comment 3 Carsten Lohrke (RETIRED) gentoo-dev 2005-02-26 16:08:36 UTC
well...
Comment 4 Michael Cummings (RETIRED) gentoo-dev 2005-03-07 09:33:22 UTC
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.
Comment 5 Michele Beltrame 2005-03-08 00:16:07 UTC
Hi Michael!

Unfortunately I can't, as with a threaded perl PerlMagick works just fine...

Thanks anyway.
Comment 6 Michael Cummings (RETIRED) gentoo-dev 2005-03-11 09:28:03 UTC
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 :) )
Comment 7 Michael Cummings (RETIRED) gentoo-dev 2005-04-17 23:42:13 UTC
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...
Comment 8 Michael Cummings (RETIRED) gentoo-dev 2005-04-19 02:33:04 UTC
*** Bug 88284 has been marked as a duplicate of this bug. ***
Comment 9 Michael Cummings (RETIRED) gentoo-dev 2005-04-19 02:35:33 UTC
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. 
Comment 10 Daniel Beckham 2005-04-19 07:41:19 UTC
Another (and more simple) work around is to simply install the module from CPAN. 

perl -MCPAN -e "install Image::Magick"
Comment 11 Michael Cummings (RETIRED) gentoo-dev 2005-04-19 07:57:24 UTC
It's always an option. But if you ever emerge anything that deps it, it will overwride it. Or upgrade imagemagick. YMMV.
Comment 12 Michael Cummings (RETIRED) gentoo-dev 2005-04-20 13:59:26 UTC
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.
Comment 13 Michele Beltrame 2005-04-25 01:30:27 UTC
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. ;-)
Comment 14 Michael Cummings (RETIRED) gentoo-dev 2005-05-16 09:16:41 UTC
This was fixed (and then the fix was ported over into the merging of perlmagick and imagemagick)