1

我们正在使用 Cairo 和 Poppler c 库来获取 QR 码的东西,在 unix/linux/ubuntu 上,在生产和测试系统中一切都很好。Mac OS X 上的开发人员经常遇到这些 gem 的问题,例如当我们将 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
4

1 回答 1

0

听起来你遇到了这个错误https://github.com/ruby-gnome2/ruby-gnome2/issues/361

于 2015-04-03T16:42:05.843 回答