Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker Image CI Workflow failing #2384

Closed
2 tasks done
george-gca opened this issue May 3, 2024 · 17 comments
Closed
2 tasks done

Docker Image CI Workflow failing #2384

george-gca opened this issue May 3, 2024 · 17 comments
Assignees
Labels

Comments

@george-gca
Copy link
Collaborator

george-gca commented May 3, 2024

Have you checked that your issue isn't already filed?

  • I read through FAQ and searched through the past issues, none of which addressed my issue.
  • Yes, I have checked that this issue isn't already filed.

Bug description

Docker Image CI Workflow is failing due to mini_racer

How to reproduce the bug

Check the failed action.

Error messages and logs

Error message of interest:

compiling mini_racer_extension.cc
linking shared-object mini_racer_extension.so
/usr/bin/ld: cannot find
/var/lib/gems/3.2.0/gems/libv8-node-21.7.2.0-x86_64-linux/vendor/v8/x86_64-linux-gnu/libv8/obj/libv8_monolith.a:
No such file or directory
collect2: error: ld returned 1 exit status
make: *** [Makefile:265: mini_racer_extension.so] Error 1

An error occurred while installing mini_racer (0.12.0), and Bundler cannot continue.
In Gemfile:
   mini_racer

What operating system are you using?

Not applicable (e.g. you're using GitHub Pages or other hosting)

Where are you seeing the problem on?

Deployed site

More info

It is probably due to mini_racer version 0.12.0. I checked their repo and found this issue. Can you take a look at it @pourmand1376?

@george-gca
Copy link
Collaborator Author

Update: just asked on that bug and they pointed me to the cause.

@pourmand1376
Copy link
Collaborator

pourmand1376 commented May 3, 2024

Hmm. Thanks for pointing out the issue.

I think we should fix versions as suggested here to avoid such problem.

This would require us to commit Gemfile.lock and we should install dependecies based on that.

This way we would manually update our Gemfile.lock and if and only if, there is no problem with upstream branches, we update.

And to fix this one, I think we may need to downgrade our Gemfile to not use the latest version of this library.

Note that this way, we should only include Gemfile.lock in our Dockerfile when building images (not Gemfile).

What do you think about all this?

@george-gca
Copy link
Collaborator Author

I agree, we should commit Gemfile.lock. I believe it is safe to use the latest version of all dependencies, except mini_racer.

@wali-reheman
Copy link

I agree, we should commit Gemfile.lock. I believe it is safe to use the latest version of all dependencies, except mini_racer.

Specify an older version of mini_racer doesn't work for me

@george-gca
Copy link
Collaborator Author

Can you test this combination?

Ruby 3.3.0
mini_racer 0.12.0
libv8-node 21.7.2.0

@samyakmehta28
Copy link

I am getting the same issue when I am running docker compose up command, what should I do to rectify it?

@pourmand1376
Copy link
Collaborator

Hi @george-gca,
I used Gemfile.lock and I tested both 0.12.0 versions and 0.9.0 versions and both of them give error.

Also, we may have to provide two Gemfile.lock for solving the problem.

Other than that, current users shouldn't have any problems. For your case, you shouldn't use docker compose up. But rather first pull the image via docker compose pull and then docker compose up.

@george-gca
Copy link
Collaborator Author

Why 2 Gemfile.lock? Also, how did you solve this if both are giving errors? Have you tried this combination? I found it here.

Ruby 3.3.0
mini_racer 0.12.0
libv8-node 21.7.2.0

@betsybersson
Copy link

Is this conversation related to this build error: "Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: kitabisa/docker-slim-action@v1.0.3"

@george-gca
Copy link
Collaborator Author

It is not related, but I will open a PR for this. Thanks for noticing.

@pourmand1376
Copy link
Collaborator

pourmand1376 commented May 7, 2024

Hi @george-gca,

This is my Gemfile.lock as you have requested. Changing versions should be done via this lock file. Feel free to change it and fix it if you can.

But the problem is not solved. Also, I say maybe we should have two versions since each library has different versions for different cpu architectures.

GEM
  remote: https://rubygems.org/
  specs:
    activesupport (7.1.3.2)
      base64
      bigdecimal
      concurrent-ruby (~> 1.0, >= 1.0.2)
      connection_pool (>= 2.2.5)
      drb
      i18n (>= 1.6, < 2)
      minitest (>= 5.1)
      mutex_m
      tzinfo (~> 2.0)
    addressable (2.8.6)
      public_suffix (>= 2.0.2, < 6.0)
    base64 (0.2.0)
    bibtex-ruby (6.1.0)
      latex-decode (~> 0.0)
      racc (~> 1.7)
    bigdecimal (3.1.7)
    citeproc (1.0.10)
      namae (~> 1.0)
    citeproc-ruby (1.1.14)
      citeproc (~> 1.0, >= 1.0.9)
      csl (~> 1.6)
    classifier-reborn (2.3.0)
      fast-stemmer (~> 1.0)
      matrix (~> 0.4)
    colorator (1.1.0)
    concurrent-ruby (1.2.3)
    connection_pool (2.4.1)
    crass (1.0.6)
    csl (1.6.0)
      namae (~> 1.0)
      rexml
    csl-styles (1.0.1.11)
      csl (~> 1.0)
    css_parser (1.17.1)
      addressable
    cssminify2 (2.0.1)
    deep_merge (1.2.2)
    drb (2.2.1)
    em-websocket (0.5.3)
      eventmachine (>= 0.12.9)
      http_parser.rb (~> 0)
    eventmachine (1.2.7)
    execjs (2.9.1)
    fast-stemmer (1.0.2)
    feedjira (3.2.3)
      loofah (>= 2.3.1, < 3)
      sax-machine (>= 1.0, < 2)
    ffi (1.16.3)
    forwardable-extended (2.6.0)
    gemoji (4.1.0)
    google-protobuf (3.25.3)
    html-pipeline (2.14.3)
      activesupport (>= 2)
      nokogiri (>= 1.4)
    htmlcompressor (0.4.0)
    http_parser.rb (0.8.0)
    httparty (0.21.0)
      mini_mime (>= 1.0.0)
      multi_xml (>= 0.5.2)
    i18n (1.14.4)
      concurrent-ruby (~> 1.0)
    jekyll (4.3.3)
      addressable (~> 2.4)
      colorator (~> 1.0)
      em-websocket (~> 0.5)
      i18n (~> 1.0)
      jekyll-sass-converter (>= 2.0, < 4.0)
      jekyll-watch (~> 2.0)
      kramdown (~> 2.3, >= 2.3.1)
      kramdown-parser-gfm (~> 1.0)
      liquid (~> 4.0)
      mercenary (>= 0.3.6, < 0.5)
      pathutil (~> 0.9)
      rouge (>= 3.0, < 5.0)
      safe_yaml (~> 1.0)
      terminal-table (>= 1.8, < 4.0)
      webrick (~> 1.7)
    jekyll-archives (2.2.1)
      jekyll (>= 3.6, < 5.0)
    jekyll-email-protect (1.1.0)
    jekyll-feed (0.17.0)
      jekyll (>= 3.7, < 5.0)
    jekyll-get-json (1.0.0)
      deep_merge (~> 1.2)
      jekyll (>= 3.0)
    jekyll-imagemagick (1.4.0)
      jekyll (>= 3.4)
    jekyll-jupyter-notebook (0.0.6)
      jekyll
    jekyll-link-attributes (1.0.1)
    jekyll-minifier (0.1.10)
      cssminify2 (~> 2.0)
      htmlcompressor (~> 0.4)
      jekyll (>= 3.5)
      json-minify (~> 0.0.3)
      uglifier (~> 4.1)
    jekyll-paginate-v2 (3.0.0)
      jekyll (>= 3.0, < 5.0)
    jekyll-sass-converter (3.0.0)
      sass-embedded (~> 1.54)
    jekyll-scholar (7.1.3)
      bibtex-ruby (~> 6.0)
      citeproc-ruby (~> 1.0)
      csl-styles (~> 1.0)
      jekyll (~> 4.0)
    jekyll-sitemap (1.4.0)
      jekyll (>= 3.7, < 5.0)
    jekyll-toc (0.18.0)
      jekyll (>= 3.9)
      nokogiri (~> 1.12)
    jekyll-twitter-plugin (2.1.0)
    jekyll-watch (2.2.1)
      listen (~> 3.0)
    jemoji (0.13.0)
      gemoji (>= 3, < 5)
      html-pipeline (~> 2.2)
      jekyll (>= 3.0, < 5.0)
    json (2.7.2)
    json-minify (0.0.3)
      json (> 0)
    kramdown (2.4.0)
      rexml
    kramdown-parser-gfm (1.1.0)
      kramdown (~> 2.0)
    latex-decode (0.4.0)
    libv8-node (21.7.2.0)
    liquid (4.0.4)
    listen (3.9.0)
      rb-fsevent (~> 0.10, >= 0.10.3)
      rb-inotify (~> 0.9, >= 0.9.10)
    loofah (2.22.0)
      crass (~> 1.0.2)
      nokogiri (>= 1.12.0)
    matrix (0.4.2)
    mercenary (0.4.0)
    mini_mime (1.1.5)
    mini_racer (0.12.0)
      libv8-node (~> 21.7.2.0)
    minitest (5.22.3)
    multi_xml (0.6.0)
    mutex_m (0.2.0)
    namae (1.2.0)
      racc (~> 1.7)
    nokogiri (1.16.3)
      racc (~> 1.4)
    pathutil (0.16.2)
      forwardable-extended (~> 2.6)
    public_suffix (5.0.5)
    racc (1.7.3)
    rake (13.2.1)
    rb-fsevent (0.11.2)
    rb-inotify (0.10.1)
      ffi (~> 1.0)
    rexml (3.2.6)
    rouge (4.2.1)
    safe_yaml (1.0.5)
    sass-embedded (1.69.5)
      google-protobuf (~> 3.23)
      rake (>= 13.0.0)
    sax-machine (1.3.2)
    terminal-table (3.0.2)
      unicode-display_width (>= 1.1.1, < 3)
    tzinfo (2.0.6)
      concurrent-ruby (~> 1.0)
    uglifier (4.2.0)
      execjs (>= 0.3.0, < 3)
    unicode-display_width (2.5.0)
    unicode_utils (1.4.0)
    webrick (1.8.1)

PLATFORMS
  aarch64-linux
  x86_64-linux-gnu

DEPENDENCIES
  classifier-reborn
  css_parser
  feedjira
  httparty
  jekyll
  jekyll-archives
  jekyll-email-protect
  jekyll-feed
  jekyll-get-json
  jekyll-imagemagick
  jekyll-jupyter-notebook
  jekyll-link-attributes
  jekyll-minifier
  jekyll-paginate-v2
  jekyll-scholar
  jekyll-sitemap
  jekyll-toc
  jekyll-twitter-plugin
  jemoji
  mini_racer
  unicode_utils
  webrick

BUNDLED WITH
   2.5.7

@broadcreate
Copy link

image

@george-gca
Copy link
Collaborator Author

george-gca commented May 7, 2024

@pourmand1376 I run my jekyll site locally without Docker and it is working. Here is my Gemfile.lock, it is a little outdated. Excluding libv8-node and mini_racer, which are really a number of versions behind, the other differences from your file are smaller. Maybe we could try downgrading only these 2 libraries? Idk.

GEM
  remote: https://rubygems.org/
  specs:
    activesupport (7.1.2)
      base64
      bigdecimal
      concurrent-ruby (~> 1.0, >= 1.0.2)
      connection_pool (>= 2.2.5)
      drb
      i18n (>= 1.6, < 2)
      minitest (>= 5.1)
      mutex_m
      tzinfo (~> 2.0)
    addressable (2.8.6)
      public_suffix (>= 2.0.2, < 6.0)
    base64 (0.2.0)
    bibtex-ruby (6.0.0)
      latex-decode (~> 0.0)
    bigdecimal (3.1.5)
    citeproc (1.0.10)
      namae (~> 1.0)
    citeproc-ruby (1.1.14)
      citeproc (~> 1.0, >= 1.0.9)
      csl (~> 1.6)
    classifier-reborn (2.3.0)
      fast-stemmer (~> 1.0)
      matrix (~> 0.4)
    colorator (1.1.0)
    concurrent-ruby (1.2.2)
    connection_pool (2.4.1)
    crass (1.0.6)
    csl (1.6.0)
      namae (~> 1.0)
      rexml
    csl-styles (1.0.1.11)
      csl (~> 1.0)
    css_parser (1.16.0)
      addressable
    cssminify2 (2.0.1)
    deep_merge (1.2.2)
    drb (2.2.0)
      ruby2_keywords
    em-websocket (0.5.3)
      eventmachine (>= 0.12.9)
      http_parser.rb (~> 0)
    eventmachine (1.2.7)
    execjs (2.9.1)
    fast-stemmer (1.0.2)
    feedjira (3.2.2)
      loofah (>= 2.3.1)
      sax-machine (>= 1.0)
    ffi (1.16.3)
    forwardable-extended (2.6.0)
    gemoji (4.1.0)
    google-protobuf (3.25.1-x86_64-linux)
    html-pipeline (2.14.3)
      activesupport (>= 2)
      nokogiri (>= 1.4)
    htmlcompressor (0.4.0)
    http_parser.rb (0.8.0)
    httparty (0.21.0)
      mini_mime (>= 1.0.0)
      multi_xml (>= 0.5.2)
    i18n (1.14.1)
      concurrent-ruby (~> 1.0)
    jekyll (4.3.2)
      addressable (~> 2.4)
      colorator (~> 1.0)
      em-websocket (~> 0.5)
      i18n (~> 1.0)
      jekyll-sass-converter (>= 2.0, < 4.0)
      jekyll-watch (~> 2.0)
      kramdown (~> 2.3, >= 2.3.1)
      kramdown-parser-gfm (~> 1.0)
      liquid (~> 4.0)
      mercenary (>= 0.3.6, < 0.5)
      pathutil (~> 0.9)
      rouge (>= 3.0, < 5.0)
      safe_yaml (~> 1.0)
      terminal-table (>= 1.8, < 4.0)
      webrick (~> 1.7)
    jekyll-archives (2.2.1)
      jekyll (>= 3.6, < 5.0)
    jekyll-email-protect (1.1.0)
    jekyll-feed (0.17.0)
      jekyll (>= 3.7, < 5.0)
    jekyll-get-json (1.0.0)
      deep_merge (~> 1.2)
      jekyll (>= 3.0)
    jekyll-imagemagick (1.4.0)
      jekyll (>= 3.4)
    jekyll-jupyter-notebook (0.0.5)
      jekyll
    jekyll-link-attributes (1.0.1)
    jekyll-minifier (0.1.10)
      cssminify2 (~> 2.0)
      htmlcompressor (~> 0.4)
      jekyll (>= 3.5)
      json-minify (~> 0.0.3)
      uglifier (~> 4.1)
    jekyll-paginate-v2 (3.0.0)
      jekyll (>= 3.0, < 5.0)
    jekyll-sass-converter (3.0.0)
      sass-embedded (~> 1.54)
    jekyll-scholar (7.1.3)
      bibtex-ruby (~> 6.0)
      citeproc-ruby (~> 1.0)
      csl-styles (~> 1.0)
      jekyll (~> 4.0)
    jekyll-sitemap (1.4.0)
      jekyll (>= 3.7, < 5.0)
    jekyll-tabs (1.2.1)
      jekyll (>= 3.0, < 5.0)
    jekyll-toc (0.18.0)
      jekyll (>= 3.9)
      nokogiri (~> 1.12)
    jekyll-twitter-plugin (2.1.0)
    jekyll-watch (2.2.1)
      listen (~> 3.0)
    jemoji (0.13.0)
      gemoji (>= 3, < 5)
      html-pipeline (~> 2.2)
      jekyll (>= 3.0, < 5.0)
    json (2.7.1)
    json-minify (0.0.3)
      json (> 0)
    kramdown (2.4.0)
      rexml
    kramdown-parser-gfm (1.1.0)
      kramdown (~> 2.0)
    latex-decode (0.4.0)
    libv8-node (18.16.0.0-x86_64-linux)
    liquid (4.0.4)
    listen (3.8.0)
      rb-fsevent (~> 0.10, >= 0.10.3)
      rb-inotify (~> 0.9, >= 0.9.10)
    loofah (2.22.0)
      crass (~> 1.0.2)
      nokogiri (>= 1.12.0)
    matrix (0.4.2)
    mercenary (0.4.0)
    mini_mime (1.1.5)
    mini_racer (0.8.0)
      libv8-node (~> 18.16.0.0)
    minitest (5.20.0)
    multi_xml (0.6.0)
    mutex_m (0.2.0)
    namae (1.1.1)
    nokogiri (1.15.5-x86_64-linux)
      racc (~> 1.4)
    pathutil (0.16.2)
      forwardable-extended (~> 2.6)
    public_suffix (5.0.4)
    racc (1.7.3)
    rb-fsevent (0.11.2)
    rb-inotify (0.10.1)
      ffi (~> 1.0)
    rexml (3.2.6)
    rouge (4.2.0)
    ruby2_keywords (0.0.5)
    safe_yaml (1.0.5)
    sass-embedded (1.69.5-x86_64-linux-gnu)
      google-protobuf (~> 3.23)
    sax-machine (1.3.2)
    terminal-table (3.0.2)
      unicode-display_width (>= 1.1.1, < 3)
    tzinfo (2.0.6)
      concurrent-ruby (~> 1.0)
    uglifier (4.2.0)
      execjs (>= 0.3.0, < 3)
    unicode-display_width (2.5.0)
    unicode_utils (1.4.0)
    webrick (1.8.1)

PLATFORMS
  x86_64-linux

DEPENDENCIES
  classifier-reborn
  css_parser
  feedjira
  httparty
  jekyll
  jekyll-archives
  jekyll-email-protect
  jekyll-feed
  jekyll-get-json
  jekyll-imagemagick
  jekyll-jupyter-notebook
  jekyll-link-attributes
  jekyll-minifier
  jekyll-paginate-v2
  jekyll-scholar
  jekyll-sitemap
  jekyll-tabs
  jekyll-toc
  jekyll-twitter-plugin
  jemoji
  mini_racer
  unicode_utils
  webrick

BUNDLED WITH
   2.4.10

@george-gca
Copy link
Collaborator Author

Btw, using both my Gemfile.lock and the one currently in the repo throws this error when doing docker compose build:

23.97 current directory:
23.97 /var/lib/gems/3.2.0/gems/mini_racer-0.12.0/ext/mini_racer_extension
23.97 make DESTDIR\= sitearchdir\=./.gem.20240507-7-ifti4d
23.97 sitelibdir\=./.gem.20240507-7-ifti4d
23.97 compiling mini_racer_extension.cc
23.97 linking shared-object mini_racer_extension.so
23.97 /usr/bin/ld: cannot find
23.97 /var/lib/gems/3.2.0/gems/libv8-node-21.7.2.0-x86_64-linux/vendor/v8/x86_64-linux-gnu/libv8/obj/libv8_monolith.a:
23.97 No such file or directory
23.97 collect2: error: ld returned 1 exit status
23.97 make: *** [Makefile:265: mini_racer_extension.so] Error 1
23.97 
23.97 make failed, exit code 2

george-gca pushed a commit that referenced this issue May 9, 2024
This PR should fix the issues reported in
#2384 ,
#2392 and
#2395.
It seems that the ruby docker image is not affected by these problems.
h2o64 pushed a commit to h2o64/h2o64.github.io that referenced this issue Jun 17, 2024
This PR should fix the issues reported in
alshedivat/al-folio#2384 ,
alshedivat/al-folio#2392 and
alshedivat/al-folio#2395.
It seems that the ruby docker image is not affected by these problems.
siril-teja pushed a commit to siril-teja/siril-teja.github.io-old that referenced this issue Jun 19, 2024
This PR should fix the issues reported in
alshedivat#2384 ,
alshedivat#2392 and
alshedivat#2395.
It seems that the ruby docker image is not affected by these problems.
ngmarchant pushed a commit to ngmarchant/ngmarchant.github.io that referenced this issue Jun 21, 2024
This PR should fix the issues reported in
alshedivat/al-folio#2384 ,
alshedivat/al-folio#2392 and
alshedivat/al-folio#2395.
It seems that the ruby docker image is not affected by these problems.
karapostK pushed a commit to karapostK/karapostK.github.io that referenced this issue Jul 4, 2024
This PR should fix the issues reported in
alshedivat#2384 ,
alshedivat#2392 and
alshedivat#2395.
It seems that the ruby docker image is not affected by these problems.
Mor1Ma1 pushed a commit to Mor1Ma1/zhuoyuanmai2.github.io that referenced this issue Jul 27, 2024
This PR should fix the issues reported in
alshedivat/al-folio#2384 ,
alshedivat/al-folio#2392 and
alshedivat/al-folio#2395.
It seems that the ruby docker image is not affected by these problems.
@amztc34283
Copy link
Contributor

amztc34283 commented Aug 1, 2024

Btw, using both my Gemfile.lock and the one currently in the repo throws this error when doing docker compose build:

23.97 current directory:
23.97 /var/lib/gems/3.2.0/gems/mini_racer-0.12.0/ext/mini_racer_extension
23.97 make DESTDIR\= sitearchdir\=./.gem.20240507-7-ifti4d
23.97 sitelibdir\=./.gem.20240507-7-ifti4d
23.97 compiling mini_racer_extension.cc
23.97 linking shared-object mini_racer_extension.so
23.97 /usr/bin/ld: cannot find
23.97 /var/lib/gems/3.2.0/gems/libv8-node-21.7.2.0-x86_64-linux/vendor/v8/x86_64-linux-gnu/libv8/obj/libv8_monolith.a:
23.97 No such file or directory
23.97 collect2: error: ld returned 1 exit status
23.97 make: *** [Makefile:265: mini_racer_extension.so] Error 1
23.97 
23.97 make failed, exit code 2

@george-gca
Is this fixed with the newest code if I am using local Docker build?
I tried to docker compose up --build after not touching my repo for a few months and got the error you mentioned.

@george-gca
Copy link
Collaborator Author

Maybe you need to update your repo. Probably some changes were made to the docker image that are affecting your local repo.

@amztc34283
Copy link
Contributor

For anyone who does not want to rebase their branch for whatever reason, updating Dockerfile and Gemfile to v0.12.0 fixed this for me.

Suraj-Bhor pushed a commit to Suraj-Bhor/suraj-bhor.github.io that referenced this issue Aug 13, 2024
This PR should fix the issues reported in
alshedivat#2384 ,
alshedivat#2392 and
alshedivat#2395.
It seems that the ruby docker image is not affected by these problems.
meiqing-wang pushed a commit to meiqing-wang/meiqing-wang.github.io that referenced this issue Oct 13, 2024
This PR should fix the issues reported in
alshedivat#2384 ,
alshedivat#2392 and
alshedivat#2395.
It seems that the ruby docker image is not affected by these problems.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

7 participants