Skip to content
This repository has been archived by the owner on Feb 11, 2022. It is now read-only.

Install not working with vagrant 2.2.8 #569

Open
splunkenizer opened this issue May 5, 2020 · 3 comments
Open

Install not working with vagrant 2.2.8 #569

splunkenizer opened this issue May 5, 2020 · 3 comments

Comments

@splunkenizer
Copy link

Installing the 'vagrant-aws' plugin. This can take a few minutes...
Building native extensions. This could take a while...
Vagrant failed to properly resolve required dependencies. These
errors can commonly be caused by misconfigured plugin installations
or transient network issues. The reported error is:

ERROR: Failed to build gem native extension.

    current directory: /Users/mstadler/.vagrant.d/gems/2.6.6/gems/nokogiri-1.10.9/ext/nokogiri
/opt/vagrant/embedded/bin/ruby -I /opt/vagrant/embedded/lib/ruby/2.6.0 -r ./siteconf20200505-92648-6t4wdu.rb extconf.rb
checking if the C compiler accepts -I/opt/vagrant/embedded/include -I/opt/vagrant/embedded/include/libxml2 -I /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/libxml2... *** 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
	--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=/opt/vagrant/embedded/bin/$(RUBY_BASE_NAME)
	--help
	--clean
/opt/vagrant/embedded/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 /opt/vagrant/embedded/lib/ruby/2.6.0/mkmf.rb:585:in `block in try_compile'
	from /opt/vagrant/embedded/lib/ruby/2.6.0/mkmf.rb:532:in `with_werror'
	from /opt/vagrant/embedded/lib/ruby/2.6.0/mkmf.rb:585:in `try_compile'
	from extconf.rb:138:in `nokogiri_try_compile'
	from extconf.rb:162:in `block in add_cflags'
	from /opt/vagrant/embedded/lib/ruby/2.6.0/mkmf.rb:643:in `with_cflags'
	from extconf.rb:161:in `add_cflags'
	from extconf.rb:416:in `<main>'

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

  /Users/mstadler/.vagrant.d/gems/2.6.6/extensions/x86_64-darwin-19/2.6.0/nokogiri-1.10.9/mkmf.log

extconf failed, exit code 1

Gem files will remain installed in /Users/mstadler/.vagrant.d/gems/2.6.6/gems/nokogiri-1.10.9 for inspection.
Results logged to /Users/mstadler/.vagrant.d/gems/2.6.6/extensions/x86_64-darwin-19/2.6.0/nokogiri-1.10.9/gem_make.out
@jkenn99
Copy link

jkenn99 commented May 5, 2020

There is an issue with the Ruby build embedded with Vagrant 2.2.8 for Mac. The parameters used to build Ruby are baked into /opt/vagrant/embedded/lib/ruby/2.6.0/x86_64-darwin19/rbconfig.rb and reused for building extensions. In the current version, a parameter -isysroot /Users/vagrant/SDKs/MacOSX10.9.sdk has been added which points to a path which is not installed by Vagrant. Previous versions of the bundled Ruby do not include this parameter. This parameter prevents building any extensions.

To workaround the issue, remove all instances of this parameter from /opt/vagrant/embedded/lib/ruby/2.6.0/x86_64-darwin19/rbconfig.rb.

@externl
Copy link

externl commented May 6, 2020

Thanks, @jkenn99. Fix works great.

Do you know if there's an upstream issue filed with Vagrant

@jkenn99
Copy link

jkenn99 commented May 6, 2020

@externl: doesn't look like it.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants