libgit2 / libgit2/rugged

Error on compile rugged_diff.c in manjaro

Open
#777 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
2.3k
Forks
293
PR merge metrics
No merged PRs in 30d

Description

I'm having the following error when installing rugged 0.19.0 from the ready (Stable version):

Fetching rugged 0.19.0
Installing rugged 0.19.0 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

current directory:
/home/marlon/.rvm/gems/ruby-2.6.0/gems/rugged-0.19.0/ext/rugged
/home/marlon/.rvm/rubies/ruby-2.6.0/bin/ruby -I
/home/marlon/.rvm/rubies/ruby-2.6.0/lib/ruby/2.6.0 -r
./siteconf20190129-2478-5d96n4.rb extconf.rb
checking for gmake... no
checking for make... yes
 -- /usr/bin/make -f Makefile.embed
checking for -lgit2_embed... yes
checking for git2.h... yes
creating Makefile

current directory: /home/marlon/.rvm/gems/ruby-2.6.0/gems/rugged-0.19.0/ext/rugged
make "DESTDIR=" clean

current directory: /home/marlon/.rvm/gems/ruby-2.6.0/gems/rugged-0.19.0/ext/rugged
make "DESTDIR="
compiling rugged.c
rugged.c: In function ‘rugged_exception_raise’:
rugged.c:282:6: warning: function might be candidate for attribute ‘noreturn’
[-Wsuggest-attribute=noreturn]
 void rugged_exception_raise(void)
      ^~~~~~~~~~~~~~~~~~~~~~
rugged.c: At top level:
cc1: warning: unrecognized command line option ‘-Wno-self-assign’
cc1: warning: unrecognized command line option ‘-Wno-parentheses-equality’
cc1: warning: unrecognized command line option ‘-Wno-constant-logical-operand’
compiling rugged_blob.c
compiling rugged_branch.c
compiling rugged_commit.c
compiling rugged_config.c
compiling rugged_diff.c
In file included from
/home/marlon/.rvm/rubies/ruby-2.6.0/include/ruby-2.6.0/ruby.h:33,
                 from rugged.h:33,
                 from rugged_diff.c:25:
In function ‘rb_git_diff_each_delta.part.0’,
    inlined from ‘rb_git_diff_each_delta’ at rugged_diff.c:456:14:
/home/marlon/.rvm/rubies/ruby-2.6.0/include/ruby-2.6.0/ruby/ruby.h:1850:3: error:
call to ‘rb_varargs_bad_length’ declared with attribute error:  argument length
doesn't match
   rb_varargs_bad_length(argc, vargc)), \
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/marlon/.rvm/rubies/ruby-2.6.0/include/ruby-2.6.0/ruby/ruby.h:2603:6: note:
in expansion of macro ‘rb_varargs_argc_check’
      rb_varargs_argc_check(rb_funcall_argc, rb_funcall_nargs), \
      ^~~~~~~~~~~~~~~~~~~~~
rugged_diff.c:463:10: note: in expansion of macro ‘rb_funcall’
   return rb_funcall(self, rb_intern("to_enum"), 1, CSTR2SYM("each_delta"), self);
          ^~~~~~~~~~
In function ‘rb_git_diff_each_patch.part.1’,
    inlined from ‘rb_git_diff_each_patch’ at rugged_diff.c:420:14:
/home/marlon/.rvm/rubies/ruby-2.6.0/include/ruby-2.6.0/ruby/ruby.h:1850:3: error:
call to ‘rb_varargs_bad_length’ declared with attribute error:  argument length
doesn't match
   rb_varargs_bad_length(argc, vargc)), \
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/marlon/.rvm/rubies/ruby-2.6.0/include/ruby-2.6.0/ruby/ruby.h:2603:6: note:
in expansion of macro ‘rb_varargs_argc_check’
      rb_varargs_argc_check(rb_funcall_argc, rb_funcall_nargs), \
      ^~~~~~~~~~~~~~~~~~~~~
rugged_diff.c:427:10: note: in expansion of macro ‘rb_funcall’
   return rb_funcall(self, rb_intern("to_enum"), 1, CSTR2SYM("each_patch"), self);
          ^~~~~~~~~~
rugged_diff.c: At top level:
cc1: warning: unrecognized command line option ‘-Wno-self-assign’
cc1: warning: unrecognized command line option ‘-Wno-parentheses-equality’
cc1: warning: unrecognized command line option ‘-Wno-constant-logical-operand’
make: *** [Makefile:244: rugged_diff.o] Error 1

make failed, exit code 2

Gem files will remain installed in
/home/marlon/.rvm/gems/ruby-2.6.0/gems/rugged-0.19.0 for inspection.
Results logged to
/home/marlon/.rvm/gems/ruby-2.6.0/extensions/x86_64-linux/2.6.0/rugged-0.19.0/gem_make.out

An error occurred while installing rugged (0.19.0), and Bundler cannot
continue.
Make sure that `gem install rugged -v '0.19.0' --source 'https://rubygems.org/'`
succeeds before bundling.

In Gemfile:
  pronto was resolved to 0.2.6, which depends on
    rugged

Setup

  • Ruby 2.6.0
  • Pronto Stable (Rugged 0.19.0 required)

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the native-extension build with Ruby 2.6.0 and the Manjaro setup shown in the report. Inspect rugged_diff.c around the rb_funcall calls at lines 427 and 463; done means rugged 0.19.0 compiles successfully and the reported make error no longer occurs.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, ruby
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.