Welcome to WebmasterWorld Guest from 54.167.83.224

Forum Moderators: coopster & jatar k & phranque

Message Too Old, No Replies

Image Magic

     
11:57 pm on Nov 15, 2010 (gmt 0)

New User

10+ Year Member

joined:Feb 21, 2005
posts: 38
votes: 0


Hey Guys, I upgraded my system to Snow Leopard and installe MacPorts and a few modules like DBI; Cwd; CGI qw(:all); LWP::Simple qw(get); and Image::Magick; All works like a dream but I cannot seem to get Image Magick to load. I made a testscript and got the following error returned:

Can't locate Image/Magick.pm in @INC (@INC contains: /Library/Perl/Updates/5.10.0 /System/Library/Perl/5.10.0/darwin-thread-multi-2level /System/Library/Perl/5.10.0 /Library/Perl/5.10.0/darwin-thread-multi-2level /Library/Perl/5.10.0 /Network/Library/Perl/5.10.0/darwin-thread-multi-2level /Network/Library/Perl/5.10.0 /Network/Library/Perl /System/Library/Perl/Extras/5.10.0/darwin-thread-multi-2level /System/Library/Perl/Extras/5.10.0) at /Library/WebServer/CGI-Executables/parrotdev/test.pl line 7.

All other modules are loading just fine.

Anyone?

Cheers,

Ton
9:59 am on Nov 16, 2010 (gmt 0)

Senior Member

WebmasterWorld Senior Member 5+ Year Member

joined:May 31, 2008
posts:661
votes: 0


How did you install Image::Magick? You'll need the libraries aswell as the perl wrappers.
I don't have any clue about mac software packaging, but look for perlmagick, which they usually ship it as.
11:21 am on Nov 16, 2010 (gmt 0)

New User

10+ Year Member

joined:Feb 21, 2005
posts: 38
votes: 0


Hey Jan, This is what I have installed so far. All other packages work fine.

The following ports are currently installed:
apache2 @2.2.17_0+preforkmpm (active)
apr @1.4.2_1 (active)
apr-util @1.3.9_2 (active)
autoconf @2.68_0 (active)
automake @1.11.1_0 (active)
bzip2 @1.0.6_0 (active)
db46 @4.6.21_6 (active)
expat @2.0.1_1 (active)
fontconfig @2.8.0_0 (active)
freetype @2.4.3_0 (active)
gdbm @1.8.3_2 (active)
gettext @0.18.1.1_2 (active)
ghostscript @9.00_4 (active)
gperf @3.0.4_0 (active)
help2man @1.38.2_0 (active)
ImageMagick @6.6.5-0_0+q16 (active)
jpeg @8b_0 (active)
lcms @1.19_2 (active)
libiconv @1.13.1_0 (active)
libidn @1.19_0 (active)
libpaper @1.1.24_0 (active)
libpng @1.2.44_0 (active)
libtool @2.4_0 (active)
libxml2 @2.7.8_0 (active)
m4 @1.4.15_0 (active)
mod_perl2 @2.0.4_0 (active)
mysql5 @5.1.52_0 (active)
mysql5-server @5.1.52_0 (active)
ncurses @5.7_1 (active)
ncursesw @5.7_1 (active)
openssl @1.0.0a_1 (active)
p5-compress-raw-bzip2 @2.031_0 (active)
p5-compress-raw-zlib @2.027_0 (active)
p5-crypt-ssleay @0.57_1 (active)
p5-dbd-mysql @4.014_0+mysql5 (active)
p5-dbi @1.611_0 (active)
p5-html-parser @3.65_0 (active)
p5-html-tagset @3.20_0 (active)
p5-io-compress @2.027_0 (active)
p5-libwww-perl @5.837_0 (active)
p5-locale-gettext @1.05_3 (active)
p5-mail-sendmail @0.79_0 (active)
p5-test-simple @0.94_1 (active)
p5-uri @1.54_0 (active)
p7zip @9.13_1 (active)
pcre @8.10_0 (active)
perl5.8 @5.8.9_3 (active)
pkgconfig @0.25_1 (active)
python26 @2.6.6_0+no_tkinter (active)
readline @6.1.002_0 (active)
sqlite3 @3.7.3_0 (active)
tiff @3.9.4_0 (active)
xorg-bigreqsproto @1.1.1_0 (active)
xorg-inputproto @2.0.1_0 (active)
xorg-kbproto @1.0.5_0 (active)
xorg-libice @1.0.7_0 (active)
xorg-libpthread-stubs @0.3_0 (active)
xorg-libsm @1.2.0_0 (active)
xorg-libX11 @1.3.6_1 (active)
xorg-libXau @1.0.6_0 (active)
xorg-libxcb @1.7_0+python26 (active)
xorg-libXdmcp @1.1.0_0 (active)
xorg-libXext @1.2.0_0 (active)
xorg-libXt @1.0.9_0 (active)
xorg-util-macros @1.11.0_0 (active)
xorg-xcb-proto @1.6_0+python26 (active)
xorg-xcmiscproto @1.2.1_0 (active)
xorg-xextproto @7.1.2_0 (active)
xorg-xf86bigfontproto @1.2.0_0 (active)
xorg-xproto @7.0.19_0 (active)
xorg-xtrans @1.2.6_0 (active)
zlib @1.2.5_0 (active)

Cheers,

Ton
12:18 pm on Nov 16, 2010 (gmt 0)

Senior Member

WebmasterWorld Senior Member 5+ Year Member

joined:May 31, 2008
posts:661
votes: 0


Again, I'm no expert, but here's what I figured out:
There was/is a package p5-perlmagick, but it doesn't compile on Snow Leopard and is deprecated.
The suggested way is to compile imagemagick with perlmagick in one step.
sudo port -nu uninstall imagemagick
sudo port clean imagemagick
sudo port install imagemagick +perl
1:26 pm on Nov 16, 2010 (gmt 0)

New User

10+ Year Member

joined:Feb 21, 2005
posts: 38
votes: 0


Jan, uninstalled and reinstalled with your example... still no Image magick loaded;-( Getting the same error.

Ton
3:58 pm on Nov 16, 2010 (gmt 0)

Senior Member

WebmasterWorld Senior Member 5+ Year Member

joined:May 31, 2008
posts:661
votes: 0


Have you tried installing p5-perlmagick or querying for any other perlmagick-packages? maybe the sites I saw weren't up to date.
Other than that, I'm out of ideas, sorry.
1:56 am on Nov 17, 2010 (gmt 0)

Administrator

WebmasterWorld Administrator phranque is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Aug 10, 2004
posts:10544
votes: 8


just looked at my dev server - i have both p5-PerlMagick-6.6.1.5nb4 and ImageMagick-6.6.1.5nb1 installed.
12:12 am on Nov 18, 2010 (gmt 0)

New User

10+ Year Member

joined:Feb 21, 2005
posts: 38
votes: 0


bad news here, I have tried both but no result. I am stuck here, I am supposed to deliver a big project in a few weeks and need to be able to resize incomming pictures. Any alternatives out there?

Ton
1:24 am on Nov 18, 2010 (gmt 0)

Administrator

WebmasterWorld Administrator phranque is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Aug 10, 2004
posts:10544
votes: 8


so did you actually look in all the directories listed in the @INC array and verify that Image/Magick.pm exists?
have you found Image/Magick.pm anywhere?
when you find the location you could try adding that with a use lib [perldoc.perl.org] statement.
11:01 am on Nov 18, 2010 (gmt 0)

New User

10+ Year Member

joined:Feb 21, 2005
posts: 38
votes: 0


Hey Phranque, Here is what I found on locations:


/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_perl_p5-perlmagick/work/PerlMagick-6.59/Magick.pm

/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_perl_p5-perlmagick/work/PerlMagick-6.59/blib/lib/Image/Magick.pm

/opt/local/lib/perl5/site_perl/5.8.9/darwin-2level/Image/Magick.pm

/opt/local/var/macports/software/p5-perlmagick/6.59_0/opt/local/lib/perl5/vendor_perl/5.8.9/darwin-2level/Image/Magick.pm

/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_perl_p5-perlmagick/work/destroot/opt/local/lib/perl5/vendor_perl/5.8.9/darwin-2level/Image/Magick.pm

Cheers,

Ton
11:51 am on Nov 18, 2010 (gmt 0)

Senior Member

WebmasterWorld Senior Member 5+ Year Member

joined:May 31, 2008
posts:661
votes: 0


/opt/local/lib/perl5/site_perl/5.8.9/darwin-2level/Image/Magick.pm
looks best imho, try
use lib "/opt/local/lib/perl5/site_perl/5.8.9/darwin-2level/"


before
use Image::Magick;
1:35 pm on Nov 18, 2010 (gmt 0)

New User

10+ Year Member

joined:Feb 21, 2005
posts: 38
votes: 0


Tried to use the "use lib" module but still cant make it to work. Btw, does using the "use lib" module store any data when you use it?
The documentation on [perldoc.perl.org...] looks like it does?

Ton
1:40 pm on Nov 18, 2010 (gmt 0)

Administrator

WebmasterWorld Administrator phranque is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Aug 10, 2004
posts:10544
votes: 8


you got the same error as before?

"use lib" merely appends to the @INC array for the duration of the process.
1:58 pm on Nov 18, 2010 (gmt 0)

Senior Member

WebmasterWorld Senior Member 5+ Year Member

joined:May 31, 2008
posts:661
votes: 0


Has the errormessage changed to include "/opt/local/lib/perl5/site_perl/5.8.9/darwin-2level/" in @INC?
2:03 pm on Nov 18, 2010 (gmt 0)

New User

10+ Year Member

joined:Feb 21, 2005
posts: 38
votes: 0


Hi guys, I am sorry I must sound like a noob to you;-(
Here is what I get:

Script header:
#!/opt/local/bin/perl -w

use lib "/opt/local/lib/perl5/site_perl/5.8.9/darwin-2level";
use Image::Magick;


Original error massage WITHOUT (use lib "/opt/local/lib/perl5/site_perl/5.8.9/darwin-2level";)
Can't locate Image/Magick.pm in @INC (@INC contains: /Library/Perl/Updates/5.10.0 /System/Library/Perl/5.10.0/darwin-thread-multi-2level /System/Library/Perl/5.10.0 /Library/Perl/5.10.0/darwin-thread-multi-2level /Library/Perl/5.10.0 /Network/Library/Perl/5.10.0/darwin-thread-multi-2level /Network/Library/Perl/5.10.0 /Network/Library/Perl /System/Library/Perl/Extras/5.10.0/darwin-thread-multi-2level /System/Library/Perl/Extras/5.10.0)

New error message: WITH (use lib "/opt/local/lib/perl5/site_perl/5.8.9/darwin-2level";)
Can't load '/opt/local/lib/perl5/site_perl/5.8.9/darwin-2level//auto/Image/Magick/Magick.bundle' for module Image::Magick: dlopen(/opt/local/lib/perl5/site_perl/5.8.9/darwin-2level/auto/Image/Magick/Magick.bundle, 1): Symbol not found: _PL_curpad
Referenced from: /opt/local/lib/perl5/site_perl/5.8.9/darwin-2level//auto/Image/Magick/Magick.bundle
Expected in: dynamic lookup
at /Library/WebServer/CGI-Executables/platinumsite/test.pl line 4

Ton
3:39 pm on Nov 18, 2010 (gmt 0)

Senior Member

WebmasterWorld Senior Member 5+ Year Member

joined:May 31, 2008
posts:661
votes: 0


Ok, yeah, that's an installation problem. Unless phranque saves the day here, you might want to look for mailing list or support board for macports.
3:52 pm on Nov 18, 2010 (gmt 0)

New User

10+ Year Member

joined:Feb 21, 2005
posts: 38
votes: 0


Thanks Jan, as always you are a great help!

Ton
9:53 pm on Nov 24, 2010 (gmt 0)

Junior Member

5+ Year Member

joined:May 8, 2008
posts: 74
votes: 0


Try installing Image::Magick with cpan client.
11:06 pm on Nov 24, 2010 (gmt 0)

New User

10+ Year Member

joined:Feb 21, 2005
posts: 38
votes: 0


Hey Chorny, doesn't that mess up my ports structure and will I be able to remove cpan if it doesn't work?

Ton
2:33 pm on Nov 25, 2010 (gmt 0)

Junior Member

5+ Year Member

joined:May 8, 2008
posts: 74
votes: 0


Yes, you will not able to remove it later if you install it directly from CPAN.

You can also try GD library - it also has resize abilities.