andymeneely / squib

A Ruby DSL for prototyping card games.

Home Page:http://squib.rocks

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cannot install current Squib gem / use docker image

XCompWiz opened this issue · comments

I've been using squib for all kinds of things, and I really love it. :D It's surprisingly versatile. I even used it for my wedding placecards!

Lately I've wanted to be able to build cards for a project using GitLab, but I cannot create a working image, and the docker image provided doesn't seem to actually contain squib.
Using a ruby docker image and then trying to install the squib gem fails.

Attempt to install squib on a ruby docker image in GitLab
Using Docker executor with image ruby:2.6 ...
Pulling docker image ruby:2.6 ...
Using docker image sha256:7876e09efe18221ed0fa956704af46c2206e55bd40bf9ce948fb1be9d70d5e14 for ruby:2.6 with digest ruby@sha256:52be47705a53b2a20cf05f7630e801e8b8495974485d542f3bb7f9a4cc38f61c ...

$ gem install squib
Successfully installed pkg-config-1.4.4
Successfully installed native-package-installer-1.0.9
Building native extensions. This could take a while...
Successfully installed cairo-1.16.6
Successfully installed classy_hash-0.2.1
Building native extensions. This could take a while...
Successfully installed glib2-3.4.3
Building native extensions. This could take a while...
ERROR:  Error installing squib:
	ERROR: Failed to build gem native extension.
    current directory: /usr/local/bundle/gems/gobject-introspection-3.4.3/ext/gobject-introspection
/usr/local/bin/ruby -I /usr/local/lib/ruby/2.6.0 -r ./siteconf20201014-10-1qpl12a.rb extconf.rb
checking for --enable-debug-build option... no
checking for -Wall option to compiler... yes
checking for -Waggregate-return option to compiler... yes
checking for -Wcast-align option to compiler... yes
checking for -Wextra option to compiler... yes
checking for -Wformat=2 option to compiler... yes
checking for -Winit-self option to compiler... yes
checking for -Wlarger-than-65500 option to compiler... yes
checking for -Wmissing-declarations option to compiler... yes
checking for -Wmissing-format-attribute option to compiler... yes
checking for -Wmissing-include-dirs option to compiler... yes
checking for -Wmissing-noreturn option to compiler... yes
checking for -Wmissing-prototypes option to compiler... yes
checking for -Wnested-externs option to compiler... no
checking for -Wold-style-definition option to compiler... yes
checking for -Wpacked option to compiler... yes
checking for -Wp,-D_FORTIFY_SOURCE=2 option to compiler... yes
checking for -Wpointer-arith option to compiler... yes
checking for -Wundef option to compiler... yes
checking for -Wout-of-line-declaration option to compiler... no
checking for -Wunsafe-loop-optimizations option to compiler... yes
checking for -Wwrite-strings option to compiler... yes
checking for Homebrew... no
checking for gobject-introspection-1.0... no
installing 'libgirepository1.0-dev' native package... failed
Failed to run 'apt install -V -y libgirepository1.0-dev'.
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers.  Check the mkmf.log file for more details.  You may
need configuration options.
Provided configuration options:
	--with-opt-dir
	--without-opt-dir
	--with-opt-include
	--without-opt-include=${opt-dir}/include
	--with-opt-lib
	--without-opt-lib=${opt-dir}/lib
	--with-make-prog
	--without-make-prog
	--srcdir=.
	--curdir
	--ruby=/usr/local/bin/$(RUBY_BASE_NAME)
	--enable-debug-build
	--disable-debug-build
	--with-pkg-config
	--without-pkg-config
	--with-override-variables
	--without-override-variables
To see why this extension failed to compile, please check the mkmf.log which can be found here:
  /usr/local/bundle/extensions/x86_64-linux/2.6.0/gobject-introspection-3.4.3/mkmf.log
extconf failed, exit code 1
Gem files will remain installed in /usr/local/bundle/gems/gobject-introspection-3.4.3 for inspection.
Results logged to /usr/local/bundle/extensions/x86_64-linux/2.6.0/gobject-introspection-3.4.3/gem_make.out

My friend and I have been banging our heads against this, and will continue to do so, but I wanted to report it to (a) see if there's known issues and (b) have somewhere to report if we solve either issue.

My friend produced a docker file from which to build a viable squib docker image.

FROM ubuntu:18.04
WORKDIR /root/

RUN apt-get update && apt-get install -yq build-essential ruby-dev ruby ruby-gdk-pixbuf2
RUN gem install rake
RUN gem install squib

I'll take a look at this. I personally use a slightly different dockerfile for my builds, so perhaps something changed. Thanks for the report!

Docker is a larger part of my testing nowadays, so this should be gone.