Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ruby FFI fails to install if Xcode path has spaces in it #950

Open
justin-espedal opened this issue May 2, 2022 · 1 comment
Open

Ruby FFI fails to install if Xcode path has spaces in it #950

justin-espedal opened this issue May 2, 2022 · 1 comment

Comments

@justin-espedal
Copy link

I have Xcode installed to an external hard drive named "Big Sur": /Volumes/Big Sur/Applications/Xcode-13-beta4.app

Attempting to install cocoapods, which depends on Ruby FFI, I run into this error.

gem install cocoapods
Fetching httpclient-2.8.3.gem
Fetching concurrent-ruby-1.1.10.gem
Fetching fuzzy_match-2.0.4.gem
Fetching nap-1.1.0.gem
Fetching i18n-1.10.0.gem
Fetching tzinfo-2.0.4.gem
Fetching zeitwerk-2.5.4.gem
Fetching activesupport-6.1.5.1.gem
Fetching algoliasearch-1.27.5.gem
Fetching typhoeus-1.4.0.gem
Fetching netrc-0.11.0.gem
Fetching ffi-1.15.5.gem
Fetching ethon-0.15.0.gem
Fetching public_suffix-4.0.7.gem
Fetching addressable-2.8.0.gem
Fetching cocoapods-core-1.11.3.gem
Fetching claide-1.1.0.gem
Fetching cocoapods-plugins-1.0.0.gem
Fetching cocoapods-deintegrate-1.0.5.gem
Fetching cocoapods-downloader-1.6.3.gem
Fetching cocoapods-try-1.2.0.gem
Fetching atomos-0.1.3.gem
Fetching colored2-3.1.2.gem
Fetching cocoapods-search-1.0.1.gem
Fetching nanaimo-0.3.0.gem
Fetching cocoapods-trunk-1.6.0.gem
Fetching molinillo-0.8.0.gem
Fetching escape-0.0.4.gem
Fetching fourflusher-2.3.1.gem
Fetching gh_inspector-1.1.3.gem
Fetching rexml-3.2.5.gem
Fetching cocoapods-1.11.3.gem
Fetching xcodeproj-1.21.0.gem
Fetching ruby-macho-2.5.1.gem
Successfully installed concurrent-ruby-1.1.10
Successfully installed i18n-1.10.0
Successfully installed tzinfo-2.0.4
Successfully installed zeitwerk-2.5.4
Successfully installed activesupport-6.1.5.1
Successfully installed nap-1.1.0
Successfully installed fuzzy_match-2.0.4
Successfully installed httpclient-2.8.3
Successfully installed algoliasearch-1.27.5
Building native extensions. This could take a while...
ERROR:  Error installing cocoapods:
	ERROR: Failed to build gem native extension.

    current directory: /Users/justin/.gem/gems/ffi-1.15.5/ext/ffi_c
/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 ./siteconf20220502-60942-11mux89.rb extconf.rb
checking for ffi.h... no
checking for ffi.h in /usr/local/include,/usr/include/ffi,/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/ffi,/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/ffi... yes
checking for ffi_prep_closure_loc() in -lffi... yes
checking for ffi_prep_cif_var()... yes
checking for ffi_raw_call()... yes
checking for ffi_prep_raw_closure()... yes
checking for whether -pthread is accepted as LDFLAGS... yes
creating extconf.h
creating Makefile

current directory: /Users/justin/.gem/gems/ffi-1.15.5/ext/ffi_c
make "DESTDIR=" clean

current directory: /Users/justin/.gem/gems/ffi-1.15.5/ext/ffi_c
make "DESTDIR="
make: *** No rule to make target `"/Volumes/Big', needed by `AbstractMemory.o'.  Stop.

make failed, exit code 2

Gem files will remain installed in /Users/justin/.gem/gems/ffi-1.15.5 for inspection.
Results logged to /Users/justin/.gem/extensions/universal-darwin-21/2.6.0/ffi-1.15.5/gem_make.out

Here are a few relevant lines from the generated Makefile:

topdir = /Volumes/Big\ Sur/Applications/Xcode-13-beta4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.0.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/include/ruby-2.6.0
arch_hdrdir = "/Volumes/Big Sur/Applications/Xcode-13-beta4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.0.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/include/ruby-2.6.0/universal-darwin21"
includedir = $(DESTDIR)/Volumes/Big Sur/Applications/Xcode-13-beta4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.0.sdk$(prefix)/include

topdir and arch_hrdir seem to escape or quote the path, but includedir doesn't, so I'm assuming that's where the issue lies.

@justin-espedal
Copy link
Author

There's also this open issue related to paths with spaces, but it seems to be a different specific error. #623

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

No branches or pull requests

1 participant