You are not logged in.
I'm trying to install the rmagick gem and having troubles. I have imagicmagick installed so everything should work.
$ sudo gem install rmagick
Bulk updating Gem source index for: http://gems.rubyforge.org/
Building native extensions. This could take a while...
ERROR: Error installing rmagick:
ERROR: Failed to build gem native extension.
/usr/bin/ruby extconf.rb install rmagick
checking for Ruby version >= 1.8.2... yes
checking for Magick-config... yes
checking for ImageMagick version >= 6.3.0... yes
checking for HDRI disabled version of ImageMagick... yes
checking for stdint.h... yes
checking for sys/types.h... yes
checking for magick/MagickCore.h... yes
checking for InitializeMagick() in -lMagick... no
checking for InitializeMagick() in -lMagickCore... no
Can't install RMagick 2.3.0. Can't find libMagick or libMagickCore, or one of the dependent libraries. Check the mkmf.log file for more detailed information.
mkmf.log
...
have_library: checking for InitializeMagick() in -lMagick... -------------------- no
"gcc -o conftest -I. -I/usr/lib/ruby/1.8/i686-linux -I. -I/usr/include/ImageMagick -I/usr/include/ImageMagick conftest.c -L'.' -L'/usr/lib' -Wl,-R'/usr/lib' -L/usr/lib -lfreetype -lz -L/usr/lib -lMagickCore -lruby-static -lMagick -lpthread -ldl -lcrypt -lm -lc"
/usr/bin/ld: cannot find -lMagick
collect2: ld returned 1 exit status
checked program was:
/* begin */
1: #include <assert.h>
2: #include <ctype.h>
3: #include <stdio.h>
4: #include <stdlib.h>
5: #include <math.h>
6: #include <time.h>
7: #include <stdint.h>
8: #include <sys/types.h>
9: #include <magick/MagickCore.h>
10:
11: /*top*/
12: int main() { return 0; }
13: int t() { void ((*volatile p)()); p = (void ((*)()))InitializeMagick; return 0; }
/* end */
"gcc -o conftest -I. -I/usr/lib/ruby/1.8/i686-linux -I. -I/usr/include/ImageMagick -I/usr/include/ImageMagick conftest.c -L'.' -L'/usr/lib' -Wl,-R'/usr/lib' -L/usr/lib -lfreetype -lz -L/usr/lib -lMagickCore -lruby-static -lMagick -lpthread -ldl -lcrypt -lm -lc"
conftest.c: In function 't':
conftest.c:13: error: too few arguments to function 'InitializeMagick'
checked program was:
/* begin */
1: #include <assert.h>
2: #include <ctype.h>
3: #include <stdio.h>
4: #include <stdlib.h>
5: #include <math.h>
6: #include <time.h>
7: #include <stdint.h>
8: #include <sys/types.h>
9: #include <magick/MagickCore.h>
10:
11: /*top*/
12: int main() { return 0; }
13: int t() { InitializeMagick(); return 0; }
/* end */
have_library: checking for InitializeMagick() in -lMagickCore... -------------------- no
"gcc -o conftest -I. -I/usr/lib/ruby/1.8/i686-linux -I. -I/usr/include/ImageMagick -I/usr/include/ImageMagick conftest.c -L'.' -L'/usr/lib' -Wl,-R'/usr/lib' -L/usr/lib -lfreetype -lz -L/usr/lib -lMagickCore -lruby-static -lMagickCore -lpthread -ldl -lcrypt -lm -lc"
conftest.c: In function 't':
conftest.c:3: error: 'InitializeMagick' undeclared (first use in this function)
conftest.c:3: error: (Each undeclared identifier is reported only once
conftest.c:3: error: for each function it appears in.)
checked program was:
/* begin */
1: /*top*/
2: int main() { return 0; }
3: int t() { void ((*volatile p)()); p = (void ((*)()))InitializeMagick; return 0; }
/* end */
"gcc -o conftest -I. -I/usr/lib/ruby/1.8/i686-linux -I. -I/usr/include/ImageMagick -I/usr/include/ImageMagick conftest.c -L'.' -L'/usr/lib' -Wl,-R'/usr/lib' -L/usr/lib -lfreetype -lz -L/usr/lib -lMagickCore -lruby-static -lMagickCore -lpthread -ldl -lcrypt -lm -lc"
/usr/lib/libMagickCore.so: undefined reference to `DrawPathStart'
/usr/lib/libMagickCore.so: undefined reference to `DrawSetViewbox'
/usr/lib/libMagickCore.so: undefined reference to `DrawSetFont'
/usr/lib/libMagickCore.so: undefined reference to `DrawSetStrokeColor'
/usr/lib/libMagickCore.so: undefined reference to `DrawColor'
/usr/lib/libMagickCore.so: undefined reference to `DrawPopPattern'
/usr/lib/libMagickCore.so: undefined reference to `DrawSetFillPatternURL'
/usr/lib/libMagickCore.so: undefined reference to `DrawSetStrokeDashArray'
/usr/lib/libMagickCore.so: undefined reference to `DrawAllocateWand'
/usr/lib/libMagickCore.so: undefined reference to `PushDrawingWand'
/usr/lib/libMagickCore.so: undefined reference to `DrawPathClose'
/usr/lib/libMagickCore.so: undefined reference to `PixelSetRedQuantum'
/usr/lib/libMagickCore.so: undefined reference to `DrawScale'
/usr/lib/libMagickCore.so: undefined reference to `DrawSetTextUnderColor'
/usr/lib/libMagickCore.so: undefined reference to `DrawLine'
/usr/lib/libMagickCore.so: undefined reference to `PopDrawingWand'
/usr/lib/libMagickCore.so: undefined reference to `DestroyPixelWand'
/usr/lib/libMagickCore.so: undefined reference to `DrawSetFontSize'
/usr/lib/libMagickCore.so: undefined reference to `DrawTranslate'
/usr/lib/libMagickCore.so: undefined reference to `DrawPathMoveToAbsolute'
/usr/lib/libMagickCore.so: undefined reference to `DrawAnnotation'
/usr/lib/libMagickCore.so: undefined reference to `DrawSetStrokeAntialias'
/usr/lib/libMagickCore.so: undefined reference to `DrawPushDefs'
/usr/lib/libMagickCore.so: undefined reference to `DrawPathFinish'
/usr/lib/libMagickCore.so: undefined reference to `DestroyMagickWand'
/usr/lib/libMagickCore.so: undefined reference to `DrawRoundRectangle'
/usr/lib/libMagickCore.so: undefined reference to `DrawPopDefs'
/usr/lib/libMagickCore.so: undefined reference to `PixelSetQuantumColor'
/usr/lib/libMagickCore.so: undefined reference to `DrawSetFillColor'
/usr/lib/libMagickCore.so: undefined reference to `DrawComposite'
/usr/lib/libMagickCore.so: undefined reference to `DrawSetClipPath'
/usr/lib/libMagickCore.so: undefined reference to `DrawRender'
/usr/lib/libMagickCore.so: undefined reference to `DrawEllipse'
/usr/lib/libMagickCore.so: undefined reference to `DrawComment'
/usr/lib/libMagickCore.so: undefined reference to `DrawPathLineToAbsolute'
/usr/lib/libMagickCore.so: undefined reference to `PixelSetBlueQuantum'
/usr/lib/libMagickCore.so: undefined reference to `DrawSetStrokeLineJoin'
/usr/lib/libMagickCore.so: undefined reference to `DrawPushPattern'
/usr/lib/libMagickCore.so: undefined reference to `PixelSetColor'
/usr/lib/libMagickCore.so: undefined reference to `DrawPushClipPath'
/usr/lib/libMagickCore.so: undefined reference to `DrawSetStrokeLineCap'
/usr/lib/libMagickCore.so: undefined reference to `DrawArc'
/usr/lib/libMagickCore.so: undefined reference to `NewMagickWandFromImage'
/usr/lib/libMagickCore.so: undefined reference to `PixelSetOpacityQuantum'
/usr/lib/libMagickCore.so: undefined reference to `DrawPopClipPath'
/usr/lib/libMagickCore.so: undefined reference to `DrawSetClipRule'
/usr/lib/libMagickCore.so: undefined reference to `NewPixelWand'
/usr/lib/libMagickCore.so: undefined reference to `DrawRotate'
/usr/lib/libMagickCore.so: undefined reference to `DrawRectangle'
/usr/lib/libMagickCore.so: undefined reference to `DrawSetStrokeWidth'
/usr/lib/libMagickCore.so: undefined reference to `DrawPathEllipticArcAbsolute'
/usr/lib/libMagickCore.so: undefined reference to `DrawSetStrokePatternURL'
/usr/lib/libMagickCore.so: undefined reference to `PixelSetGreenQuantum'
collect2: ld returned 1 exit status
checked program was:
/* begin */
1: /*top*/
2: int main() { return 0; }
3: int t() { InitializeMagick(); return 0; }
/* end */
--------------------
Can't install RMagick 2.3.0. Can't find libMagick or libMagickCore, or one of the dependent libraries. Check the mkmf.log file for more detailed information.
Any ideas?
Last edited by checkers (2008-06-24 14:05:13)
Offline
Looks like a problem with imagemagick. Submit a bug report so I don't forget.
Offline
Yeah I had the same problem as well. Fixed it by installing ImageMagick from source (not a very good solution - but I had to get it working quickly).
Offline
Bug report: http://bugs.archlinux.org/task/10574
While trying to fix this I found out that you can install an old version of imagemagick if it is in your pacman cache (or by searching the mirrors for an older version of the package). It's a bit cleaner and easier than installing from source.
To install from the pacman cache (located at /var/cache/pacman/pkg)
$ sudo pacman -U /var/cache/pacman/pkg/imagemagick-6.4.1.0-1
Installing imagemagick-6.4.1.0-1 (or earlier I would assume) fixed the problem for me as a temp solution until the bug report gives more info.
Offline
Fixed with imagemagick-6.4.2.1-1 and rmagick-2.5.1.
Offline