Skip to content

install fails - ../fbuffer/fbuffer.h:151:47: error: macro "rb_str_new" requires 2 arguments, but only 1 given #66

@dizzib

Description

@dizzib
[root@kango ~]# ruby -v
ruby 2.2.2p95 (2015-04-13 revision 50295) [x86_64-linux]
[root@kango ~]#
[root@kango ~]# gem install af
Fetching: rb-readline-0.4.2.gem (100%)
WARNING:  You don't have /root/.gem/ruby/2.2.0/bin in your PATH,
    gem executables will not run.
Successfully installed rb-readline-0.4.2
Fetching: uuidtools-2.1.5.gem (100%)
Successfully installed uuidtools-2.1.5
Fetching: addressable-2.2.8.gem (100%)
Successfully installed addressable-2.2.8
Fetching: interact-0.4.8.gem (100%)
Successfully installed interact-0.4.8
Fetching: terminal-table-1.4.5.gem (100%)
Successfully installed terminal-table-1.4.5
Fetching: mime-types-1.25.1.gem (100%)
Successfully installed mime-types-1.25.1
Fetching: rest-client-1.6.9.gem (100%)
Successfully installed rest-client-1.6.9
Fetching: rubyzip-0.9.9.gem (100%)
Successfully installed rubyzip-0.9.9
Fetching: json_pure-1.6.8.gem (100%)
Successfully installed json_pure-1.6.8
Fetching: eventmachine-1.0.7.gem (100%)
Building native extensions.  This could take a while...
Successfully installed eventmachine-1.0.7
Fetching: escape_utils-1.1.0.gem (100%)
Building native extensions.  This could take a while...
Successfully installed escape_utils-1.1.0
Fetching: em-http-request-0.3.0.gem (100%)
Building native extensions.  This could take a while...
Successfully installed em-http-request-0.3.0
Fetching: em-websocket-0.3.8.gem (100%)
Successfully installed em-websocket-0.3.8
Fetching: rack-1.6.4.gem (100%)
Successfully installed rack-1.6.4
Fetching: rack-protection-1.5.3.gem (100%)
Successfully installed rack-protection-1.5.3
Fetching: tilt-2.0.1.gem (100%)
Successfully installed tilt-2.0.1
Fetching: sinatra-1.4.6.gem (100%)
Successfully installed sinatra-1.4.6
Fetching: async_sinatra-0.5.0.gem (100%)
Successfully installed async_sinatra-0.5.0
Fetching: json-1.6.8.gem (100%)
Building native extensions.  This could take a while...
ERROR:  Error installing af:
  ERROR: Failed to build gem native extension.

    /usr/bin/ruby -r ./siteconf20150709-551-lpvp9s.rb extconf.rb
creating Makefile

make "DESTDIR=" clean

make "DESTDIR="
compiling generator.c
In file included from /usr/include/assert.h:35:0,
                 from ../fbuffer/fbuffer.h:5,
                 from generator.c:1:
/usr/include/features.h:328:4: warning: #warning _FORTIFY_SOURCE requires compiling with optimization (-O) [-Wcpp]
 #  warning _FORTIFY_SOURCE requires compiling with optimization (-O)
    ^
In file included from generator.c:1:0:
../fbuffer/fbuffer.h: In function ‘fbuffer_to_s’:
../fbuffer/fbuffer.h:151:47: error: macro "rb_str_new" requires 2 arguments, but only 1 given
     VALUE result = rb_str_new(FBUFFER_PAIR(fb));
                                               ^
../fbuffer/fbuffer.h:151:20: warning: initialization makes integer from pointer without a cast
     VALUE result = rb_str_new(FBUFFER_PAIR(fb));
                    ^
In file included from generator.c:2:0:
generator.c: In function ‘cState_aref’:
generator.h:96:27: warning: variable ‘state’ set but not used [-Wunused-but-set-variable]
     JSON_Generator_State *state;              \
                           ^
generator.c:632:5: note: in expansion of macro ‘GET_STATE’
     GET_STATE(self);
     ^
generator.c: In function ‘isArrayOrObject’:
generator.c:867:22: warning: suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses]
     return *p == '[' && *q == ']' || *p == '{' && *q == '}';
                      ^
Makefile:237: recipe for target 'generator.o' failed
make: *** [generator.o] Error 1

make failed, exit code 2

Gem files will remain installed in /root/.gem/ruby/2.2.0/gems/json-1.6.8 for inspection.
Results logged to /root/.gem/ruby/2.2.0/extensions/x86_64-linux/2.2.0/json-1.6.8/gem_make.out

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions