Skip to content

Instantly share code, notes, and snippets.

@rhiroyuki
Last active September 8, 2019 00:38
Show Gist options
  • Save rhiroyuki/6de570a8e063b250968256696dc4ee2e to your computer and use it in GitHub Desktop.
Save rhiroyuki/6de570a8e063b250968256696dc4ee2e to your computer and use it in GitHub Desktop.

Installing rmagick in old ruby versions on Arch:

$ sudo pacman -S libmagick6 # Make sure it's the most recent updated 6 version.

$ PKG_CONFIG_PATH=/usr/lib/imagemagick6/pkgconfig gem install rmagick -v 2.16.0

Make sure imagemagick6 is in the last version: rmagick/rmagick#785

This installation of RMagick 2.16.0 is configured for
Ruby 2.2.10 (x86_64-linux) and ImageMagick 6.9.10
======================================================================


Configured compile options: {:magick_config=>true, :with_magick_wand=>true, :pkg_config=>false, :magick_version=>"6.9.10", :local_libs=>" -lMagickWand-6.Q16HDRI -lMagickCore-6.Q16HDRI ", :cflags=>" -I/usr/include/ImageMagick-6 -fopenmp -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16 ", :cppflags=>" -I/usr/include/ImageMagick-6 -fopenmp -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16 ", :ldflags=>" -lMagickWand-6.Q16HDRI -lMagickCore-6.Q16HDRI ", :defs=>[], :config_h=>"Makefile rmagick.h"}

make "DESTDIR=" clean

make "DESTDIR="
compiling rmdraw.c
compiling rmmontage.c
compiling rmstruct.c
compiling rminfo.c
compiling rmagick.c
compiling rmutil.c
compiling rmpixel.c
compiling rmimage.c
rmimage.c: In function ‘Image_constitute’:
rmimage.c:3962:5: warning: ‘ConstituteComponentTerminus’ is deprecated [-Wdeprecated-declarations]
     DestroyConstitute();
     ^
In file included from /usr/include/ImageMagick-6/magick/MagickCore.h:98:0,
                 from rmagick.h:47,
                 from rmimage.c:13:
/usr/include/ImageMagick-6/magick/deprecate.h:328:3: note: declared here
   ConstituteComponentTerminus(void) magick_attribute((deprecated)),
   ^
rmimage.c: In function ‘Image_recolor’:
rmimage.c:10828:13: warning: return makes integer from pointer without a cast [-Wint-conversion]
       return((Image *) NULL);
             ^
In file included from /home/ricardo/.asdf/installs/ruby/2.2.10/include/ruby-2.2.0/ruby.h:33:0,
                 from rmagick.h:31,
                 from rmimage.c:13:
rmimage.c: In function ‘Image_sparse_color’:
/home/ricardo/.asdf/installs/ruby/2.2.10/include/ruby-2.2.0/ruby/ruby.h:515:57: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types]
     __extension__ ({volatile VALUE *rb_gc_guarded_ptr = (ptr); rb_gc_guarded_ptr;})
                                                         ^
/home/ricardo/.asdf/installs/ruby/2.2.10/include/ruby-2.2.0/ruby/ruby.h:530:26: note: in expansion of macro ‘RB_GC_GUARD_PTR’
 #define RB_GC_GUARD(v) (*RB_GC_GUARD_PTR(&(v)))
                          ^
rmimage.c:12690:5: note: in expansion of macro ‘RB_GC_GUARD’
     RB_GC_GUARD(args);
     ^
rmimage.c: In function ‘add_format_prefix’:
rmimage.c:14938:39: error: ‘MagickInfo {aka const struct _MagickInfo}’ has no member named ‘module’
         if (magick_info && magick_info->module)
                                       ^
rmimage.c:14947:29: error: ‘MagickInfo {aka const struct _MagickInfo}’ has no member named ‘module’
             if (magick_info2->module && strcmp(magick_info->module, magick_info2->module) != 0)
                             ^
rmimage.c:14947:59: error: ‘MagickInfo {aka const struct _MagickInfo}’ has no member named ‘module’
             if (magick_info2->module && strcmp(magick_info->module, magick_info2->module) != 0)
                                                           ^
rmimage.c:14947:81: error: ‘MagickInfo {aka const struct _MagickInfo}’ has no member named ‘module’
             if (magick_info2->module && strcmp(magick_info->module, magick_info2->module) != 0)
                                                                                 ^
make: *** [Makefile:238: rmimage.o] Error 1

make failed, exit code 2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment