I've been having issues while running bundle install
and there is constantly an error with the nokogumbo and the thrift gem that are thrown simultaneously-
`An error occurred while installing thrift (0.17.0), and Bundler cannot continue.
`
current directory: /Users/<username>/<projectname>/vendor/bundle/ruby/2.7.0/gems/nokogumbo-2.0.5/ext/nokogumbo
/Users/<username>/.rvm/rubies/ruby-2.7.6/bin/ruby -I /Users/<username>/.rvm/rubies/ruby-2.7.6/lib/ruby/2.7.0 -r ./siteconf20221116-22895-17mgytc.rb extconf.rb --use-system-libraries
checking for whether -I/Users/<username>/<projectname>/vendor/bundle/ruby/2.7.0/gems/nokogiri-1.13.9-x86_64-darwin/ext/nokogiri is accepted as CFLAGS... yes
checking for whether -I/Users/<username>/<projectname>/vendor/bundle/ruby/2.7.0/gems/nokogiri-1.13.9-x86_64-darwin/ext/nokogiri/include is accepted as CFLAGS... yes
checking for whether -I/Users/<username>/<projectname>/vendor/bundle/ruby/2.7.0/gems/nokogiri-1.13.9-x86_64-darwin/ext/nokogiri/include/libxml2 is accepted as CFLAGS... yes
checking for libxml/tree.h... yes
checking for nokogiri.h... yes
creating Makefile
current directory: /Users/<username>/<projectname>/vendor/bundle/ruby/2.7.0/gems/nokogumbo-2.0.5/ext/nokogumbo
make "DESTDIR=" clean
current directory: /Users/<username>/<projectname>/vendor/bundle/ruby/2.7.0/gems/nokogumbo-2.0.5/ext/nokogumbo
make "DESTDIR="
compiling nokogumbo.c
compiling ./../../gumbo-parser/src/string_buffer.c
compiling ./../../gumbo-parser/src/svg_attrs.c
compiling ./../../gumbo-parser/src/ascii.c
compiling ./../../gumbo-parser/src/util.c
compiling ./../../gumbo-parser/src/svg_tags.c
compiling ./../../gumbo-parser/src/vector.c
compiling ./../../gumbo-parser/src/attribute.c
compiling ./../../gumbo-parser/src/token_buffer.c
compiling ./../../gumbo-parser/src/char_ref.c
compiling ./../../gumbo-parser/src/utf8.c
compiling ./../../gumbo-parser/src/error.c
./../../gumbo-parser/src/error.c:99:20: warning: cast to smaller integer type 'GumboTag' from 'void *' [-Wvoid-pointer-to-enum-cast]
GumboTag tag = (GumboTag) error->tag_stack.data[i];
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.
compiling ./../../gumbo-parser/src/tag.c
compiling ./../../gumbo-parser/src/parser.c
./../../gumbo-parser/src/parser.c:540:10: warning: cast to smaller integer type 'GumboInsertionMode' from 'void *' [-Wvoid-pointer-to-enum-cast]
return (GumboInsertionMode) modes->data[(modes->length - 1)];
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.
compiling ./../../gumbo-parser/src/foreign_attrs.c
compiling ./../../gumbo-parser/src/tokenizer.c
compiling ./../../gumbo-parser/src/string_piece.c
compiling ./../../gumbo-parser/src/tag_lookup.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
Gem files will remain installed in /Users/<username>/<projectname>/vendor/bundle/ruby/2.7.0/gems/nokogumbo-2.0.5 for inspection.
Results logged to /Users/<username>/<projectname>/vendor/bundle/ruby/2.7.0/extensions/x86_64-darwin-22/2.7.0/nokogumbo-2.0.5/gem_make.out
/Users/<username>/.rvm/rubies/ruby-2.7.6/lib/ruby/2.7.0/rubygems/ext/builder.rb:99:in `run'
/Users/<username>/.rvm/rubies/ruby-2.7.6/lib/ruby/2.7.0/rubygems/ext/builder.rb:51:in `block in make'
/Users/<username>/.rvm/rubies/ruby-2.7.6/lib/ruby/2.7.0/rubygems/ext/builder.rb:43:in `each'
/Users/<username>/.rvm/rubies/ruby-2.7.6/lib/ruby/2.7.0/rubygems/ext/builder.rb:43:in `make'
/Users/<username>/.rvm/rubies/ruby-2.7.6/lib/ruby/2.7.0/rubygems/ext/ext_conf_builder.rb:63:in `block in build'
/Users/<username>/.rvm/rubies/ruby-2.7.6/lib/ruby/2.7.0/tempfile.rb:291:in `open'
/Users/<username>/.rvm/rubies/ruby-2.7.6/lib/ruby/2.7.0/rubygems/ext/ext_conf_builder.rb:30:in `build'
/Users/<username>/.rvm/rubies/ruby-2.7.6/lib/ruby/2.7.0/rubygems/ext/builder.rb:169:in `block in build_extension'
/Users/<username>/.rvm/rubies/ruby-2.7.6/lib/ruby/2.7.0/rubygems/ext/builder.rb:165:in `synchronize'
/Users/<username>/.rvm/rubies/ruby-2.7.6/lib/ruby/2.7.0/rubygems/ext/builder.rb:165:in `build_extension'
/Users/<username>/.rvm/rubies/ruby-2.7.6/lib/ruby/2.7.0/rubygems/ext/builder.rb:210:in `block in build_extensions'
/Users/<username>/.rvm/rubies/ruby-2.7.6/lib/ruby/2.7.0/rubygems/ext/builder.rb:207:in `each'
/Users/<username>/.rvm/rubies/ruby-2.7.6/lib/ruby/2.7.0/rubygems/ext/builder.rb:207:in `build_extensions'
/Users/<username>/.rvm/rubies/ruby-2.7.6/lib/ruby/2.7.0/rubygems/installer.rb:844:in `build_extensions'
/Users/<username>/.rvm/gems/ruby-2.7.6@<projectname>/gems/bundler-2.3.20/lib/bundler/rubygems_gem_installer.rb:72:in `build_extensions'
/Users/<username>/.rvm/gems/ruby-2.7.6@<projectname>/gems/bundler-2.3.20/lib/bundler/rubygems_gem_installer.rb:28:in `install'
/Users/<username>/.rvm/gems/ruby-2.7.6@<projectname>/gems/bundler-2.3.20/lib/bundler/source/rubygems.rb:207:in `install'
/Users/<username>/.rvm/gems/ruby-2.7.6@<projectname>/gems/bundler-2.3.20/lib/bundler/installer/gem_installer.rb:54:in `install'
/Users/<username>/.rvm/gems/ruby-2.7.6@<projectname>/gems/bundler-2.3.20/lib/bundler/installer/gem_installer.rb:16:in `install_from_spec'
/Users/<username>/.rvm/gems/ruby-2.7.6@<projectname>/gems/bundler-2.3.20/lib/bundler/installer/parallel_installer.rb:186:in `do_install'
/Users/<username>/.rvm/gems/ruby-2.7.6@<projectname>/gems/bundler-2.3.20/lib/bundler/installer/parallel_installer.rb:177:in `block in worker_pool'
/Users/<username>/.rvm/gems/ruby-2.7.6@<projectname>/gems/bundler-2.3.20/lib/bundler/worker.rb:62:in `apply_func'
/Users/<username>/.rvm/gems/ruby-2.7.6@<projectname>/gems/bundler-2.3.20/lib/bundler/worker.rb:57:in `block in process_queue'
/Users/<username>/.rvm/gems/ruby-2.7.6@<projectname>/gems/bundler-2.3.20/lib/bundler/worker.rb:54:in `loop'
/Users/<username>/.rvm/gems/ruby-2.7.6@<projectname>/gems/bundler-2.3.20/lib/bundler/worker.rb:54:in `process_queue'
/Users/<username>/.rvm/gems/ruby-2.7.6@<projectname>/gems/bundler-2.3.20/lib/bundler/worker.rb:91:in `block (2 levels) in create_threads'
An error occurred while installing nokogumbo (2.0.5), and Bundler cannot continue.
`
sanitize was resolved to 5.2.3, which depends on
nokogumbo
`
Since there was an issue with thrift, I ran gem install thrift -v 0.17.0 -- --with-cppflags="-Wno-compound-token-split-by-macro"
which runs successfully but shows an error on bundle install
. I've even checked for two versions of nokogiri but i see this error with a single version as well. Any help will be appreciated.