{"action":"created","issue":{"url":"https://api.github.com/repos/sparklemotion/nokogiri/issues/1483","repository_url":"https://api.github.com/repos/sparklemotion/nokogiri","labels_url":"https://api.github.com/repos/sparklemotion/nokogiri/issues/1483/labels{/name}","comments_url":"https://api.github.com/repos/sparklemotion/nokogiri/issues/1483/comments","events_url":"https://api.github.com/repos/sparklemotion/nokogiri/issues/1483/events","html_url":"https://github.com/sparklemotion/nokogiri/issues/1483","id":159006584,"number":1483,"title":"Nokogiri 1.6.8 Install Fails on Mac OS X with xz installed from Homebrew","user":{"login":"halostatue","id":11361,"avatar_url":"https://avatars.githubusercontent.com/u/11361?v=3","gravatar_id":"","url":"https://api.github.com/users/halostatue","html_url":"https://github.com/halostatue","followers_url":"https://api.github.com/users/halostatue/followers","following_url":"https://api.github.com/users/halostatue/following{/other_user}","gists_url":"https://api.github.com/users/halostatue/gists{/gist_id}","starred_url":"https://api.github.com/users/halostatue/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/halostatue/subscriptions","organizations_url":"https://api.github.com/users/halostatue/orgs","repos_url":"https://api.github.com/users/halostatue/repos","events_url":"https://api.github.com/users/halostatue/events{/privacy}","received_events_url":"https://api.github.com/users/halostatue/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":48,"created_at":"2016-06-07T19:38:28Z","updated_at":"2016-11-12T19:43:32Z","closed_at":"2016-10-02T00:15:24Z","body":"Action:\n\n``` sh\nbrew install xz\ngem install nokogiri -v 1.6.8\n```\n\nExpected:\n\nNokogiri 1.6.8 installs correctly.\n\nActual:\n\n```\nRestoring gems to pristine condition...\nBuilding native extensions.  This could take a while...\nERROR:  While executing gem ... (Gem::Ext::BuildError)\n    ERROR: Failed to build gem native extension.\n\n    current directory: /Users/austin/.gem/ruby/2.3.0/gems/nokogiri-1.6.8/ext/nokogiri\n/Users/austin/.rubies/ruby-2.3.0/bin/ruby -r ./siteconf20160607-71935-1m9be2b.rb extconf.rb\nUsing pkg-config version 1.1.7\nchecking if the C compiler accepts ... yes\nchecking if the C compiler accepts -Wno-error=unused-command-line-argument-hard-error-in-future... no\nBuilding nokogiri using packaged libraries.\nUsing mini_portile version 2.1.0\nchecking for iconv.h... yes\nchecking for gzdopen() in -lz... yes\nchecking for iconv... yes\n************************************************************************\nIMPORTANT NOTICE:\n\nBuilding Nokogiri with a packaged version of libxml2-2.9.4.\n\nTeam Nokogiri will keep on doing their best to provide security\nupdates in a timely manner, but if this is a concern for you and want\nto use the system library instead; abort this installation process and\nreinstall nokogiri as follows:\n\n    gem install nokogiri -- --use-system-libraries\n        [--with-xml2-config=/path/to/xml2-config]\n        [--with-xslt-config=/path/to/xslt-config]\n\nIf you are using Bundler, tell it to use the option:\n\n    bundle config build.nokogiri --use-system-libraries\n    bundle install\n\nNote, however, that nokogiri is not fully compatible with arbitrary\nversions of libxml2 provided by OS/package vendors.\n************************************************************************\nExtracting libxml2-2.9.4.tar.gz into tmp/x86_64-apple-darwin15.3.0/ports/libxml2/2.9.4... OK\nRunning 'configure' for libxml2 2.9.4... OK\nRunning 'compile' for libxml2 2.9.4... ERROR, review '/Users/austin/.gem/ruby/2.3.0/gems/nokogiri-1.6.8/ext/nokogiri/tmp/x86_64-apple-darwin15.3.0/ports/libxml2/2.9.4/compile.log' to see what happened. Last lines are:\n========================================================================\n    unsigned short* in = (unsigned short*) inb;\n                         ^~~~~~~~~~~~~~~~~~~~~\nencoding.c:815:27: warning: cast from 'unsigned char *' to 'unsigned short *' increases required alignment from 1 to 2 [-Wcast-align]\n    unsigned short* out = (unsigned short*) outb;\n                          ^~~~~~~~~~~~~~~~~~~~~~\n4 warnings generated.\n  CC       error.lo\n  CC       parserInternals.lo\n  CC       parser.lo\n  CC       tree.lo\n  CC       hash.lo\n  CC       list.lo\n  CC       xmlIO.lo\nxmlIO.c:1450:52: error: use of undeclared identifier 'LZMA_OK'\n    ret =  (__libxml2_xzclose((xzFile) context) == LZMA_OK ) ? 0 : -1;\n                                                   ^\n1 error generated.\nmake[2]: *** [xmlIO.lo] Error 1\nmake[1]: *** [all-recursive] Error 1\nmake: *** [all] Error 2\n========================================================================\n*** extconf.rb failed ***\nCould not create Makefile due to some reason, probably lack of necessary\nlibraries and/or headers.  Check the mkmf.log file for more details.  You may\nneed configuration options.\n\nProvided configuration options:\n    --with-opt-dir\n    --without-opt-dir\n    --with-opt-include\n    --without-opt-include=${opt-dir}/include\n    --with-opt-lib\n    --without-opt-lib=${opt-dir}/lib\n    --with-make-prog\n    --without-make-prog\n    --srcdir=.\n    --curdir\n    --ruby=/Users/austin/.rubies/ruby-2.3.0/bin/$(RUBY_BASE_NAME)\n    --help\n    --clean\n    --use-system-libraries\n    --enable-static\n    --disable-static\n    --with-zlib-dir\n    --without-zlib-dir\n    --with-zlib-include\n    --without-zlib-include=${zlib-dir}/include\n    --with-zlib-lib\n    --without-zlib-lib=${zlib-dir}/lib\n    --enable-cross-build\n    --disable-cross-build\n/Users/austin/.gem/ruby/2.3.0/gems/mini_portile2-2.1.0/lib/mini_portile2/mini_portile.rb:366:in `block in execute': Failed to complete compile task (RuntimeError)\n    from /Users/austin/.gem/ruby/2.3.0/gems/mini_portile2-2.1.0/lib/mini_portile2/mini_portile.rb:337:in `chdir'\n    from /Users/austin/.gem/ruby/2.3.0/gems/mini_portile2-2.1.0/lib/mini_portile2/mini_portile.rb:337:in `execute'\n    from /Users/austin/.gem/ruby/2.3.0/gems/mini_portile2-2.1.0/lib/mini_portile2/mini_portile.rb:111:in `compile'\n    from /Users/austin/.gem/ruby/2.3.0/gems/mini_portile2-2.1.0/lib/mini_portile2/mini_portile.rb:150:in `cook'\n    from extconf.rb:364:in `block (2 levels) in process_recipe'\n    from extconf.rb:257:in `block in chdir_for_build'\n    from extconf.rb:256:in `chdir'\n    from extconf.rb:256:in `chdir_for_build'\n    from extconf.rb:363:in `block in process_recipe'\n    from extconf.rb:262:in `tap'\n    from extconf.rb:262:in `process_recipe'\n    from extconf.rb:555:in `<main>'\n\nTo see why this extension failed to compile, please check the mkmf.log which can be found here:\n\n  /Users/austin/.gem/ruby/2.3.0/extensions/x86_64-darwin-15/2.3.0-static/nokogiri-1.6.8/mkmf.log\n\nextconf failed, exit code 1\n\nGem files will remain installed in /Users/austin/.gem/ruby/2.3.0/gems/nokogiri-1.6.8 for inspection.\nResults logged to /Users/austin/.gem/ruby/2.3.0/extensions/x86_64-darwin-15/2.3.0-static/nokogiri-1.6.8/gem_make.out\ngem pristine nokogiri -v 1.6.8  9.23s user 7.56s system 92% cpu 18.089 total\n```\n\nWhen I do:\n\n``` sh\nbrew uninstall xz\ngem install nokogiri -v 1.6.8\n```\n\nNokogiri 1.6.8 installs correctly.\n"},"comment":{"url":"https://api.github.com/repos/sparklemotion/nokogiri/issues/comments/260143662","html_url":"https://github.com/sparklemotion/nokogiri/issues/1483#issuecomment-260143662","issue_url":"https://api.github.com/repos/sparklemotion/nokogiri/issues/1483","id":260143662,"user":{"login":"ylluminate","id":248440,"avatar_url":"https://avatars.githubusercontent.com/u/248440?v=3","gravatar_id":"","url":"https://api.github.com/users/ylluminate","html_url":"https://github.com/ylluminate","followers_url":"https://api.github.com/users/ylluminate/followers","following_url":"https://api.github.com/users/ylluminate/following{/other_user}","gists_url":"https://api.github.com/users/ylluminate/gists{/gist_id}","starred_url":"https://api.github.com/users/ylluminate/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ylluminate/subscriptions","organizations_url":"https://api.github.com/users/ylluminate/orgs","repos_url":"https://api.github.com/users/ylluminate/repos","events_url":"https://api.github.com/users/ylluminate/events{/privacy}","received_events_url":"https://api.github.com/users/ylluminate/received_events","type":"User","site_admin":false},"created_at":"2016-11-12T19:43:32Z","updated_at":"2016-11-12T19:43:32Z","body":"Same problem here, had to: `brew unlink xz; gem install nokogiri; brew link xz`"}}
{"actor":{"display_login":"ylluminate"}}