zalando / zalando.github.io

Open Source Documentation and guidelines for Zalando developers
https://opensource.zalando.com
MIT License
89 stars 38 forks source link

Out of date Gemfile.lock contains dependencies that can't be installed #425

Closed szafranek closed 1 year ago

szafranek commented 2 years ago

Task Headline

When trying to install the dependencies via bundle install to test the site locally, installation fails with the following error:

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

    current directory: /Users/cszafranek/.asdf/installs/ruby/2.7.6/lib/ruby/gems/2.7.0/gems/ffi-1.10.0/ext/ffi_c
/Users/cszafranek/.asdf/installs/ruby/2.7.6/bin/ruby -I /Users/cszafranek/.asdf/installs/ruby/2.7.6/lib/ruby/2.7.0 -r ./siteconf20220827-36314-bzw2fb.rb
extconf.rb
checking for ffi_call() in -lffi... yes
checking for ffi_closure_alloc()... yes
checking for ffi_raw_call()... yes
checking for ffi_prep_raw_closure()... yes
checking for shlwapi.h... no
checking for ruby/thread.h... yes
checking for rb_thread_blocking_region()... no
checking for rb_thread_call_with_gvl()... yes
checking for rb_thread_call_without_gvl()... yes
checking for ffi_prep_cif_var()... yes
creating extconf.h
creating Makefile

current directory: /Users/cszafranek/.asdf/installs/ruby/2.7.6/lib/ruby/gems/2.7.0/gems/ffi-1.10.0/ext/ffi_c
make "DESTDIR=" clean

current directory: /Users/cszafranek/.asdf/installs/ruby/2.7.6/lib/ruby/gems/2.7.0/gems/ffi-1.10.0/ext/ffi_c
make "DESTDIR="
compiling AbstractMemory.c
compiling ArrayType.c
compiling Buffer.c
compiling Call.c
Call.c:412:20: warning: incompatible function pointer types passing 'VALUE (void *)' (aka 'unsigned long (void *)') to parameter of type 'VALUE (*)(VALUE)'
(aka 'unsigned long (*)(unsigned long)') [-Wincompatible-function-pointer-types]
        rb_rescue2(rbffi_do_blocking_call, (VALUE) bc, rbffi_save_frame_exception, (VALUE) &frame, rb_eException, (VALUE) 0);
                   ^~~~~~~~~~~~~~~~~~~~~~
/Users/cszafranek/.asdf/installs/ruby/2.7.6/include/ruby-2.7.0/ruby/ruby.h:1990:25: note: passing argument to parameter here
VALUE rb_rescue2(VALUE(*)(VALUE),VALUE,VALUE(*)(VALUE,VALUE),VALUE,...);
                        ^
Call.c:412:56: warning: incompatible function pointer types passing 'VALUE (void *, VALUE)' (aka 'unsigned long (void *, unsigned long)') to parameter of type
'VALUE (*)(VALUE, VALUE)' (aka 'unsigned long (*)(unsigned long, unsigned long)') [-Wincompatible-function-pointer-types]
        rb_rescue2(rbffi_do_blocking_call, (VALUE) bc, rbffi_save_frame_exception, (VALUE) &frame, rb_eException, (VALUE) 0);
                                                       ^~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/cszafranek/.asdf/installs/ruby/2.7.6/include/ruby-2.7.0/ruby/ruby.h:1990:47: note: passing argument to parameter here
VALUE rb_rescue2(VALUE(*)(VALUE),VALUE,VALUE(*)(VALUE,VALUE),VALUE,...);
                                              ^
2 warnings generated.
compiling ClosurePool.c
compiling DataConverter.c
compiling DynamicLibrary.c
compiling Function.c
Function.c:740:16: warning: incompatible function pointer types passing 'VALUE (void *)' (aka 'unsigned long (void *)') to parameter of type 'VALUE
(*)(VALUE)' (aka 'unsigned long (*)(unsigned long)') [-Wincompatible-function-pointer-types]
    rb_rescue2(invoke_callback, (VALUE) data, save_callback_exception, (VALUE) data, rb_eException, (VALUE) 0);
               ^~~~~~~~~~~~~~~
/Users/cszafranek/.asdf/installs/ruby/2.7.6/include/ruby-2.7.0/ruby/ruby.h:1990:25: note: passing argument to parameter here
VALUE rb_rescue2(VALUE(*)(VALUE),VALUE,VALUE(*)(VALUE,VALUE),VALUE,...);
                        ^
Function.c:740:47: warning: incompatible function pointer types passing 'VALUE (void *, VALUE)' (aka 'unsigned long (void *, unsigned long)') to parameter of
type 'VALUE (*)(VALUE, VALUE)' (aka 'unsigned long (*)(unsigned long, unsigned long)') [-Wincompatible-function-pointer-types]
    rb_rescue2(invoke_callback, (VALUE) data, save_callback_exception, (VALUE) data, rb_eException, (VALUE) 0);
                                              ^~~~~~~~~~~~~~~~~~~~~~~
/Users/cszafranek/.asdf/installs/ruby/2.7.6/include/ruby-2.7.0/ruby/ruby.h:1990:47: note: passing argument to parameter here
VALUE rb_rescue2(VALUE(*)(VALUE),VALUE,VALUE(*)(VALUE,VALUE),VALUE,...);
                                              ^
Function.c:951:17: error: implicit declaration of function 'ffi_prep_closure' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
    ffiStatus = ffi_prep_closure(code, &fnInfo->ffi_cif, callback_invoke, closure);
                ^
2 warnings and 1 error generated.
make: *** [Function.o] Error 1

make failed, exit code 2

Gem files will remain installed in /Users/cszafranek/.asdf/installs/ruby/2.7.6/lib/ruby/gems/2.7.0/gems/ffi-1.10.0 for inspection.
Results logged to /Users/cszafranek/.asdf/installs/ruby/2.7.6/lib/ruby/gems/2.7.0/extensions/arm64-darwin-21/2.7.0/ffi-1.10.0/gem_make.out

An error occurred while installing ffi (1.10.0), and Bundler cannot continue.
Make sure that `gem install ffi -v '1.10.0'` succeeds before bundling.

In Gemfile:
  github-pages was resolved to 193, which depends on
    github-pages-health-check was resolved to 1.8.1, which depends on
      typhoeus was resolved to 1.3.1, which depends on
        ethon was resolved to 0.11.0, which depends on
          ffi

System info: macOS 12.5.1 Monterey, Macbook Pro M1, 2020 Ruby 2.7.6 bundler 1.16.1

My guess is that it could be an M1 compatibility issue, but I wasn't able to resolve it by trying to run it under Rosetta 2 either.

Tasks

These are the concrete tasks to complete before the issue is marked as done:

Expected delivery

What is the concrete outcome of this work:

It should be possible to install dependencies and then test the site locally via bundle exec jekyll serve.