henrycatalinismith / ppl

The command line address book
http://henry.catalinismith.com/ppl/
Other
300 stars 18 forks source link

ERROR: Failed to build gem native extension. #91

Open Newexplorer opened 1 year ago

Newexplorer commented 1 year ago

I failed to install ppl and I got a return that I don't understand at all. $ gem install ppl

Building native extensions. This could take a while...
ERROR:  Error installing ppl:
    ERROR: Failed to build gem native extension.

    current directory: /home/porter14/gems/gems/rugged-0.24.6.1/ext/rugged
/usr/bin/ruby2.7 -I /usr/lib/ruby/vendor_ruby -r ./siteconf20230423-3970-qvl1zn.rb extconf.rb
checking for gmake... yes
checking for cmake... yes
checking for pkg-config... yes
 -- cmake .. -DBUILD_CLAR=OFF -DTHREADSAFE=ON -DBUILD_SHARED_LIBS=OFF -DCMAKE_C_FLAGS=-fPIC -DCMAKE_BUILD_TYPE=RelWithDebInfo -G "Unix Makefiles"
 -- /usr/bin/gmake
checking for -lgit2... yes
checking for git2.h... yes
creating Makefile

current directory: /home/porter14/gems/gems/rugged-0.24.6.1/ext/rugged
make DESTDIR\= clean

current directory: /home/porter14/gems/gems/rugged-0.24.6.1/ext/rugged
make DESTDIR\=
compiling rugged.c
rugged.c: In function ‘rb_git_minimize_oid’:
rugged.c:309:31: warning: passing argument 3 of ‘rb_iterate’ from incompatible pointer type [-Wincompatible-pointer-types]
  309 |  rb_iterate(rb_each, rb_enum, &minimize_cb, (VALUE)shrt);
      |                               ^~~~~~~~~~~~
      |                               |
      |                               VALUE (*)(VALUE,  git_oid_shorten *) {aka long unsigned int (*)(long unsigned int,  git_oid_shorten *)}
In file included from /usr/include/ruby-2.7.0/ruby.h:33,
                 from rugged.h:33,
                 from rugged.c:25:
/usr/include/ruby-2.7.0/ruby/ruby.h:1984:40: note: expected ‘rb_block_call_func_t’ {aka ‘long unsigned int (*)(long unsigned int,  long unsigned int,  int,  const long unsigned int *, long unsigned int)’} but argument is of type ‘VALUE (*)(VALUE,  git_oid_shorten *)’ {aka ‘long unsigned int (*)(long unsigned int,  git_oid_shorten *)’}
 1984 | VALUE rb_iterate(VALUE(*)(VALUE),VALUE,rb_block_call_func_t,VALUE);
      |                                        ^~~~~~~~~~~~~~~~~~~~
rugged.c:321:32: warning: passing argument 3 of ‘rb_iterate’ from incompatible pointer type [-Wincompatible-pointer-types]
  321 |   rb_iterate(rb_each, rb_enum, &minimize_yield, (VALUE)yield_data);
      |                                ^~~~~~~~~~~~~~~
      |                                |
      |                                VALUE (*)(VALUE,  VALUE *) {aka long unsigned int (*)(long unsigned int,  long unsigned int *)}
In file included from /usr/include/ruby-2.7.0/ruby.h:33,
                 from rugged.h:33,
                 from rugged.c:25:
/usr/include/ruby-2.7.0/ruby/ruby.h:1984:40: note: expected ‘rb_block_call_func_t’ {aka ‘long unsigned int (*)(long unsigned int,  long unsigned int,  int,  const long unsigned int *, long unsigned int)’} but argument is of type ‘VALUE (*)(VALUE,  VALUE *)’ {aka ‘long unsigned int (*)(long unsigned int,  long unsigned int *)’}
 1984 | VALUE rb_iterate(VALUE(*)(VALUE),VALUE,rb_block_call_func_t,VALUE);
      |                                        ^~~~~~~~~~~~~~~~~~~~
compiling rugged_backend.c
compiling rugged_blame.c
In file included from /usr/include/ruby-2.7.0/ruby.h:33,
                 from rugged.h:33,
                 from rugged_blame.c:25:
rugged_blame.c: In function ‘rb_git_blame_each’:
/usr/include/ruby-2.7.0/ruby/ruby.h:1871:3: error: call to ‘rb_varargs_bad_length’ declared with attribute error:  argument length doesn't match
 1871 |   rb_varargs_bad_length(argc, vargc)), \
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/ruby-2.7.0/ruby/ruby.h:2690:6: note: in expansion of macro ‘rb_varargs_argc_check’
 2690 |      rb_varargs_argc_check(rb_funcall_argc, rb_funcall_nargs), \
      |      ^~~~~~~~~~~~~~~~~~~~~
rugged_blame.c:263:10: note: in expansion of macro ‘rb_funcall’
  263 |   return rb_funcall(self, rb_intern("to_enum"), 1, CSTR2SYM("each"), self);
      |          ^~~~~~~~~~
make: *** [Makefile:245: rugged_blame.o] Error 1

make failed, exit code 2

Gem files will remain installed in /home/porter14/gems/gems/rugged-0.24.6.1 for inspection.
Results logged to /home/porter14/gems/extensions/x86_64-linux/2.7.0/rugged-0.24.6.1/gem_make.out

I hope you can help with this.

acant commented 1 year ago

Hi @Newexplorer, hopefully I can help figure out what is failing. It looks like you install is failing on when trying to compiled the rugged gem, but it also looks like it is trying to build and older version of the rugged gem.

Could you try running gem install rugged and report what happens?

Newexplorer commented 1 year ago

I received an error doing that:

gem install rugged
Fetching rugged-1.6.3.gem
Building native extensions. This could take a while...
ERROR:  Error installing rugged:
    ERROR: Failed to build gem native extension.

    current directory: /home/porter14/gems/gems/rugged-1.6.3/ext/rugged
/usr/bin/ruby2.7 -I /usr/lib/ruby/vendor_ruby -r ./siteconf20230501-2149-cjcg0y.rb extconf.rb
mkmf.rb can't find header files for ruby at /usr/lib/ruby/include/ruby.h

You might have to install separate package for the ruby development
environment, ruby-dev or ruby-devel for example.

extconf failed, exit code 1

Gem files will remain installed in /home/porter14/gems/gems/rugged-1.6.3 for inspection.
Results logged to /home/porter14/gems/extensions/x86_64-linux/2.7.0/rugged-1.6.3/gem_make.out

ruby 2.7.4p191 (2021-07-07 revision a21a3b7d23) [x86_64-linux-gnu] System: Kernel: 5.10.0-22-amd64 x86_64 bits: 64 compiler: gcc v: 10.2.1 Desktop: Openbox 3.6.1 Distro: BunsenLabs GNU/Linux 11 (Beryllium) base: Debian GNU/Linux 11

Newexplorer commented 1 year ago

I installed the following package from Synaptic (Debian): ruby-all-dev 1:27+2 (Ruby development environment)

So again: gem install rugged

Building native extensions. This could take a while...
ERROR:  Error installing rugged:
    ERROR: Failed to build gem native extension.

    current directory: /home/porter14/gems/gems/rugged-1.6.3/ext/rugged
/usr/bin/ruby2.7 -I /usr/lib/ruby/vendor_ruby -r ./siteconf20230501-5031-x0vk4e.rb extconf.rb
checking for gmake... yes
checking for cmake... yes
checking for pkg-config... yes
-- The C compiler identification is GNU 10.2.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.2") 
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE  
-- Performing Test HAVE_STRUCT_STAT_ST_MTIM
-- Performing Test HAVE_STRUCT_STAT_ST_MTIM - Success
-- Performing Test HAVE_STRUCT_STAT_ST_MTIMESPEC
-- Performing Test HAVE_STRUCT_STAT_ST_MTIMESPEC - Failed
-- Performing Test HAVE_STRUCT_STAT_MTIME_NSEC
-- Performing Test HAVE_STRUCT_STAT_MTIME_NSEC - Failed
-- Performing Test HAVE_STRUCT_STAT_NSEC
-- Performing Test HAVE_STRUCT_STAT_NSEC - Success
-- Looking for futimens
-- Looking for futimens - found
-- Performing Test IS_WALL_SUPPORTED
-- Performing Test IS_WALL_SUPPORTED - Success
-- Performing Test IS_WEXTRA_SUPPORTED
-- Performing Test IS_WEXTRA_SUPPORTED - Success
-- Performing Test IS_WDOCUMENTATION_SUPPORTED
-- Performing Test IS_WDOCUMENTATION_SUPPORTED - Failed
-- Performing Test IS_WNO_DOCUMENTATION_DEPRECATED_SYNC_SUPPORTED
-- Performing Test IS_WNO_DOCUMENTATION_DEPRECATED_SYNC_SUPPORTED - Success
-- Performing Test IS_WNO_MISSING_FIELD_INITIALIZERS_SUPPORTED
-- Performing Test IS_WNO_MISSING_FIELD_INITIALIZERS_SUPPORTED - Success
-- Performing Test IS_WMISSING_DECLARATIONS_SUPPORTED
-- Performing Test IS_WMISSING_DECLARATIONS_SUPPORTED - Success
-- Performing Test IS_WSTRICT_ALIASING_SUPPORTED
-- Performing Test IS_WSTRICT_ALIASING_SUPPORTED - Success
-- Performing Test IS_WSTRICT_PROTOTYPES_SUPPORTED
-- Performing Test IS_WSTRICT_PROTOTYPES_SUPPORTED - Success
-- Performing Test IS_WDECLARATION_AFTER_STATEMENT_SUPPORTED
-- Performing Test IS_WDECLARATION_AFTER_STATEMENT_SUPPORTED - Success
-- Performing Test IS_WSHIFT_COUNT_OVERFLOW_SUPPORTED
-- Performing Test IS_WSHIFT_COUNT_OVERFLOW_SUPPORTED - Success
-- Performing Test IS_WUNUSED_CONST_VARIABLE_SUPPORTED
-- Performing Test IS_WUNUSED_CONST_VARIABLE_SUPPORTED - Success
-- Performing Test IS_WUNUSED_FUNCTION_SUPPORTED
-- Performing Test IS_WUNUSED_FUNCTION_SUPPORTED - Success
-- Performing Test IS_WINT_CONVERSION_SUPPORTED
-- Performing Test IS_WINT_CONVERSION_SUPPORTED - Success
-- Performing Test IS_WC11_EXTENSIONS_SUPPORTED
-- Performing Test IS_WC11_EXTENSIONS_SUPPORTED - Failed
-- Performing Test IS_WC99_C11_COMPAT_SUPPORTED
-- Performing Test IS_WC99_C11_COMPAT_SUPPORTED - Success
-- Performing Test IS_WFORMAT_SUPPORTED
-- Performing Test IS_WFORMAT_SUPPORTED - Success
-- Performing Test IS_WFORMAT_SECURITY_SUPPORTED
-- Performing Test IS_WFORMAT_SECURITY_SUPPORTED - Success
-- Checking for module 'heimdal-gssapi'
--   No package 'heimdal-gssapi' found
-- Could NOT find GSSAPI (missing: GSSAPI_LIBRARIES GSSAPI_INCLUDE_DIR) 
-- Could NOT find OpenSSL, try to set the path to OpenSSL root folder in the system variable OPENSSL_ROOT_DIR (missing: OPENSSL_CRYPTO_LIBRARY OPENSSL_INCLUDE_DIR) 
CMake Error at cmake/SelectHTTPSBackend.cmake:29 (message):
  Unable to autodetect a usable HTTPS backend.Please pass the backend name
  explicitly (-DUSE_HTTPS=backend)
Call Stack (most recent call first):
  src/CMakeLists.txt:40 (include)

-- Configuring incomplete, errors occurred!
See also "/home/porter14/gems/gems/rugged-1.6.3/vendor/libgit2/build/CMakeFiles/CMakeOutput.log".
See also "/home/porter14/gems/gems/rugged-1.6.3/vendor/libgit2/build/CMakeFiles/CMakeError.log".
 -- /usr/bin/gmake
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers.  Check the mkmf.log file for more details.  You may
need configuration options.

Provided configuration options:
    --with-opt-dir
    --without-opt-dir
    --with-opt-include
    --without-opt-include=${opt-dir}/include
    --with-opt-lib
    --without-opt-lib=${opt-dir}/lib
    --with-make-prog
    --without-make-prog
    --srcdir=.
    --curdir
    --ruby=/usr/bin/$(RUBY_BASE_NAME)2.7
    --with-sha1dc
    --without-sha1dc
    --with-ssh
    --without-ssh
    --use-system-libraries
extconf.rb:26:in `sys': ERROR: '/usr/bin/gmake' failed (RuntimeError)
    from extconf.rb:110:in `block (2 levels) in <main>'
    from extconf.rb:106:in `chdir'
    from extconf.rb:106:in `block in <main>'
    from extconf.rb:103:in `chdir'
    from extconf.rb:103:in `<main>'

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

  /home/porter14/gems/extensions/x86_64-linux/2.7.0/rugged-1.6.3/mkmf.log

extconf failed, exit code 1

Gem files will remain installed in /home/porter14/gems/gems/rugged-1.6.3 for inspection.
Results logged to /home/porter14/gems/extensions/x86_64-linux/2.7.0/rugged-1.6.3/gem_make.out

No package 'heimdal-gssapi' was found, so I installed libgssapi3-heimdal 7.7.0+dfsg-2+deb11u3 but that didn't do anything at all.

Please make in the README file a DEPENDENCIES chapter, so that I will be able to determine if I am able to install it. I have saved /home/porter14/gems/gems/rugged-1.6.3/vendor/libgit2/build/CMakeFiles/CMakeError.log. If you need it, just let me know.