On my two systems (Ubuntu server 9.10 x86 and Gentoo amd64), cairo gem installation fails with the following output: -------------------------------------------------- $ sudo gem install pkg/cairo-1.8.1.gem Building native extensions. This could take a while... ERROR: Error installing pkg/cairo-1.8.1.gem: ERROR: Failed to build gem native extension. /usr/bin/ruby18 extconf.rb checking for GCC... yes checking for cairo version (>= 1.2.0)... yes checking for HAVE_RUBY_ST_H in ruby.h... no checking for ruby/st.h... no checking for HAVE_RUBY_IO_H in ruby.h... no checking for ruby/io.h... no checking for rb_errinfo() in ruby.h... no checking for enum ruby_value_type in ruby.h... no checking Win32 OS... no creating Makefile make Makefile:183: warning: overriding commands for target `/usr/lib64/ruby/gems/1.8/gems/cairo-1.8.1/src/lib' Makefile:177: warning: ignoring old commands for target `/usr/lib64/ruby/gems/1.8/gems/cairo-1.8.1/src/lib' x86_64-pc-linux-gnu-gcc -I. -I. -I/usr/lib64/ruby/1.8/x86_64-linux -I. -DRB_CAIRO_COMPILATION -fPIC -O2 -pipe -march=native -ggdb -fno-strict-aliasing -fPIC -Wall -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -c /usr/lib64/ruby/gems/1.8/gems/cairo-1.8.1/src/rb_cairo_matrix.c -osrc/rb_cairo_matrix.o x86_64-pc-linux-gnu-gcc -I. -I. -I/usr/lib64/ruby/1.8/x86_64-linux -I. -DRB_CAIRO_COMPILATION -fPIC -O2 -pipe -march=native -ggdb -fno-strict-aliasing -fPIC -Wall -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -c /usr/lib64/ruby/gems/1.8/gems/cairo-1.8.1/src/rb_cairo_font_extents.c -osrc/rb_cairo_font_extents.o x86_64-pc-linux-gnu-gcc -I. -I. -I/usr/lib64/ruby/1.8/x86_64-linux -I. -DRB_CAIRO_COMPILATION -fPIC -O2 -pipe -march=native -ggdb -fno-strict-aliasing -fPIC -Wall -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -c /usr/lib64/ruby/gems/1.8/gems/cairo-1.8.1/src/rb_cairo_exception.c -osrc/rb_cairo_exception.o x86_64-pc-linux-gnu-gcc -I. -I. -I/usr/lib64/ruby/1.8/x86_64-linux -I. -DRB_CAIRO_COMPILATION -fPIC -O2 -pipe -march=native -ggdb -fno-strict-aliasing -fPIC -Wall -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -c /usr/lib64/ruby/gems/1.8/gems/cairo-1.8.1/src/rb_cairo_private.c -osrc/rb_cairo_private.o x86_64-pc-linux-gnu-gcc -I. -I. -I/usr/lib64/ruby/1.8/x86_64-linux -I. -DRB_CAIRO_COMPILATION -fPIC -O2 -pipe -march=native -ggdb -fno-strict-aliasing -fPIC -Wall -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -c /usr/lib64/ruby/gems/1.8/gems/cairo-1.8.1/src/rb_cairo.c -osrc/rb_cairo.o x86_64-pc-linux-gnu-gcc -I. -I. -I/usr/lib64/ruby/1.8/x86_64-linux -I. -DRB_CAIRO_COMPILATION -fPIC -O2 -pipe -march=native -ggdb -fno-strict-aliasing -fPIC -Wall -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -c /usr/lib64/ruby/gems/1.8/gems/cairo-1.8.1/src/rb_cairo_glyph.c -osrc/rb_cairo_glyph.o x86_64-pc-linux-gnu-gcc -I. -I. -I/usr/lib64/ruby/1.8/x86_64-linux -I. -DRB_CAIRO_COMPILATION -fPIC -O2 -pipe -march=native -ggdb -fno-strict-aliasing -fPIC -Wall -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -c /usr/lib64/ruby/gems/1.8/gems/cairo-1.8.1/src/rb_cairo_surface.c -osrc/rb_cairo_surface.o x86_64-pc-linux-gnu-gcc -I. -I. -I/usr/lib64/ruby/1.8/x86_64-linux -I. -DRB_CAIRO_COMPILATION -fPIC -O2 -pipe -march=native -ggdb -fno-strict-aliasing -fPIC -Wall -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -c /usr/lib64/ruby/gems/1.8/gems/cairo-1.8.1/src/rb_cairo_text_extents.c -osrc/rb_cairo_text_extents.o x86_64-pc-linux-gnu-gcc -I. -I. -I/usr/lib64/ruby/1.8/x86_64-linux -I. -DRB_CAIRO_COMPILATION -fPIC -O2 -pipe -march=native -ggdb -fno-strict-aliasing -fPIC -Wall -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -c /usr/lib64/ruby/gems/1.8/gems/cairo-1.8.1/src/rb_cairo_path.c -osrc/rb_cairo_path.o x86_64-pc-linux-gnu-gcc -I. -I. -I/usr/lib64/ruby/1.8/x86_64-linux -I. -DRB_CAIRO_COMPILATION -fPIC -O2 -pipe -march=native -ggdb -fno-strict-aliasing -fPIC -Wall -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -c /usr/lib64/ruby/gems/1.8/gems/cairo-1.8.1/src/rb_cairo_scaled_font.c -osrc/rb_cairo_scaled_font.o x86_64-pc-linux-gnu-gcc -I. -I. -I/usr/lib64/ruby/1.8/x86_64-linux -I. -DRB_CAIRO_COMPILATION -fPIC -O2 -pipe -march=native -ggdb -fno-strict-aliasing -fPIC -Wall -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -c /usr/lib64/ruby/gems/1.8/gems/cairo-1.8.1/src/rb_cairo_text_cluster.c -osrc/rb_cairo_text_cluster.o x86_64-pc-linux-gnu-gcc -I. -I. -I/usr/lib64/ruby/1.8/x86_64-linux -I. -DRB_CAIRO_COMPILATION -fPIC -O2 -pipe -march=native -ggdb -fno-strict-aliasing -fPIC -Wall -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -c /usr/lib64/ruby/gems/1.8/gems/cairo-1.8.1/src/rb_cairo_context.c -osrc/rb_cairo_context.o x86_64-pc-linux-gnu-gcc -I. -I. -I/usr/lib64/ruby/1.8/x86_64-linux -I. -DRB_CAIRO_COMPILATION -fPIC -O2 -pipe -march=native -ggdb -fno-strict-aliasing -fPIC -Wall -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -c /usr/lib64/ruby/gems/1.8/gems/cairo-1.8.1/src/rb_cairo_font_face.c -osrc/rb_cairo_font_face.o x86_64-pc-linux-gnu-gcc -I. -I. -I/usr/lib64/ruby/1.8/x86_64-linux -I. -DRB_CAIRO_COMPILATION -fPIC -O2 -pipe -march=native -ggdb -fno-strict-aliasing -fPIC -Wall -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -c /usr/lib64/ruby/gems/1.8/gems/cairo-1.8.1/src/rb_cairo_pattern.c -osrc/rb_cairo_pattern.o x86_64-pc-linux-gnu-gcc -I. -I. -I/usr/lib64/ruby/1.8/x86_64-linux -I. -DRB_CAIRO_COMPILATION -fPIC -O2 -pipe -march=native -ggdb -fno-strict-aliasing -fPIC -Wall -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -c /usr/lib64/ruby/gems/1.8/gems/cairo-1.8.1/src/rb_cairo_font_options.c -osrc/rb_cairo_font_options.o x86_64-pc-linux-gnu-gcc -I. -I. -I/usr/lib64/ruby/1.8/x86_64-linux -I. -DRB_CAIRO_COMPILATION -fPIC -O2 -pipe -march=native -ggdb -fno-strict-aliasing -fPIC -Wall -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -c /usr/lib64/ruby/gems/1.8/gems/cairo-1.8.1/src/rb_cairo_constants.c -osrc/rb_cairo_constants.o x86_64-pc-linux-gnu-gcc -shared -o src/cairo.so src/rb_cairo_matrix.o src/rb_cairo_font_extents.o src/rb_cairo_exception.o src/rb_cairo_private.o src/rb_cairo.o src/rb_cairo_glyph.o src/rb_cairo_surface.o src/rb_cairo_text_extents.o src/rb_cairo_path.o src/rb_cairo_scaled_font.o src/rb_cairo_text_cluster.o src/rb_cairo_context.o src/rb_cairo_font_face.o src/rb_cairo_pattern.o src/rb_cairo_font_options.o src/rb_cairo_constants.o -L. -L/usr/lib64 -Wl,-R/usr/lib64 -L. -Wl,-O1 -rdynamic -Wl,-export-dynamic -Wl,-R -Wl,/usr/lib64 -L/usr/lib64 -lruby18 -lcairo -lrt -ldl -lcrypt -lm -lc make install Makefile:183: warning: overriding commands for target `/usr/lib64/ruby/gems/1.8/gems/cairo-1.8.1/src/lib' Makefile:177: warning: ignoring old commands for target `/usr/lib64/ruby/gems/1.8/gems/cairo-1.8.1/src/lib' /usr/bin/install -c -m 0755 src/cairo.so /usr/lib64/ruby/gems/1.8/gems/cairo-1.8.1/src/lib make: Circular /usr/lib64/ruby/gems/1.8/gems/cairo-1.8.1/src/lib/cairo/colors.rb <- /usr/lib64/ruby/gems/1.8/gems/cairo-1.8.1/src/lib/cairo/colors.rb dependency dropped. /usr/bin/install -c -m 644 /usr/lib64/ruby/gems/1.8/gems/cairo-1.8.1/src/lib/cairo/colors.rb /usr/lib64/ruby/gems/1.8/gems/cairo-1.8.1/src/lib/cairo /usr/bin/install: `/usr/lib64/ruby/gems/1.8/gems/cairo-1.8.1/src/lib/cairo/colors.rb' and `/usr/lib64/ruby/gems/1.8/gems/cairo-1.8.1/src/lib/cairo/colors.rb' are the same file make: *** [/usr/lib64/ruby/gems/1.8/gems/cairo-1.8.1/src/lib/cairo/colors.rb] Error 1 Gem files will remain installed in /usr/lib64/ruby/gems/1.8/gems/cairo-1.8.1 for inspection. Results logged to /usr/lib64/ruby/gems/1.8/gems/cairo-1.8.1/gem_make.out ---------------------------------------------------------------------- It seems to be caused by the require_paths property in the Rakefile gem specification. Rubygem take that property as reference to build the installation path. Commenting the line solved the problem for me but I don't know if this is the right way to fix it: --------------------------------------------------- --- /usr/lib/ruby/gems/1.8/gems/cairo-1.8.1/Rakefile 2010-02-11 09:54:19.670162551 +0100 +++ rcairo/Rakefile 2010-02-11 09:36:59.200068718 +0100 @@ -77,7 +77,7 @@ project.test_globs = [] project.spec_extras = { :extensions => ['extconf.rb'], - :require_paths => ['src/lib', 'src'], + #:require_paths => ['src/lib', 'src'], :has_rdoc => false, } platform = ENV["FORCE_PLATFORM"] ----------------------------------------------
I'm not well versed in ruby development, so I'm not sure how to reproduce this on ubuntu. However, there's no such file Rakefile in the cairo codebase so I wonder if this bug is in some package other than cairo itself? If there is something that needs changed in cairo itself, please propose a patch.
I completely forgot this bug but it is no more relevant. Cairo ruby bindings have been moved to github since. http://cairographics.org/rcairo/
-- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/cairo/cairo/issues/206.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.