TweetDeletion icon indicating copy to clipboard operation
TweetDeletion copied to clipboard

Problème d'install sur mac os x 10.13.6 / nokogiri

Open nottavi opened this issue 5 years ago • 2 comments

Hello

J'ai essayé d'installer TweetDeletion sur mon mac.

Je tombe sur cette erreur:

` Installing nokogiri 1.10.7 with native extensions Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

current directory: /private/var/folders/9g/yg6d2k1x1tgb5pc1fs1hy_z40000gn/T/bundler20200104-5751-1u33f8gnokogiri-1.10.7/gems/nokogiri-1.10.7/ext/nokogiri /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby -r ./siteconf20200104-5751-1rutqot.rb extconf.rb checking if the C compiler accepts -I /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/libxml2... yes checking if the C compiler accepts -Wno-error=unused-command-line-argument-hard-error-in-future... no Building nokogiri using packaged libraries. Using mini_portile version 2.4.0 checking for iconv.h... yes 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

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-apple-darwin17/ports/libxml2/2.9.10... OK Running git apply with /private/var/folders/9g/yg6d2k1x1tgb5pc1fs1hy_z40000gn/T/bundler20200104-5751-1u33f8gnokogiri-1.10.7/gems/nokogiri-1.10.7/patches/libxml2/0001-Revert-Do-not-URI-escape-in-server-side-includes.patch... OK Running git apply with /private/var/folders/9g/yg6d2k1x1tgb5pc1fs1hy_z40000gn/T/bundler20200104-5751-1u33f8gnokogiri-1.10.7/gems/nokogiri-1.10.7/patches/libxml2/0002-Remove-script-macro-support.patch... OK Running git apply with /private/var/folders/9g/yg6d2k1x1tgb5pc1fs1hy_z40000gn/T/bundler20200104-5751-1u33f8gnokogiri-1.10.7/gems/nokogiri-1.10.7/patches/libxml2/0003-Update-entities-to-remove-handling-of-ssi.patch... OK Running git apply with /private/var/folders/9g/yg6d2k1x1tgb5pc1fs1hy_z40000gn/T/bundler20200104-5751-1u33f8gnokogiri-1.10.7/gems/nokogiri-1.10.7/patches/libxml2/0004-libxml2.la-is-in-top_builddir.patch... OK Running 'configure' for libxml2 2.9.10... OK Running 'compile' for libxml2 2.9.10... ERROR, review '/private/var/folders/9g/yg6d2k1x1tgb5pc1fs1hy_z40000gn/T/bundler20200104-5751-1u33f8gnokogiri-1.10.7/gems/nokogiri-1.10.7/ext/nokogiri/tmp/x86_64-apple-darwin17/ports/libxml2/2.9.10/compile.log' to see what happened. Last lines are:

CC schematron.lo CC xzlib.lo CCLD libxml2.la CCLD xmllint ld: warning: The i386 architecture is deprecated for macOS (remove from the Xcode build setting: ARCHS) ld: warning: ignoring file /usr/local/Cellar/xz/5.2.4/lib/liblzma.dylib, file was built for x86_64 which is not the architecture being linked (i386): /usr/local/Cellar/xz/5.2.4/lib/liblzma.dylib Undefined symbols for architecture i386: "_lzma_auto_decoder", referenced from: _xz_head in libxml2.a(xzlib.o) "_lzma_code", referenced from: _xz_decomp in libxml2.a(xzlib.o) "_lzma_end", referenced from: ___libxml2_xzclose in libxml2.a(xzlib.o) "_lzma_properties_decode", referenced from: _is_format_lzma in libxml2.a(xzlib.o) ld: symbol(s) not found for architecture i386 clang: error: linker command failed with exit code 1 (use -v to see invocation) make[2]: *** [xmllint] Error 1 make[1]: *** [all-recursive] Error 1 make: *** [all] Error 2

*** 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=/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/$(RUBY_BASE_NAME) --help --clean --use-system-libraries --enable-static --disable-static --with-zlib-dir --without-zlib-dir --with-zlib-include --without-zlib-include=${zlib-dir}/include --with-zlib-lib --without-zlib-lib=${zlib-dir}/lib --enable-cross-build --disable-cross-build /Library/Ruby/Gems/2.3.0/gems/mini_portile2-2.4.0/lib/mini_portile2/mini_portile.rb:402:in block in execute': Failed to complete compile task (RuntimeError) from /Library/Ruby/Gems/2.3.0/gems/mini_portile2-2.4.0/lib/mini_portile2/mini_portile.rb:373:in chdir' from /Library/Ruby/Gems/2.3.0/gems/mini_portile2-2.4.0/lib/mini_portile2/mini_portile.rb:373:in execute' from /Library/Ruby/Gems/2.3.0/gems/mini_portile2-2.4.0/lib/mini_portile2/mini_portile.rb:115:in compile' from /Library/Ruby/Gems/2.3.0/gems/mini_portile2-2.4.0/lib/mini_portile2/mini_portile.rb:154:in cook' from extconf.rb:365:in block (2 levels) in process_recipe' from extconf.rb:257:in block in chdir_for_build' from extconf.rb:256:in chdir' from extconf.rb:256:in chdir_for_build' from extconf.rb:364:in block in process_recipe' from extconf.rb:262:in tap' from extconf.rb:262:in process_recipe' from extconf.rb:557:in `

'

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

/var/folders/9g/yg6d2k1x1tgb5pc1fs1hy_z40000gn/T/bundler20200104-5751-1u33f8gnokogiri-1.10.7/extensions/universal-darwin-17/2.3.0/nokogiri-1.10.7/mkmf.log

extconf failed, exit code 1

Gem files will remain installed in /var/folders/9g/yg6d2k1x1tgb5pc1fs1hy_z40000gn/T/bundler20200104-5751-1u33f8gnokogiri-1.10.7/gems/nokogiri-1.10.7 for inspection. Results logged to /var/folders/9g/yg6d2k1x1tgb5pc1fs1hy_z40000gn/T/bundler20200104-5751-1u33f8gnokogiri-1.10.7/extensions/universal-darwin-17/2.3.0/nokogiri-1.10.7/gem_make.out

An error occurred while installing nokogiri (1.10.7), and Bundler cannot continue. Make sure that gem install nokogiri -v '1.10.7' --source 'https://rubygems.org/' succeeds before bundling.

In Gemfile: tweet_deletion was resolved to 0.1.0, which depends on loofah was resolved to 2.4.0, which depends on nokogiri `

Pas un expert ni un grand fan de Ruby - mais si ça peut aider d'autres personnes.

nottavi avatar Jan 04 '20 14:01 nottavi

Je ne reproduis pas sur un 10.15

Tel que je comprends de tes logs, la dernière version de nokogiri arrive avec une version 64bits de libxml2 mais ta chaîne de build est configurée pour du 32bits.

Choses que tu peux essayer (dans l'ordre, probable qu'un des deux premier suffise) :

  • Mettre à jour XCode
  • Installer une chaîne de build 64bits complète via homebrew
  • Mettre à jour Mac OS X
  • Installer la libxml2 via homebrew (et donc avoir toutes les dépendances correctes sur ton système)
  • Installer manuellement une ancienne version de nokogiri
  • Installer la gem nokogiri en la liant avec ton libxml2 plutôt que celui fourni nativement bundle config build.nokogiri --use-system-libraries && bundle install

J'enai profité pour mettre à jour les dépendances de base dans le .spec. Plus besoin d'installer un très vieux Bundle

edas avatar Jan 06 '20 17:01 edas

Merci je vais essayer de regarder cela. Sachant que j'ai été refroidi par un upgrade Mac OS X qui s'est mal passé sur ma machine de travail, c'est pour cela que je tarde à faire l'upgrade.

N'étant pas trop à l'aise avec Ruby et avec les projets qui multiplient les dépendances, j'ai commencé à m'inspirer de ton travail pour faire une version en PHP-CLI. Je reviendrai vers ton outil (notamment pour la partie Mastodon) plus tard

nottavi avatar Jan 07 '20 10:01 nottavi