The build of Flipper-Glog (0.3.6) using 'pod install' fails if the Xcode application name contains a blank space.
react-native info
info Fetching system and libraries information...
System:
OS: macOS 10.16
CPU: (8) x64 Intel(R) Core(TM) i5-8259U CPU @ 2.30GHz
Memory: 87.17 MB / 8.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 12.9.1 - ~/.nvm/versions/node/v12.9.1/bin/node
Yarn: Not Found
npm: 6.14.5 - ~/.nvm/versions/node/v12.9.1/bin/npm
Watchman: 4.7.0 - /usr/local/bin/watchman
Managers:
CocoaPods: 1.9.3 - /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms: iOS 14.0, DriverKit 20.0, macOS 10.16, tvOS 14.0, watchOS 7.0
Android SDK: Not Found
IDEs:
Android Studio: Not Found
Xcode: 12.0/12A6159 - /usr/bin/xcodebuild
Languages:
Java: 11.0.2 - /usr/bin/javac
Python: 2.7.16 - /usr/bin/python
npmPackages:
@react-native-community/cli: Not Found
react: 16.11.0 => 16.11.0
react-native: 0.62.2 => 0.62.2
npmGlobalPackages:
react-native: Not Found
1) Name the Xcode application something like 'Xcode-beta 12.0'.
2) Run: sudo xcode-select --switch /Applications/Xcode-beta\ 12.0.app
3) Run: pod install
I would expect Flipper-Glog (0.3.6) to build properly, whatever the Xcode application name is.
Instead, it fails as follows:
checking for arm-apple-darwin-gcc... /Applications/Xcode-beta 12.0.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -arch armv7 -isysroot /Applications/Xcode-beta 12.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.0.sdk
checking whether the C compiler works... no
/Users/USER/Library/Caches/CocoaPods/Pods/Release/Flipper-Glog/0.3.6-1dfd6/missing: Unknown `--is-lightweight' option
Try `/Users/USER/Library/Caches/CocoaPods/Pods/Release/Flipper-Glog/0.3.6-1dfd6/missing --help' for more information
configure: WARNING: 'missing' script is too old or missing
configure: error: in `/Users/USER/Library/Caches/CocoaPods/Pods/Release/Flipper-Glog/0.3.6-1dfd6':
configure: error: C compiler cannot create executables
See `config.log' for more details
This seems due to the configure script not being able to handle spaces in the application name (and it's probably true for other unusual characters too).
Encountered a same error message, but Xcode application name doesn't contain a black space.
xcode-select --print-path
/Applications/Xcode.app/Contents/Developer
checking whether make supports nested variables... yes
checking for arm-apple-darwin-gcc... /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -arch armv7 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.6.sdk
checking whether the C compiler works... no
/Users/nelson/Library/Caches/CocoaPods/Pods/Release/Flipper-Glog/0.3.6-1dfd6/missing: Unknown --is-lightweight' option
Try/Users/nelson/Library/Caches/CocoaPods/Pods/Release/Flipper-Glog/0.3.6-1dfd6/missing --help' for more information
configure: WARNING: 'missing' script is too old or missing
configure: error: in /Users/nelson/Library/Caches/CocoaPods/Pods/Release/Flipper-Glog/0.3.6-1dfd6':
configure: error: C compiler cannot create executables
Seeconfig.log' for more details
That's really weird, but just renaming the Xcode, removing the blank space worked for me as well.
It's actually not that weird. If the application name is not properly quoted in the script, the blank space will break the syntax and the script will fail.
Most helpful comment
Encountered a same error message, but Xcode application name doesn't contain a black space.
xcode-select --print-path
/Applications/Xcode.app/Contents/Developer
checking whether make supports nested variables... yes
checking for arm-apple-darwin-gcc... /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -arch armv7 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.6.sdk
checking whether the C compiler works... no
/Users/nelson/Library/Caches/CocoaPods/Pods/Release/Flipper-Glog/0.3.6-1dfd6/missing: Unknown
--is-lightweight' option Try/Users/nelson/Library/Caches/CocoaPods/Pods/Release/Flipper-Glog/0.3.6-1dfd6/missing --help' for more informationconfigure: WARNING: 'missing' script is too old or missing
configure: error: in
/Users/nelson/Library/Caches/CocoaPods/Pods/Release/Flipper-Glog/0.3.6-1dfd6': configure: error: C compiler cannot create executables Seeconfig.log' for more details