Page 1 of 1

Problem to compile PerlMagick

Posted: 2009-11-24T00:23:31-07:00
by piaff33z

Hy,
I have a problem to compile PerlMagick. When i do :

Code: Select all

root@XXXXXXXX:/tmp/imagemagick/ImageMagick-6.5.7-9/PerlMagick# perl Makefile.PL
Checking if your kit is complete...
Looks good
Warning: -L../magick/.libs changed to -L/tmp/imagemagick/ImageMagick-6.5.7-9/PerlMagick/../magick/.libs
Note (probably harmless): No library found for -lperl
Writing Makefile for Image::Magick
root@XXXXXXX:/tmp/imagemagick/ImageMagick-6.5.7-9/PerlMagick#

for more information, i do :

Code: Select all

root@XXXXXXX:/tmp/imagemagick/ImageMagick-6.5.7-9/PerlMagick# perl Makefile.PL verbose

  ABSTRACT => q[ImageMagick PERL Extension]
  AUTHOR => q[ImageMagick Studio LLC]
  CCFLAGS => q[-fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -fopenmp -I/opt/lib/zlib/include -I/opt/lib/libpng/include -I/opt/lib/libgd/include -I/opt/lib/libxml2/include -I/opt/fontconfig/include -I/opt/lib/libjpeg2k/include -I/opt/lib/fftw/include -Wall -W -pthread]
  DEFINE => q[ -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES=1 -DHAVE_CONFIG_H]
  INC => q[-I../ -I.. -I/opt/lib/freetype-2.3.11/include/freetype2 -I/opt/lib/freetype-2.3.11/include -I/opt/lib/zlib/include -I/opt/lib/libpng/include -I/opt/lib/libgd/include -I/opt/lib/libxml2/include -I/opt/fontconfig/include -I/opt/lib/libjpeg2k/include -I/opt/lib/fftw/include -I/opt/lib/libxml2-2.7.6/include/libxml2 -I"/usr/include/ImageMagick"]
  INSTALLBIN => q[/opt/ImageMagick-6.5.7-9/bin]
  LDDLFLAGS => q[-L../magick/.libs -lMagickCore -shared -L/usr/local/lib -L/opt/lib/zlib/lib -L/opt/lib/libpng/lib -L/opt/lib/libgd/lib -L/opt/lib/libxml2/lib -L/opt/fontconfig/lib -L/opt/lib/libjpeg2k/lib -L/opt/lib/fftw/lib -L/opt/lib/libxml2-2.7.6/lib]
  LDFLAGS => q[-L../magick/.libs -lMagickCore  -L/usr/local/lib -L/opt/lib/zlib/lib -L/opt/lib/libpng/lib -L/opt/lib/libgd/lib -L/opt/lib/libxml2/lib -L/opt/fontconfig/lib -L/opt/lib/libjpeg2k/lib -L/opt/lib/fftw/lib -L/opt/lib/libxml2-2.7.6/lib]
  LIBS => [q[-L../magick/.libs -lMagickCore -lperl -lm]]
  MAP_TARGET => q[PerlMagick]
  NAME => q[Image::Magick]
  PERLMAINCC => q[gcc -fopenmp]
  PREREQ_PM => {  }
  VERSION => q[6.5.7]
  test => { TESTS=>q[t/*.t t/bzlib/*.t t/jpeg/*.t t/jng/*.t t/jp2/*.t t/png/*.t t/tiff/*.t t/wmf/*.t t/zlib/*.t] }
Using PERL=/usr/bin/perl5.8.7
Potential libraries are '-L../magick/.libs -lMagickCore -lperl -lm':
Warning: -L../magick/.libs changed to -L/tmp/imagemagick/ImageMagick-6.5.7-9/PerlMagick/../magick/.libs
'-lMagickCore' found at /tmp/imagemagick/ImageMagick-6.5.7-9/PerlMagick/../magick/.libs/libMagickCore.so.2.0.1
perl not found in /tmp/imagemagick/ImageMagick-6.5.7-9/PerlMagick/../magick/.libs
perl not found in /usr/local/lib
perl not found in /lib
perl not found in /usr/lib
Note (probably harmless): No library found for -lperl
m not found in /tmp/imagemagick/ImageMagick-6.5.7-9/PerlMagick/../magick/.libs
m not found in /usr/local/lib
'-lm' found at /lib/libm.so.6
Writing Makefile for Image::Magick
root@XXXXXXXXXXX:/tmp/imagemagick/ImageMagick-6.5.7-9/PerlMagick#

I don't find perl. But perl is installed...
I found only libperl.a library on my system, no libperl.so


Someone can help me ?
Vic

Re: Problem to compile PerlMagick

Posted: 2009-11-24T07:33:32-07:00
by magick
The warning you received can safely be ignored. Simply build and install PerlMagick and it should work without complaint.

Re: Problem to compile PerlMagick

Posted: 2009-11-24T15:52:41-07:00
by piaff33z

Yes, i think that firthly as you say. But when i do the make i have errors below...

Code: Select all

`-mcpu=' is deprecated. Use `-mtune=' or '-march=' instead.
Magick.xs:232: warning: missing initializer
Magick.xs:232: warning: (near initialization for 'Methods[8].arguments')
Magick.xs:236: warning: missing initializer
Magick.xs:236: warning: (near initialization for 'Methods[11].arguments')
Magick.xs:237: warning: missing initializer
Magick.xs:237: warning: (near initialization for 'Methods[12].arguments')
Magick.xs:238: warning: missing initializer
Magick.xs:238: warning: (near initialization for 'Methods[13].arguments')
Magick.xs:245: warning: missing initializer
Magick.xs:245: warning: (near initialization for 'Methods[16].arguments')
Magick.xs:247: warning: missing initializer
Magick.xs:247: warning: (near initialization for 'Methods[18].arguments')
Magick.xs:341: warning: missing initializer
Magick.xs:341: warning: (near initialization for 'Methods[45].arguments')
Magick.xs:357: warning: missing initializer
Magick.xs:357: warning: (near initialization for 'Methods[50].arguments')
Magick.xs:360: warning: missing initializer
Magick.xs:360: warning: (near initialization for 'Methods[52].arguments')
Magick.xs:376: warning: missing initializer
Magick.xs:376: warning: (near initialization for 'Methods[61].arguments')
Magick.xs:380: warning: missing initializer
Magick.xs:380: warning: (near initialization for 'Methods[64].arguments')
Magick.xs:425: warning: missing initializer
Magick.xs:425: warning: (near initialization for 'Methods[83].arguments')
Magick.xs:452: warning: missing initializer
Magick.xs:452: warning: (near initialization for 'Methods[95].arguments')
Magick.xs:453: warning: missing initializer
Magick.xs:453: warning: (near initialization for 'Methods[96].arguments')
Magick.xs:457: warning: missing initializer
Magick.xs:457: warning: (near initialization for 'Methods[98].arguments')
Magick.xs:458: warning: missing initializer
Magick.xs:458: warning: (near initialization for 'Methods[99].arguments')
Magick.xs:459: warning: missing initializer
Magick.xs:459: warning: (near initialization for 'Methods[100].arguments')
Magick.xs:466: warning: missing initializer
Magick.xs:466: warning: (near initialization for 'Methods[103].arguments')
Magick.xs:512: warning: missing braces around initializer
Magick.xs:512: warning: (near initialization for 'Methods[122].arguments[0]')
Magick.c: In function 'XS_Image__Magick_UNLOAD':
Magick.c:2302: warning: unused parameter 'cv'
Magick.c: In function 'XS_Image__Magick_constant':
Magick.c:2323: warning: unused parameter 'cv'
Magick.c: In function 'XS_Image__Magick_Animate':
Magick.c:2349: warning: unused variable 'ref'
Magick.c:2344: warning: unused variable 'ix'
Magick.c: In function 'XS_Image__Magick_Append':
Magick.c:2423: warning: unused variable 'ref'
Magick.c:2418: warning: unused variable 'ix'
Magick.c: In function 'XS_Image__Magick_Average':
Magick.c:2554: warning: unused variable 'ref'
Magick.c:2549: warning: unused variable 'ix'
Magick.c: In function 'XS_Image__Magick_BlobToImage':
Magick.c:2645: warning: unused variable 'ref'
Magick.c:2640: warning: unused variable 'ix'
Magick.c: In function 'XS_Image__Magick_Clone':
Magick.c:2794: warning: unused variable 'ref'
Magick.c:2789: warning: unused variable 'ix'
Magick.c: In function 'XS_Image__Magick_CLONE':
Magick.c:2877: warning: unused variable 'ref'
Magick.c:2871: warning: unused parameter 'cv'
Magick.c: In function 'XS_Image__Magick_Coalesce':
Magick.c:2908: warning: unused variable 'ref'
Magick.c:2903: warning: unused variable 'ix'
Magick.c: In function 'XS_Image__Magick_Compare':
Magick.c:2991: warning: unused variable 'ref'
Magick.c:2986: warning: unused variable 'ix'
Magick.c: In function 'XS_Image__Magick_CompareLayers':
Magick.c:3182: warning: unused variable 'ref'
Magick.c:3177: warning: unused variable 'ix'
Magick.c: In function 'XS_Image__Magick_DESTROY':
Magick.c:3310: warning: unused variable 'ref'
Magick.c:3303: warning: unused parameter 'cv'
Magick.c: In function 'XS_Image__Magick_Display':
Magick.c:3390: warning: unused variable 'ref'
Magick.c:3385: warning: unused variable 'ix'
Magick.c: In function 'XS_Image__Magick_Flatten':
Magick.c:3464: warning: unused variable 'ref'
Magick.c:3459: warning: unused variable 'ix'
Magick.c: In function 'XS_Image__Magick_Fx':
Magick.c:3594: warning: unused variable 'ref'
Magick.c:3589: warning: unused variable 'ix'
Magick.c: In function 'XS_Image__Magick_Get':
Magick.c:3746: warning: unused variable 'ref'
Magick.c:3741: warning: unused variable 'ix'
Magick.c: In function 'XS_Image__Magick_GetAuthenticPixels':
Magick.c:5014: warning: unused variable 'ref'
Magick.c:5010: warning: unused variable 'ix'
Magick.c: In function 'XS_Image__Magick_GetVirtualPixels':
Magick.c:5162: warning: unused variable 'ref'
Magick.c:5158: warning: unused variable 'ix'
Magick.c: In function 'XS_Image__Magick_GetAuthenticIndexQueue':
Magick.c:5310: warning: unused variable 'ref'
Magick.c:5306: warning: unused variable 'ix'
Magick.c: In function 'XS_Image__Magick_GetVirtualIndexQueue':
Magick.c:5375: warning: unused variable 'ref'
Magick.c:5371: warning: unused variable 'ix'
Magick.c: In function 'XS_Image__Magick_Histogram':
Magick.c:5441: warning: unused variable 'ref'
Magick.c:5436: warning: unused variable 'ix'
Magick.c: In function 'XS_Image__Magick_GetPixel':
Magick.c:5556: warning: unused variable 'ref'
Magick.c:5551: warning: unused variable 'ix'
Magick.c: In function 'XS_Image__Magick_GetPixels':
Magick.c:5756: warning: unused variable 'ref'
Magick.c:5751: warning: unused variable 'ix'
Magick.c: In function 'XS_Image__Magick_ImageToBlob':
Magick.c:5999: warning: unused variable 'ref'
Magick.c:5994: warning: unused variable 'ix'
Magick.c: In function 'XS_Image__Magick_Layers':
Magick.c:6097: warning: unused variable 'ref'
Magick.c:6092: warning: unused variable 'ix'
Magick.c: In function 'XS_Image__Magick_MagickToMime':
Magick.c:6414: warning: unused variable 'ref'
Magick.c:6410: warning: unused variable 'ix'
Magick.c: In function 'XS_Image__Magick_Mogrify':
Magick.c:6442: warning: unused variable 'ref'
Magick.c: In function 'XS_Image__Magick_Montage':
Magick.c:9704: warning: unused variable 'ref'
Magick.c:9699: warning: unused variable 'ix'
Magick.c: In function 'XS_Image__Magick_Morph':
Magick.c:10107: warning: unused variable 'ref'
Magick.c:10102: warning: unused variable 'ix'
Magick.c: In function 'XS_Image__Magick_Mosaic':
Magick.c:10231: warning: unused variable 'ref'
Magick.c:10226: warning: unused variable 'ix'
Magick.c: In function 'XS_Image__Magick_Ping':
Magick.c:10314: warning: unused variable 'ref'
Magick.c:10309: warning: unused variable 'ix'
Magick.c: In function 'XS_Image__Magick_Preview':
Magick.c:10521: warning: unused variable 'ref'
Magick.c:10516: warning: unused variable 'ix'
Magick.c: In function 'XS_Image__Magick_QueryColor':
Magick.c:10614: warning: unused variable 'ref'
Magick.c:10609: warning: unused variable 'ix'
Magick.c: In function 'XS_Image__Magick_QueryColorname':
Magick.c:10690: warning: unused variable 'ref'
Magick.c:10685: warning: unused variable 'ix'
Magick.c: In function 'XS_Image__Magick_QueryFont':
Magick.c:10760: warning: unused variable 'ref'
Magick.c:10755: warning: unused variable 'ix'
Magick.c: In function 'XS_Image__Magick_QueryFontMetrics':
Magick.c:10875: warning: unused variable 'ref'
Magick.c:10870: warning: unused variable 'ix'
Magick.c: In function 'XS_Image__Magick_QueryMultilineFontMetrics':
Magick.c:11276: warning: unused variable 'ref'
Magick.c:11271: warning: unused variable 'ix'
Magick.c: In function 'XS_Image__Magick_QueryFormat':
Magick.c:11645: warning: unused variable 'ref'
Magick.c:11640: warning: unused variable 'ix'
Magick.c: In function 'XS_Image__Magick_QueryOption':
Magick.c:11733: warning: unused variable 'ref'
Magick.xs:12145: warning: label 'PerlException' defined but not used
Magick.c:11728: warning: unused variable 'ix'
Magick.c: In function 'XS_Image__Magick_Read':
Magick.c:11790: warning: unused variable 'ref'
Magick.c:11785: warning: unused variable 'ix'
Magick.c: In function 'XS_Image__Magick_Remote':
Magick.c:12004: warning: unused variable 'ref'
Magick.c:11999: warning: unused variable 'ix'
Magick.c: In function 'XS_Image__Magick_Set':
Magick.c:12051: warning: unused variable 'ref'
Magick.c:12046: warning: unused variable 'ix'
Magick.c: In function 'XS_Image__Magick_SetPixel':
Magick.c:12109: warning: unused variable 'ref'
Magick.c:12104: warning: unused variable 'ix'
Magick.c: In function 'XS_Image__Magick_Statistics':
Magick.c:12346: warning: unused variable 'ref'
Magick.c:12341: warning: unused variable 'ix'
Magick.c: In function 'XS_Image__Magick_SyncAuthenticPixels':
Magick.c:12546: warning: unused variable 'ref'
Magick.c:12542: warning: unused variable 'ix'
Magick.c: In function 'XS_Image__Magick_Transform':
Magick.c:12608: warning: unused variable 'ref'
Magick.c:12603: warning: unused variable 'ix'
Magick.c: In function 'XS_Image__Magick_Write':
Magick.c:12769: warning: unused variable 'ref'
Magick.c:12764: warning: unused variable 'ix'
Magick.c: In function 'boot_Image__Magick':
Magick.c:12863: warning: unused parameter 'cv'
Magick.c: In function 'XS_Image__Magick_Transform':
Magick.xs:13046: warning: 'sv' may be used uninitialized in this function
Magick.xs:13046: note: 'sv' was declared here
Magick.c: In function 'XS_Image__Magick_Clone':
Magick.xs:2822: warning: 'sv' may be used uninitialized in this function
Magick.xs:2822: note: 'sv' was declared here
Magick.c: In function 'XS_Image__Magick_Read':
Magick.xs:12215: warning: 'sv' may be used uninitialized in this function
Magick.xs:12215: note: 'sv' was declared here
Magick.c: In function 'XS_Image__Magick_Preview':
Magick.xs:10909: warning: 'sv' may be used uninitialized in this function
Magick.xs:10909: note: 'sv' was declared here
Magick.c: In function 'XS_Image__Magick_Mosaic':
Magick.xs:10606: warning: 'sv' may be used uninitialized in this function
Magick.xs:10606: note: 'sv' was declared here
Magick.c: In function 'XS_Image__Magick_Morph':
Magick.xs:10488: warning: 'sv' may be used uninitialized in this function
Magick.xs:10488: note: 'sv' was declared here
Magick.c: In function 'XS_Image__Magick_Montage':
Magick.xs:10088: warning: 'sv' may be used uninitialized in this function
Magick.xs:10088: note: 'sv' was declared here
Magick.c: In function 'XS_Image__Magick_CompareLayers':
Magick.xs:3237: warning: 'sv' may be used uninitialized in this function
Magick.xs:3237: note: 'sv' was declared here
Magick.c: In function 'XS_Image__Magick_Coalesce':
Magick.xs:2943: warning: 'sv' may be used uninitialized in this function
Magick.xs:2943: note: 'sv' was declared here
Magick.c: In function 'XS_Image__Magick_Layers':
Magick.xs:6218: warning: 'sv' may be used uninitialized in this function
Magick.xs:6218: note: 'sv' was declared here
Magick.c: In function 'XS_Image__Magick_Get':
Magick.xs:4017: warning: 'sv' may be used uninitialized in this function
Magick.xs:4017: note: 'sv' was declared here
Magick.xs:3999: warning: 'sv' may be used uninitialized in this function
Magick.xs:3999: note: 'sv' was declared here
Magick.c: In function 'XS_Image__Magick_Fx':
Magick.xs:3660: warning: 'sv' may be used uninitialized in this function
Magick.xs:3660: note: 'sv' was declared here
Magick.c: In function 'XS_Image__Magick_Flatten':
Magick.xs:3525: warning: 'sv' may be used uninitialized in this function
Magick.xs:3525: note: 'sv' was declared here
Magick.c: In function 'XS_Image__Magick_Compare':
Magick.xs:3050: warning: 'sv' may be used uninitialized in this function
Magick.xs:3050: note: 'sv' was declared here
Magick.c: In function 'XS_Image__Magick_BlobToImage':
Magick.xs:2682: warning: 'sv' may be used uninitialized in this function
Magick.xs:2682: note: 'sv' was declared here
Magick.c: In function 'XS_Image__Magick_Average':
Magick.xs:2572: warning: 'sv' may be used uninitialized in this function
Magick.xs:2572: note: 'sv' was declared here
Magick.c: In function 'XS_Image__Magick_Append':
Magick.xs:2444: warning: 'sv' may be used uninitialized in this function
Magick.xs:2444: note: 'sv' was declared here
chmod 755 blib/arch/auto/Image/Magick/Magick.so
cp Magick.bs blib/arch/auto/Image/Magick/Magick.bs
chmod 644 blib/arch/auto/Image/Magick/Magick.bs
Manifying blib/man3/Image::Magick.3

And after all the 25 tests of the "make test" are failed !

Code: Select all

.......
Files=25, Tests=25,  1 wallclock secs ( 0.20 usr  0.05 sys +  0.56 cusr  0.18 csys =  0.99 CPU)
Result: FAIL
Failed 25/25 test programs. 25/25 subtests failed.
make: *** [test_dynamic] Error 2

Re: Problem to compile PerlMagick

Posted: 2009-11-26T10:26:01-07:00
by piaff33z
I found the problem :D . Below links to explain the problem of my compilation...

http://blog.benkoski.com/2009/01/compil ... /#comments
http://betterlogic.com/roger/?p=413
http://bugs.gentoo.org/223817
....
Later, I realized that Perlmagick hadn’t been compiled correctly–perl bombed when trying to load the Imagemagick libraries with

Code: Select all

Can't load '/usr/local/lib/perl/5.8.8/auto/Image/Magick/Magick.so' for module Image::Magick: libgomp.so.1: shared object cannot be dlopen()ed at /usr/lib/perl/5.8/DynaLoader.pm line 225.
 at -e line 1
Compilation failed in require at -e line 1.
BEGIN failed--compilation aborted at -e line 1.
&Image::Magick::constant not defined. The required ImageMagick libraries are not installed or not installed properly.
After a bit of googling, I found a post referencing a gentoo bug with the answer: for whatever reason, -disable-openmp needs to be passed to the ImageMagick configure script for the perl bindings to work.