glib2无法使用cairo和poppler编译gem安装依赖项

时间:2015-03-31 21:14:11

标签: ruby ruby-on-rails-3 glib cairo poppler

我们正在使用Cairo和Poppler c库来获取QR代码,而在unix / linux / ubuntu上,所有这些都在生产和测试系统中都很好。 Mac OS X上的开发人员经常遇到这些宝石的问题,比如我们将Mac OS x从10.9升级到10.10,或者将ruby从1.9升级到2.1。

我们的工程师目前仍处于Ruby 2.1 Rail 3.2.21和Mac OS x 10.10的最新版本。我们有RVM,HomeBrew,MacPorts所有设置。我怀疑苹果提供的不同gcc版本与mac端口安装的问题......我们试过切换符号链接,但不是很确定....

欢迎任何想法/想法,谢谢!

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

1 个答案:

答案 0 :(得分:0)

相关问题