Skip to content

Instantly share code, notes, and snippets.

@Watson1978
Last active October 4, 2020 14:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Watson1978/dbeb913aedd3c8e7b87bd9c8c7524b09 to your computer and use it in GitHub Desktop.
Save Watson1978/dbeb913aedd3c8e7b87bd9c8c7524b09 to your computer and use it in GitHub Desktop.
RMagick Issue #1228
FROM ubuntu:20.04
RUN apt update && \
apt install -y tzdata && \
apt install -y git pkg-config && \
apt install -y build-essential gcc g++ libx11-dev libxext-dev zlib1g-dev \
liblcms2-dev libpng-dev libjpeg-dev libfreetype6-dev libxml2-dev \
libtiff5-dev libwebp-dev gsfonts ghostscript wget
RUN wget https://imagemagick.org/download/releases/ImageMagick-7.0.10-32.tar.xz && \
tar -xf ImageMagick-7.0.10-32.tar.xz && \
cd ImageMagick-7.0.10-32 && \
./configure && \
make -j 2 install
RUN apt install -y ruby ruby-dev && \
gem install bundler
WORKDIR /opt/rmagick
@Watson1978
Copy link
Author

Watson1978 commented Sep 27, 2020

$ mkdir ~/work
$ cd ~/work
$ wget https://gist.githubusercontent.com/Watson1978/dbeb913aedd3c8e7b87bd9c8c7524b09/raw/279c47635500d00c9291c5208b6cc75e8786f824/Dockerfile

$ docker build -t rmagick-ubuntu-20_04 .
$ git clone git@github.com:rmagick/rmagick.git

$ docker run -v ~/work/rmagick:/opt/rmagick --rm -it rmagick-ubuntu-20_04 bash

# gem i bundler
# bundle
# rake clean
# rake
mkdir -p tmp/x86_64-linux-gnu/RMagick2/2.7.0
cd tmp/x86_64-linux-gnu/RMagick2/2.7.0
/usr/bin/ruby2.7 -I. ../../../../ext/RMagick/extconf.rb
checking for brew... no
checking for pacman... no
checking for Ruby version >= 2.3.0... yes
checking for pkg-config... yes
checking for outdated ImageMagick version (<= 6.7.7)... no
checking for gcc... yes
checking for __GNUC__... yes
checking for MagickCore/MagickCore.h... yes
checking for rb_gc_adjust_memory_usage() in assert.h,ctype.h,stdio.h,stdlib.h,math.h,time.h,sys/types.h,MagickCore/MagickCore.h... yes
checking for posix_memalign() in assert.h,ctype.h,stdio.h,stdlib.h,math.h,time.h,sys/types.h,MagickCore/MagickCore.h... yes
checking for malloc_usable_size() in assert.h,ctype.h,stdio.h,stdlib.h,math.h,time.h,sys/types.h,MagickCore/MagickCore.h... yes
checking for malloc_size() in assert.h,ctype.h,stdio.h,stdlib.h,math.h,time.h,sys/types.h,MagickCore/MagickCore.h... no
checking for _aligned_msize() in assert.h,ctype.h,stdio.h,stdlib.h,math.h,time.h,sys/types.h,MagickCore/MagickCore.h... no
checking for GetImageChannelEntropy() in assert.h,ctype.h,stdio.h,stdlib.h,math.h,time.h,sys/types.h,MagickCore/MagickCore.h... no
checking for SetImageGray() in assert.h,ctype.h,stdio.h,stdlib.h,math.h,time.h,sys/types.h,MagickCore/MagickCore.h... no
checking for SetMagickAlignedMemoryMethods() in assert.h,ctype.h,stdio.h,stdlib.h,math.h,time.h,sys/types.h,MagickCore/MagickCore.h... no
checking for malloc.h... yes
creating extconf.h
creating Makefile
======================================================================
Sun 04 Oct 20 14:40:32
This installation of RMagick 4.1.2 is configured for
Ruby 2.7.0 (x86_64-linux-gnu) and ImageMagick 7.0.10
======================================================================


Configured compile options: {:magick_version=>"7.0.10", :local_libs=>" -L/usr/local/lib -lMagickCore-7.Q16HDRI", :cflags=>" -fopenmp -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16 -I/usr/local/include/ImageMagick-7 -std=gnu99", :cppflags=>" -fopenmp -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16 -I/usr/local/include/ImageMagick-7", :ldflags=>" -L/usr/local/lib -lMagickCore-7.Q16HDRI", :defs=>[], :config_h=>"Makefile rmagick.h"}
cd -
cd tmp/x86_64-linux-gnu/RMagick2/2.7.0
/usr/bin/make
compiling ../../../../ext/RMagick/rmagick.c
compiling ../../../../ext/RMagick/rmdraw.c
compiling ../../../../ext/RMagick/rmenum.c
compiling ../../../../ext/RMagick/rmfill.c
compiling ../../../../ext/RMagick/rmilist.c
compiling ../../../../ext/RMagick/rmimage.c
../../../../ext/RMagick/rmimage.c: In function 'Image_gray_q':
../../../../ext/RMagick/rmimage.c:7552:32: error: 'IsGrayImage' undeclared (first use in this function); did you mean 'DrawImage'?
 7552 |     return has_attribute(self, IsGrayImage);
      |                                ^~~~~~~~~~~
      |                                DrawImage
../../../../ext/RMagick/rmimage.c:7552:32: note: each undeclared identifier is reported only once for each function it appears in
make: *** [Makefile:245: rmimage.o] Error 1
rake aborted!
Command failed with status (2): [/usr/bin/make...]
/var/lib/gems/2.7.0/gems/rake-compiler-1.1.1/lib/rake/extensiontask.rb:167:in `block (2 levels) in define_compile_tasks'
/var/lib/gems/2.7.0/gems/rake-compiler-1.1.1/lib/rake/extensiontask.rb:166:in `block in define_compile_tasks'
/usr/share/rubygems-integration/all/gems/rake-13.0.1/exe/rake:27:in `<top (required)>'
Tasks: TOP => default => spec => compile => compile:x86_64-linux-gnu => compile:RMagick2:x86_64-linux-gnu => copy:RMagick2:x86_64-linux-gnu:2.7.0 => tmp/x86_64-linux-gnu/RMagick2/2.7.0/RMagick2.so
(See full trace by running task with --trace)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment