mardi 31 mars 2015

glib2 failing to compile for gem install dependency with cairo and poppler

We are using Cairo and Poppler c libraries for come QR code stuff, and on unix/linux/ubuntu all is fine in production and test systems. Developers on Mac OS X constantly have issue with these gems, like when we upgrade Mac OS x from 10.9 to 10.10, or upgrade ruby from 1.9 to 2.1.


Our engineers are currently stuck on the latest issue with Ruby 2.1 Rail 3.2.21 and Mac OS x 10.10. We have RVM, HomeBrew, MacPorts all setup. I suspect issue with different gcc versions apple offers vs what mac ports installs...we have tried toggling symlinks, but are not really sure....


Any ideas/thoughts welcome, thank you!



Ben$ gem install glib2 -v '2.1.0'
Building native extensions. This could take a while...
ERROR: Error installing glib2:
ERROR: Failed to build gem native extension.

/Users/Ben/.rvm/rubies/ruby-2.1.5/bin/ruby -r ./siteconf20150331-23534-17ib06g.rb extconf.rb
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... yes
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 -Wswitch-default option to compiler... yes
checking for -Wswitch-enum option to compiler... yes
checking for -Wundef option to compiler... yes
checking for -Wunsafe-loop-optimizations option to compiler... yes
checking for -Wwrite-strings option to compiler... yes
checking for rb_define_alloc_func() in ruby.h... yes
checking for rb_block_proc() in ruby.h... yes
checking for new allocation framework... yes
checking for attribute assignment... no
checking for Win32 OS... no
checking for gobject-2.0 version (>= 2.12.0)... yes
checking for gthread-2.0... yes
checking for unistd.h... yes
checking for io.h... no
checking for g_spawn_close_pid() in glib.h... yes
checking for g_thread_init() in glib.h... yes
checking for g_main_depth() in glib.h... yes
checking for g_listenv() in glib.h... yes
checking for rb_check_array_type() in ruby.h... yes
checking for rb_check_hash_type() in ruby.h... yes
checking for rb_exec_recursive() in ruby.h... yes
checking for rb_errinfo() in ruby.h... yes
checking for rb_sourcefile() in ruby.h... yes
checking for rb_sourceline() in ruby.h... yes
checking for ruby_set_current_source() in ruby.h... no
checking for rb_thread_blocking_region() in ruby.h... yes
checking for ruby_native_thread_p() in ruby.h... yes
checking for rb_thread_call_with_gvl() in ruby.h... yes
checking for rb_str_new_cstr() in ruby.h... yes
checking for rb_gc_register_mark_object() in ruby.h... yes
checking for rb_exc_new_str() in ruby.h... yes
checking for curr_thread in ruby.h,node.h... no
checking for rb_curr_thread in ruby.h,node.h... no
creating ruby-glib2.pc
creating glib-enum-types.c
creating glib-enum-types.h
creating Makefile

make "DESTDIR=" clean

make "DESTDIR="
compiling glib-enum-types.c
warning: unknown warning option '-Wunsafe-loop-optimizations'; did you mean '-Wunavailable-declarations'? [-Wunknown-warning-option]
glib-enum-types.c:1181:9: error: use of undeclared identifier 'G_WIN32_OS_ANY'
{ G_WIN32_OS_ANY, "G_WIN32_OS_ANY", "any" },
^
glib-enum-types.c:1182:9: error: use of undeclared identifier 'G_WIN32_OS_WORKSTATION'
{ G_WIN32_OS_WORKSTATION, "G_WIN32_OS_WORKSTATION", "workstation" },
^
glib-enum-types.c:1183:9: error: use of undeclared identifier 'G_WIN32_OS_SERVER'
{ G_WIN32_OS_SERVER, "G_WIN32_OS_SERVER", "server" },
^
1 warning and 3 errors generated.
make: *** [glib-enum-types.o] Error 1

make failed, exit code 2

Aucun commentaire:

Enregistrer un commentaire