on-rails-make在运行gem-install-u-record时失败

qgzx9mmu  于 2021-06-08  发布在  Hbase
关注(0)|答案(1)|浏览(375)

我想用hbase连接rails,我想建立massiverecord,但是我不能安装gem。我已经跑了:gem安装了大量的ju记录。当我执行上述命令时,我有sudo特权。
我遵照这里的指示:https://github.com/companybook/massive_record/
我是ruby新手,不知道该怎么处理这个错误。我做错什么了吗?错误:

ERROR:  Error installing massive_record:
    ERROR: Failed to build gem native extension.

    current directory: /Library/Ruby/Gems/2.3.0/gems/thrift-0.6.0/ext
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby -r ./siteconf20180208-14824-jzhruq.rb extconf.rb
checking for strlcpy() in string.h... yes
creating Makefile

To see why this extension failed to compile, please check the mkmf.log which can be found here:

  /Library/Ruby/Gems/2.3.0/extensions/universal-darwin-17/2.3.0/thrift-0.6.0/mkmf.log

current directory: /Library/Ruby/Gems/2.3.0/gems/thrift-0.6.0/ext
make "DESTDIR=" clean

current directory: /Library/Ruby/Gems/2.3.0/gems/thrift-0.6.0/ext
make "DESTDIR="
compiling binary_protocol_accelerated.c
compiling compact_protocol.c
compiling memory_buffer.c
compiling protocol.c
compiling thrift_native.c
compiling struct.c
struct.c:48:15: error: expected parameter declarator
extern size_t strlcpy(char *, const char *, size_t);
              ^
/usr/include/secure/_string.h:108:47: note: expanded from macro 'strlcpy'
                __builtin___strlcpy_chk (dest, __VA_ARGS__, __darwin_obsz (dest))
                                                            ^
/usr/include/secure/_common.h:39:62: note: expanded from macro '__darwin_obsz'

# define __darwin_obsz(object) __builtin_object_size (object, _USE_FORTIFY_LEVEL > 1 ? 1 : 0)

                                                             ^
/usr/include/secure/_common.h:30:32: note: expanded from macro '_USE_FORTIFY_LEVEL'

# define _USE_FORTIFY_LEVEL 2

                               ^
struct.c:48:15: error: expected ')'
/usr/include/secure/_string.h:108:47: note: expanded from macro 'strlcpy'
                __builtin___strlcpy_chk (dest, __VA_ARGS__, __darwin_obsz (dest))
                                                            ^
/usr/include/secure/_common.h:39:62: note: expanded from macro '__darwin_obsz'

# define __darwin_obsz(object) __builtin_object_size (object, _USE_FORTIFY_LEVEL > 1 ? 1 : 0)

                                                             ^
/usr/include/secure/_common.h:30:32: note: expanded from macro '_USE_FORTIFY_LEVEL'

# define _USE_FORTIFY_LEVEL 2

                               ^
struct.c:48:15: note: to match this '('
/usr/include/secure/_string.h:108:47: note: expanded from macro 'strlcpy'
                __builtin___strlcpy_chk (dest, __VA_ARGS__, __darwin_obsz (dest))
                                                            ^
/usr/include/secure/_common.h:39:53: note: expanded from macro '__darwin_obsz'

# define __darwin_obsz(object) __builtin_object_size (object, _USE_FORTIFY_LEVEL > 1 ? 1 : 0)

                                                    ^
struct.c:48:15: error: type specifier missing, defaults to 'int' [-Werror,-Wimplicit-int]
extern size_t strlcpy(char *, const char *, size_t);
              ^
/usr/include/secure/_string.h:108:47: note: expanded from macro 'strlcpy'
                __builtin___strlcpy_chk (dest, __VA_ARGS__, __darwin_obsz (dest))
                                                            ^
/usr/include/secure/_common.h:39:31: note: expanded from macro '__darwin_obsz'

# define __darwin_obsz(object) __builtin_object_size (object, _USE_FORTIFY_LEVEL > 1 ? 1 : 0)

4 errors generated.
make:***[struct.o] Error 1

make failed, exit code 2
y1aodyip

y1aodyip1#

试着运行下面的命令,让我知道它是如何运行的!

gem install massive_record -- --with-cppflags=\"-D_FORTIFY_SOURCE=0 -Wno-shift-negative-value\"

相关问题