mberlanda / cheidelacoriera

This Rails application aims to become a management system for away fans.
GNU General Public License v3.0
2 stars 1 forks source link

chore: lock bundler platforms to fix CI #255

Closed mberlanda closed 1 year ago

mberlanda commented 1 year ago
mberlanda commented 1 year ago

The first commit fixes the docker build in Ci (used to work locally even before this change).

mini-racer cannot be installed in ci due to libv8-node failure

current directory:
/home/runner/work/cheidelacoriera/cheidelacoriera/vendor/bundle/ruby/2.7.0/gems/libv8-node-16.10.0.0/ext/libv8-node
/opt/hostedtoolcache/Ruby/2.7.8/x64/bin/ruby -I
/opt/hostedtoolcache/Ruby/2.7.8/x64/lib/ruby/2.7.0 -r
./siteconf20230723-1707-17ein8n.rb extconf.rb
creating Makefile
==== in
/home/runner/work/cheidelacoriera/cheidelacoriera/vendor/bundle/ruby/2.7.0/gems/libv8-node-16.10.0.0/ext/libv8-node
==== running
/home/runner/work/cheidelacoriera/cheidelacoriera/vendor/bundle/ruby/2.7.0/gems/libv8-node-16.10.0.0/libexec/download-node
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
33 61.6M   33 20.7M    0     0  25.3M      0  0:00:02 --:--:--  0:00:02 25.3M
100 61.6M  100 61.6M    0     0  59.2M      0  0:00:01  0:00:01 --:--:-- 59.2M
/home/runner/work/cheidelacoriera/cheidelacoriera/vendor/bundle/ruby/2.7.0/gems/libv8-node-16.10.0.0/libexec/../src/node-v16.10.0.tar.gz:
OK
==== in
/home/runner/work/cheidelacoriera/cheidelacoriera/vendor/bundle/ruby/2.7.0/gems/libv8-node-16.10.0.0/ext/libv8-node
==== running
/home/runner/work/cheidelacoriera/cheidelacoriera/vendor/bundle/ruby/2.7.0/gems/libv8-node-16.10.0.0/libexec/extract-node
patching file tools/icu/icutrim.py
patching file tools/genv8constants.py
==== in
/home/runner/work/cheidelacoriera/cheidelacoriera/vendor/bundle/ruby/2.7.0/gems/libv8-node-16.10.0.0/ext/libv8-node
==== running
/home/runner/work/cheidelacoriera/cheidelacoriera/vendor/bundle/ruby/2.7.0/gems/libv8-node-16.10.0.0/libexec/build-libv8
parallel job count: 2
configure: --openssl-no-asm --without-npm --shared --with-intl=full-icu
compilers: CC='clang' CXX='clang++' CC_host='' CXX_host=''
Ubuntu clang version 14.0.0-1ubuntu1
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/10
Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/11
Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/12
Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/9
Selected GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/12
Candidate multilib: .;@m64
Selected multilib: .;@m64
Ubuntu clang version 14.0.0-1ubuntu1
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/10
Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/11
Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/12
Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/9
Selected GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/12
Candidate multilib: .;@m64
Selected multilib: .;@m64
Please use python3.9 or python3.8 or python3.7 or python3.6.
Node.js configure: Found Python 3.10.6...
/home/runner/work/cheidelacoriera/cheidelacoriera/vendor/bundle/ruby/2.7.0/gems/libv8-node-16.10.0.0/ext/libv8-node/builder.rb:14:in
`build_libv8!': failed to build libv8 16.10.0 (Libv8::Node::BuilderError)
from
/home/runner/work/cheidelacoriera/cheidelacoriera/vendor/bundle/ruby/2.7.0/gems/libv8-node-16.10.0.0/ext/libv8-node/location.rb:30:in
`install!'
    from extconf.rb:9:in `<main>'

extconf failed, exit code 1

Gem files will remain installed in
/home/runner/work/cheidelacoriera/cheidelacoriera/vendor/bundle/ruby/2.7.0/gems/libv8-node-16.10.0.0
for inspection.
Results logged to
/home/runner/work/cheidelacoriera/cheidelacoriera/vendor/bundle/ruby/2.7.0/extensions/x86_64-linux/2.7.0/libv8-node-16.10.0.0/gem_make.out

/opt/hostedtoolcache/Ruby/2.7.8/x64/lib/ruby/2.7.0/rubygems/ext/builder.rb:99:in
`run'
/opt/hostedtoolcache/Ruby/2.7.8/x64/lib/ruby/2.7.0/rubygems/ext/ext_conf_builder.rb:48:in
`block in build'
  /opt/hostedtoolcache/Ruby/2.7.8/x64/lib/ruby/2.7.0/tempfile.rb:291:in `open'
/opt/hostedtoolcache/Ruby/2.7.8/x64/lib/ruby/2.7.0/rubygems/ext/ext_conf_builder.rb:30:in
`build'
/opt/hostedtoolcache/Ruby/2.7.8/x64/lib/ruby/2.7.0/rubygems/ext/builder.rb:169:in
`block in build_extension'
/opt/hostedtoolcache/Ruby/2.7.8/x64/lib/ruby/2.7.0/rubygems/ext/builder.rb:165:in
`synchronize'
/opt/hostedtoolcache/Ruby/2.7.8/x64/lib/ruby/2.7.0/rubygems/ext/builder.rb:165:in
`build_extension'
/opt/hostedtoolcache/Ruby/2.7.8/x64/lib/ruby/2.7.0/rubygems/ext/builder.rb:210:in
`block in build_extensions'
/opt/hostedtoolcache/Ruby/2.7.8/x64/lib/ruby/2.7.0/rubygems/ext/builder.rb:207:in
`each'
/opt/hostedtoolcache/Ruby/2.7.8/x64/lib/ruby/2.7.0/rubygems/ext/builder.rb:207:in
`build_extensions'
/opt/hostedtoolcache/Ruby/2.7.8/x64/lib/ruby/2.7.0/rubygems/installer.rb:844:in
`build_extensions'
/opt/hostedtoolcache/Ruby/2.7.8/x64/lib/ruby/gems/2.7.0/gems/bundler-2.3.8/lib/bundler/rubygems_gem_installer.rb:71:in
`build_extensions'
/opt/hostedtoolcache/Ruby/2.7.8/x64/lib/ruby/gems/2.7.0/gems/bundler-2.3.8/lib/bundler/rubygems_gem_installer.rb:28:in
`install'
/opt/hostedtoolcache/Ruby/2.7.8/x64/lib/ruby/gems/2.7.0/gems/bundler-2.3.8/lib/bundler/source/rubygems.rb:204:in
`install'
/opt/hostedtoolcache/Ruby/2.7.8/x64/lib/ruby/gems/2.7.0/gems/bundler-2.3.8/lib/bundler/installer/gem_installer.rb:54:in
`install'
/opt/hostedtoolcache/Ruby/2.7.8/x64/lib/ruby/gems/2.7.0/gems/bundler-2.3.8/lib/bundler/installer/gem_installer.rb:16:in
`install_from_spec'
/opt/hostedtoolcache/Ruby/2.7.8/x64/lib/ruby/gems/2.7.0/gems/bundler-2.3.8/lib/bundler/installer/parallel_installer.rb:186:in
`do_install'
/opt/hostedtoolcache/Ruby/2.7.8/x64/lib/ruby/gems/2.7.0/gems/bundler-2.3.8/lib/bundler/installer/parallel_installer.rb:177:in
`block in worker_pool'
/opt/hostedtoolcache/Ruby/2.7.8/x64/lib/ruby/gems/2.7.0/gems/bundler-2.3.8/lib/bundler/worker.rb:62:in
`apply_func'
/opt/hostedtoolcache/Ruby/2.7.8/x64/lib/ruby/gems/2.7.0/gems/bundler-2.3.8/lib/bundler/worker.rb:57:in
`block in process_queue'
/opt/hostedtoolcache/Ruby/2.7.8/x64/lib/ruby/gems/2.7.0/gems/bundler-2.3.8/lib/bundler/worker.rb:54:in
`loop'
/opt/hostedtoolcache/Ruby/2.7.8/x64/lib/ruby/gems/2.7.0/gems/bundler-2.3.8/lib/bundler/worker.rb:54:in
`process_queue'
/opt/hostedtoolcache/Ruby/2.7.8/x64/lib/ruby/gems/2.7.0/gems/bundler-2.3.8/lib/bundler/worker.rb:91:in
`block (2 levels) in create_threads'

An error occurred while installing libv8-node (16.10.0.0), and Bundler cannot
continue.

In Gemfile:
  mini_racer was resolved to 0.6.0, which depends on
    libv8-node
Error: The process '/opt/hostedtoolcache/Ruby/2.7.8/x64/bin/bundle' failed with exit code 5
mberlanda commented 1 year ago

A proper fix for this changes requires to run a build from a adm64 machine. Even enabling Rosetta on my new Silicon Apple laptop is not completing the builds to be pushed to Heroku. In the next PR, I am going to add the configuration to build directly in heroku