hashicorp / hashicorp/vagrant

vagrant 2.2.9 fails to install vagrant-aws plugin macOS 10.15

Open
#11,619 4 comments 0 reactions 0 assignees View on GitHub
installer
Dominant language
Ruby
Stars
27.2k
Forks
4.4k
Avg merge
1m
Merged PRs (30d)
1

Description

### Vagrant version

Vagrant 2.2.9

### Host operating system

macOS 10.15.4
xcode 11.4.1 (this is relevant)

### Guest operating system

n/a

### Vagrantfile

n/a (this is an issue with installation)

### Debug output

https://gist.github.com/PaulForgey/607463ba29e850e7ba9ae4d72d41a547

output of nokogiri's mkmf.log:
```"clang -o conftest -I/opt/vagrant/embedded/include/ruby-2.6.0/x86_64-darwin19 -I/opt/vagrant/embedded/include/ruby-2.6.0/ruby/backward -I/opt/vagrant/embedded/include/ruby-2.6.0 -I. -I/opt/vagrant/embedded/include -mmacosx-version-min=10.9 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/opt/vagrant/embedded/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -I/opt/vagrant/embedded/include -mmacosx-version-min=10.9 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -fno-common -pipe -I/opt/vagrant/embedded/include -I/opt/vagrant/embedded/include/libxml2 -I /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/libxml2 conftest.c -L. -L/opt/vagrant/embedded/lib -L/opt/vagrant/embedded/lib -L. -mmacosx-version-min=10.9 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -fstack-protector-strong -L/opt/vagrant/embedded/lib -lruby.2.6 "
clang: warning: no such sysroot directory: '/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk' [-Wmissing-sysroot]
In file included from conftest.c:1:
In file included from /opt/vagrant/embedded/include/ruby-2.6.0/ruby.h:33:
In file included from /opt/vagrant/embedded/include/ruby-2.6.0/ruby/ruby.h:29:
/opt/vagrant/embedded/include/ruby-2.6.0/ruby/defines.h:123:10: fatal error: 'stdio.h' file not found
#include
^~~~~~~~~
1 error generated.
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: int main(int argc, char **argv)
4: {
5: return 0;
6: }
/* end */
```

A WORKING COMPILER IS INSTALLED ON THIS SYSTEM. The configuration script is wrongly telling the compiler to ignore the system header search path and presuming much about the compiler's invocation.

```$ cat < #include
> int main() {
> printf("hello\n");
> return 0;
> }
> EOF
$ ./out
hello
```

### Expected behavior

The plugin should have installed successfully

### Actual behavior

The nokogiri dependency is broken
### Steps to reproduce

1. vagrant plugin install vagrant-aws

### References

Contributor guide

Open the contributing guide

Research direction

Start by reproducing `vagrant plugin install vagrant-aws` on macOS 10.15 with Vagrant 2.2.9, then review the linked debug output and Nokogiri mkmf.log. Trace how the installation invokes clang and supplies the macOS SDK path; done means the vagrant-aws plugin installs successfully without the Nokogiri header failure.

Written by the indexing model from the issue text.

Assessment

Tech stack
ruby
Domain
cli, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.