dependabot-script
dependabot-script copied to clipboard
Install dependencies fails when building with docker
I am following the steps for running the script with a docker. When I run the step 2 "Install dependencies", by executing the following command from the dependabot-script
project root:
docker run -v "$(pwd):/home/dependabot/dependabot-script" -w /home/dependabot/dependabot-script dependabot/dependabot-core bundle install -j 3 --path vendor
the build fails for
Installing nokogiri 1.10.10 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory:
/home/dependabot/dependabot-script/vendor/ruby/2.6.0/gems/nokogiri-1.10.10/ext/nokogiri
/usr/bin/ruby2.6 -I /usr/lib/ruby/2.6.0 -r ./siteconf20200806-1-1ydeyu7.rb
extconf.rb
checking if the C compiler accepts ... yes
Building nokogiri using packaged libraries.
Using mini_portile version 2.4.0
checking for gzdopen() in -lz... yes
checking for iconv... yes
************************************************************************
IMPORTANT NOTICE:
Building Nokogiri with a packaged version of libxml2-2.9.10
with the following patches applied:
- 0001-Revert-Do-not-URI-escape-in-server-side-includes.patch
- 0002-Remove-script-macro-support.patch
- 0003-Update-entities-to-remove-handling-of-ssi.patch
- 0004-libxml2.la-is-in-top_builddir.patch
- 0005-Fix-infinite-loop-in-xmlStringLenDecodeEntities.patch
Team Nokogiri will keep on doing their best to provide security
updates in a timely manner, but if this is a concern for you and want
to use the system library instead; abort this installation process and
reinstall nokogiri as follows:
gem install nokogiri -- --use-system-libraries
[--with-xml2-config=/path/to/xml2-config]
[--with-xslt-config=/path/to/xslt-config]
If you are using Bundler, tell it to use the option:
bundle config build.nokogiri --use-system-libraries
bundle install
Note, however, that nokogiri is not fully compatible with arbitrary
versions of libxml2 provided by OS/package vendors.
************************************************************************
Extracting libxml2-2.9.10.tar.gz into
tmp/x86_64-pc-linux-gnu/ports/libxml2/2.9.10... ERROR, review
'/home/dependabot/dependabot-script/vendor/ruby/2.6.0/gems/nokogiri-1.10.10/ext/nokogiri/tmp/x86_64-pc-linux-gnu/ports/libxml2/2.9.10/extract.log'
to see what happened. Last lines are:
========================================================================
tar: libxml2-2.9.10/test/relaxng/ambig_name-class2.rng: Cannot hard link to
‘libxml2-2.9.10/test/relaxng/ambig_name-class.xml’: Operation not permitted
tar: libxml2-2.9.10/test/relaxng/ambig_name-class.rng: Cannot hard link to
‘libxml2-2.9.10/test/relaxng/tutorA.rng’: Operation not permitted
tar: Exiting with failure status due to previous errors
========================================================================
*** extconf.rb failed ***
The full build log is here: error.txt Am I missing something, or should this be working?
Ran into a similar issue where the 2nd step (installing dependencies) kept on failing.
Using the 0.118.12
instead of the latest
tag did the trick for me. Might have been fixed by now in latest
🤷, not sure.
Check Docker Hub for a list of tags.
Using 0.118.12
worked the first time but then I started getting the same Nokogiri error.
Installing nokogiri 1.10.5 with native extensions Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
Got around this by editing the .bundle/config
file and adding BUNDLE_BUILD__NOKOGIRI: "--use-system-libraries"