0

I was trying to install treePL

https://github.com/blackrim/*treePL*/wiki/Installation

on my MacBook(Mac OS 12.6) through the Mac terminal, following the official installation guide above.

When it comes to testing if treePL is properly installed with the following line of code:

brew test -v treepl

I recieved the following error:

An error occurred while installing json (2.6.2), and Bundler cannot
continue.

In Gemfile:
  rubocop-performance was resolved to 1.15.0, which depends on
    rubocop was resolved to 1.35.1, which depends on
      json
Error: failed to run `/usr/local/Homebrew/Library/Homebrew/shims/ruby/bundle install`!
Hongs-MacBook-Pro-309:~ hc$ 

How do I fix this and install treePL properly?

Many thanks.

Full script:

Last login: Wed Oct 19 16:05:54 on ttys000

The default interactive shell is now zsh.
To update your account to use zsh, please run `chsh -s /bin/zsh`.
For more details, please visit https://support.apple.com/kb/HT208050.
Hongs-MacBook-Pro-309:~ hc$ brew test -v treepl
/usr/local/Homebrew/Library/Homebrew/shims/ruby/bundle install
Fetching gem metadata from https://rubygems.org/.......
Using concurrent-ruby 1.1.10
Using minitest 5.16.3
Using ast 2.4.2
Using public_suffix 5.0.0
Using bindata 2.4.12
Using zeitwerk 2.6.1
Using bundler 2.3.23
Using connection_pool 2.3.0
Using diff-lcs 1.5.0
Using did_you_mean 1.6.1
Using docile 1.4.0
Using regexp_parser 2.6.0
Using hana 1.3.7
Installing byebug 11.1.3 with native extensions
Installing msgpack 1.6.0 with native extensions
Installing hpricot 0.8.6 with native extensions
Installing unf_ext 0.0.8.2 with native extensions
Installing json 2.6.2 with native extensions
Using uri_template 0.7.0
Using mime-types-data 3.2022.0105
Using net-http-digest_auth 1.4.1
Installing racc 1.6.0 with native extensions
Using rubyntlm 0.6.3
Using webrick 1.7.0
Using webrobots 0.1.2
Using mustache 1.1.1
Using parallel 1.22.1
Using plist 3.6.0
Using rack 3.0.0
Using rainbow 3.1.1
Installing rdiscount 2.2.0.2 with native extensions
Using rexml 3.2.5
Using rspec-support 3.11.1
Using sorbet-runtime 0.5.10461
Using ruby-progressbar 1.11.0
Using unicode-display_width 2.3.0
Using ruby-macho 3.0.0
Using simplecov-html 0.12.3
Using simplecov_json_formatter 0.1.4
Using warning 1.3.0
Using i18n 1.12.0
Using tzinfo 2.0.5
Using addressable 2.8.1
Using elftools 1.2.0
Using parser 3.1.2.1
Using net-http-persistent 4.0.1
Using ecma-re-validator 0.4.0
Using mime-types 3.4.1
Using parallel_tests 3.13.0
Using rspec-core 3.11.0
Using rspec-expectations 3.11.1
Using rspec-mocks 3.11.1
Using rspec-sorbet 1.9.0
Using simplecov 0.21.2
Using activesupport 6.1.7
Using patchelf 1.3.0
Using rubocop-ast 1.21.0
Using json_schemer 0.2.21
Using rspec-github 2.3.1
Using rspec-retry 0.6.2
Using rspec_junit_formatter 0.6.0
Using rspec-its 1.3.0
Using rspec 3.11.0
Using simplecov-cobertura 2.1.0
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

current directory:
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/msgpack-1.6.0/ext/msgpack
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby -I
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0 -r
./siteconf20221019-5692-1bhvgyu.rb extconf.rb
checking for ruby/st.h... *** 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.6/usr/bin/$(RUBY_BASE_NAME)
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:467:in
`try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
from
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:585:in
`block in try_compile'
from
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:534:in
`with_werror'
from
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:585:in
`try_compile'
from
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:1109:in
`block in have_header'
from
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:959:in
`block in checking_for'
from
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:361:in
`block (2 levels) in postpone'
from
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:331:in
`open'
from
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:361:in
`block in postpone'
from
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:331:in
`open'
from
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:357:in
`postpone'
from
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:958:in
`checking_for'
from
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:1108:in
`have_header'
    from extconf.rb:3:in `<main>'

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

/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/extensions/universal-darwin-21/2.6.0/msgpack-1.6.0/mkmf.log

extconf failed, exit code 1

Gem files will remain installed in
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/msgpack-1.6.0
for inspection.
Results logged to
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/extensions/universal-darwin-21/2.6.0/msgpack-1.6.0/gem_make.out

/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/ext/builder.rb:99:in
`run'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/ext/ext_conf_builder.rb:47:in
`block in build'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/tempfile.rb:295:in
`open'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/ext/ext_conf_builder.rb:29:in
`build'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/ext/builder.rb:185:in
`block in build_extension'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/monitor.rb:235:in
`mon_synchronize'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/ext/builder.rb:181:in
`build_extension'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/ext/builder.rb:229:in
`block in build_extensions'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/ext/builder.rb:226:in
`each'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/ext/builder.rb:226:in
`build_extensions'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/installer.rb:830:in
`build_extensions'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/bundler-2.3.23/lib/bundler/rubygems_gem_installer.rb:72:in
`build_extensions'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/bundler-2.3.23/lib/bundler/rubygems_gem_installer.rb:28:in
`install'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/bundler-2.3.23/lib/bundler/source/rubygems.rb:207:in
`install'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/bundler-2.3.23/lib/bundler/installer/gem_installer.rb:54:in
`install'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/bundler-2.3.23/lib/bundler/installer/gem_installer.rb:16:in
`install_from_spec'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/bundler-2.3.23/lib/bundler/installer/parallel_installer.rb:186:in
`do_install'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/bundler-2.3.23/lib/bundler/installer/parallel_installer.rb:177:in
`block in worker_pool'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/bundler-2.3.23/lib/bundler/worker.rb:62:in
`apply_func'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/bundler-2.3.23/lib/bundler/worker.rb:57:in
`block in process_queue'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/bundler-2.3.23/lib/bundler/worker.rb:54:in
`loop'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/bundler-2.3.23/lib/bundler/worker.rb:54:in
`process_queue'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/bundler-2.3.23/lib/bundler/worker.rb:91:in
`block (2 levels) in create_threads'

An error occurred while installing msgpack (1.6.0), and Bundler cannot
continue.

In Gemfile:
  bootsnap was resolved to 1.13.0, which depends on
    msgpack


Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

current directory:
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/unf_ext-0.0.8.2/ext/unf_ext
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby -I
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0 -r
./siteconf20221019-5692-vl5rza.rb extconf.rb
checking for -lstdc++... *** 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.6/usr/bin/$(RUBY_BASE_NAME)
    --with-static-libstdc++
    --without-static-libstdc++
    --with-stdc++lib
    --without-stdc++lib
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:467:in
`try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
from
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:546:in
`block in try_link0'
from
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/tmpdir.rb:93:in
`mktmpdir'
from
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:543:in
`try_link0'
from
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:570:in
`try_link'
from
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:789:in
`try_func'
from
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:1016:in
`block in have_library'
from
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:959:in
`block in checking_for'
from
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:361:in
`block (2 levels) in postpone'
from
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:331:in
`open'
from
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:361:in
`block in postpone'
from
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:331:in
`open'
from
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:357:in
`postpone'
from
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:958:in
`checking_for'
from
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:1011:in
`have_library'
    from extconf.rb:6:in `<main>'

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

/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/extensions/universal-darwin-21/2.6.0/unf_ext-0.0.8.2/mkmf.log

extconf failed, exit code 1

Gem files will remain installed in
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/unf_ext-0.0.8.2
for inspection.
Results logged to
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/extensions/universal-darwin-21/2.6.0/unf_ext-0.0.8.2/gem_make.out

/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/ext/builder.rb:99:in
`run'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/ext/ext_conf_builder.rb:47:in
`block in build'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/tempfile.rb:295:in
`open'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/ext/ext_conf_builder.rb:29:in
`build'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/ext/builder.rb:185:in
`block in build_extension'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/monitor.rb:235:in
`mon_synchronize'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/ext/builder.rb:181:in
`build_extension'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/ext/builder.rb:229:in
`block in build_extensions'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/ext/builder.rb:226:in
`each'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/ext/builder.rb:226:in
`build_extensions'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/installer.rb:830:in
`build_extensions'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/bundler-2.3.23/lib/bundler/rubygems_gem_installer.rb:72:in
`build_extensions'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/bundler-2.3.23/lib/bundler/rubygems_gem_installer.rb:28:in
`install'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/bundler-2.3.23/lib/bundler/source/rubygems.rb:207:in
`install'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/bundler-2.3.23/lib/bundler/installer/gem_installer.rb:54:in
`install'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/bundler-2.3.23/lib/bundler/installer/gem_installer.rb:16:in
`install_from_spec'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/bundler-2.3.23/lib/bundler/installer/parallel_installer.rb:186:in
`do_install'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/bundler-2.3.23/lib/bundler/installer/parallel_installer.rb:177:in
`block in worker_pool'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/bundler-2.3.23/lib/bundler/worker.rb:62:in
`apply_func'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/bundler-2.3.23/lib/bundler/worker.rb:57:in
`block in process_queue'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/bundler-2.3.23/lib/bundler/worker.rb:54:in
`loop'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/bundler-2.3.23/lib/bundler/worker.rb:54:in
`process_queue'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/bundler-2.3.23/lib/bundler/worker.rb:91:in
`block (2 levels) in create_threads'

An error occurred while installing unf_ext (0.0.8.2), and Bundler
cannot continue.

In Gemfile:
  mechanize was resolved to 2.8.5, which depends on
    http-cookie was resolved to 1.0.5, which depends on
      domain_name was resolved to 0.5.20190701, which depends on
        unf was resolved to 0.1.4, which depends on
          unf_ext


Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

current directory:
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/hpricot-0.8.6/ext/fast_xs
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby -I
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0 -r
./siteconf20221019-5692-wqeeu4.rb extconf.rb
checking for stdio.h... *** 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.6/usr/bin/$(RUBY_BASE_NAME)
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:467:in
`try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
from
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:585:in
`block in try_compile'
from
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:534:in
`with_werror'
from
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:585:in
`try_compile'
from
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:1109:in
`block in have_header'
from
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:959:in
`block in checking_for'
from
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:361:in
`block (2 levels) in postpone'
from
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:331:in
`open'
from
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:361:in
`block in postpone'
from
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:331:in
`open'
from
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:357:in
`postpone'
from
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:958:in
`checking_for'
from
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:1108:in
`have_header'
    from extconf.rb:2:in `<main>'

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

/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/extensions/universal-darwin-21/2.6.0/hpricot-0.8.6/mkmf.log

extconf failed, exit code 1

Gem files will remain installed in
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/hpricot-0.8.6
for inspection.
Results logged to
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/extensions/universal-darwin-21/2.6.0/hpricot-0.8.6/gem_make.out

/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/ext/builder.rb:99:in
`run'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/ext/ext_conf_builder.rb:47:in
`block in build'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/tempfile.rb:295:in
`open'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/ext/ext_conf_builder.rb:29:in
`build'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/ext/builder.rb:185:in
`block in build_extension'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/monitor.rb:235:in
`mon_synchronize'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/ext/builder.rb:181:in
`build_extension'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/ext/builder.rb:229:in
`block in build_extensions'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/ext/builder.rb:226:in
`each'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/ext/builder.rb:226:in
`build_extensions'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/installer.rb:830:in
`build_extensions'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/bundler-2.3.23/lib/bundler/rubygems_gem_installer.rb:72:in
`build_extensions'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/bundler-2.3.23/lib/bundler/rubygems_gem_installer.rb:28:in
`install'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/bundler-2.3.23/lib/bundler/source/rubygems.rb:207:in
`install'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/bundler-2.3.23/lib/bundler/installer/gem_installer.rb:54:in
`install'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/bundler-2.3.23/lib/bundler/installer/gem_installer.rb:16:in
`install_from_spec'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/bundler-2.3.23/lib/bundler/installer/parallel_installer.rb:186:in
`do_install'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/bundler-2.3.23/lib/bundler/installer/parallel_installer.rb:177:in
`block in worker_pool'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/bundler-2.3.23/lib/bundler/worker.rb:62:in
`apply_func'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/bundler-2.3.23/lib/bundler/worker.rb:57:in
`block in process_queue'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/bundler-2.3.23/lib/bundler/worker.rb:54:in
`loop'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/bundler-2.3.23/lib/bundler/worker.rb:54:in
`process_queue'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/bundler-2.3.23/lib/bundler/worker.rb:91:in
`block (2 levels) in create_threads'

An error occurred while installing hpricot (0.8.6), and Bundler cannot
continue.

In Gemfile:
  ronn was resolved to 0.7.3, which depends on
    hpricot


Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

current directory:
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/json-2.6.2/ext/json/ext/generator
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby -I
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0 -r
./siteconf20221019-5692-j1yh1f.rb extconf.rb
creating Makefile

current directory:
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/json-2.6.2/ext/json/ext/generator
make "DESTDIR=" clean

current directory:
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/json-2.6.2/ext/json/ext/generator
make "DESTDIR="
compiling generator.c
In file included from generator.c:1:
In file included from ./../fbuffer/fbuffer.h:5:
In file included from
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/include/ruby-2.6.0/ruby.h:33:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/include/ruby-2.6.0/ruby/ruby.h:24:10:
fatal error: 'ruby/config.h' file not found
#include "ruby/config.h"
         ^~~~~~~~~~~~~~~
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/include/ruby-2.6.0/ruby/ruby.h:24:10:
note: did not find header 'config.h' in framework 'ruby' (loaded from
'/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks')
1 error generated.
make: *** [generator.o] Error 1

make failed, exit code 2

Gem files will remain installed in
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/json-2.6.2
for inspection.
Results logged to
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/extensions/universal-darwin-21/2.6.0/json-2.6.2/gem_make.out

/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/ext/builder.rb:99:in
`run'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/ext/builder.rb:51:in
`block in make'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/ext/builder.rb:43:in
`each'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/ext/builder.rb:43:in
`make'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/ext/ext_conf_builder.rb:62:in
`block in build'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/tempfile.rb:295:in
`open'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/ext/ext_conf_builder.rb:29:in
`build'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/ext/builder.rb:185:in
`block in build_extension'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/monitor.rb:235:in
`mon_synchronize'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/ext/builder.rb:181:in
`build_extension'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/ext/builder.rb:229:in
`block in build_extensions'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/ext/builder.rb:226:in
`each'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/ext/builder.rb:226:in
`build_extensions'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/installer.rb:830:in
`build_extensions'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/bundler-2.3.23/lib/bundler/rubygems_gem_installer.rb:72:in
`build_extensions'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/bundler-2.3.23/lib/bundler/rubygems_gem_installer.rb:28:in
`install'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/bundler-2.3.23/lib/bundler/source/rubygems.rb:207:in
`install'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/bundler-2.3.23/lib/bundler/installer/gem_installer.rb:54:in
`install'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/bundler-2.3.23/lib/bundler/installer/gem_installer.rb:16:in
`install_from_spec'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/bundler-2.3.23/lib/bundler/installer/parallel_installer.rb:186:in
`do_install'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/bundler-2.3.23/lib/bundler/installer/parallel_installer.rb:177:in
`block in worker_pool'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/bundler-2.3.23/lib/bundler/worker.rb:62:in
`apply_func'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/bundler-2.3.23/lib/bundler/worker.rb:57:in
`block in process_queue'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/bundler-2.3.23/lib/bundler/worker.rb:54:in
`loop'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/bundler-2.3.23/lib/bundler/worker.rb:54:in
`process_queue'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/bundler-2.3.23/lib/bundler/worker.rb:91:in
`block (2 levels) in create_threads'

An error occurred while installing json (2.6.2), and Bundler cannot
continue.

In Gemfile:
  rubocop-performance was resolved to 1.15.0, which depends on
    rubocop was resolved to 1.35.1, which depends on
      json
Error: failed to run `/usr/local/Homebrew/Library/Homebrew/shims/ruby/bundle install`!
Hongs-MacBook-Pro-309:~ hc$ 

Hong
  • 62
  • 6

1 Answers1

0

Have followed the official guide to do a few things, not sure which action led to the successful installation.

https://github.com/blackrim/treePL/wiki/Installation

I find that most problems are caused by library dependency issues, i.e. just try to install whatever library was mentioned in the error

For mac it is very important to have homebrew and MacPorts for installing other libraries. I installed homebrew very easily using the line of code on their website in the mac terminal. MacPorts on the other hand can be installed using an installer available on their website https://www.macports.org/install.php

It is also very important to install Xcode(because it contains git) and the Command Line tools on mac using AppStore/official installers

the treePL github site also stated that NLopt is library prerequisite, which I successfully installed using homebrew. adolc is an optional prerequisite for the cross-verification function but I am still struggling to install it.

when installing a certain package through git, I bumped into an error regarding the failure to connect to git, it can be fixed by replacing git to https to overcome the firewall, see this post for more info Unable to Connect to GitHub.com For Cloning

Either way after completing all of the above I can finally pass the test

brew test -v treepl
Hong
  • 62
  • 6