rubys / nokogumbo

A Nokogiri interface to the Gumbo HTML5 parser.
Apache License 2.0
186 stars 114 forks source link

Blocker: Unable to install nokogumbo 2.0.5 on MAC #184

Closed Ganesan-Apollo-TW closed 1 year ago

Ganesan-Apollo-TW commented 1 year ago

Error:

ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) make: [nokogumbo.bundle] Error 1

make failed, exit code 2

Nokogiri (1.8.4)

---
warnings: []
nokogiri: 1.8.4
ruby:
  version: 3.0.1
  platform: x86_64-darwin22
  description: ruby 3.0.1p64 (2021-04-05 revision 0fb782ee38) [x86_64-darwin22]
  engine: ruby
libxml:
  binding: extension
  source: packaged
  libxml2_path: "/Users/ganesan/.rvm/gems/ruby-3.0.1/gems/nokogiri-1.8.4/ports/x86_64-apple-darwin22/libxml2/2.9.8"
  libxslt_path: "/Users/ganesan/.rvm/gems/ruby-3.0.1/gems/nokogiri-1.8.4/ports/x86_64-apple-darwin22/libxslt/1.1.32"
  libxml2_patches:
  - 0001-Revert-Do-not-URI-escape-in-server-side-includes.patch
  libxslt_patches: []
  compiled: 2.9.8
  loaded: 2.9.8

Full stack:

gem install nokogumbo -v '2.0.5'

1 warning generated. compiling ./../../gumbo-parser/src/string_buffer.c compiling ./../../gumbo-parser/src/string_piece.c compiling ./../../gumbo-parser/src/svg_attrs.c compiling ./../../gumbo-parser/src/svg_tags.c compiling ./../../gumbo-parser/src/tag.c compiling ./../../gumbo-parser/src/tag_lookup.c compiling ./../../gumbo-parser/src/token_buffer.c compiling ./../../gumbo-parser/src/tokenizer.c compiling ./../../gumbo-parser/src/utf8.c compiling ./../../gumbo-parser/src/util.c compiling ./../../gumbo-parser/src/vector.c linking shared-object nokogumbo/nokogumbo.bundle Undefined symbols for architecture x86_64: "_Nokogiri_wrap_xml_document", referenced from: _parse_continue in nokogumbo.o "_cNokogiriXmlSyntaxError", referenced from: _add_errors in nokogumbo.o "_htmlNewDocNoDtD", referenced from: _parse_continue in nokogumbo.o "_mNokogiri", referenced from: _Init_nokogumbo in nokogumbo.o "_xmlAddChild", referenced from: _build_tree in nokogumbo.o "_xmlCreateIntSubset", referenced from: _parse_continue in nokogumbo.o "_xmlFreeDoc", referenced from: _parse_cleanup in nokogumbo.o "_xmlNewCDataBlock", referenced from: _build_tree in nokogumbo.o "_xmlNewDocComment", referenced from: _build_tree in nokogumbo.o "_xmlNewDocNode", referenced from: _build_tree in nokogumbo.o "_xmlNewDocText", referenced from: _build_tree in nokogumbo.o "_xmlNewNs", referenced from: _build_tree in nokogumbo.o "_xmlNewNsProp", referenced from: _build_tree in nokogumbo.o "_xmlSearchNs", referenced from: _build_tree in nokogumbo.o "_xmlSetNs", referenced from: _build_tree in nokogumbo.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) make: *** [nokogumbo.bundle] Error 1

make failed, exit code 2

flavorjones commented 1 year ago

Hi, I'm sorry you're having this problem, I'll try to help.

Diagnosing this is going to be challenging, because:

The easiest thing to do, if you're able, is to upgrade to Nokogiri v1.13. This version includes the HTML5 functionality from Nokogumbo and you can then drop your dependency on nokogumbo. This version also ships precompiled packages that should install without any compilation required.