react-native: Flipper-Glog (0.3.6) build fails if Xcode application name contains a blank space
Description
The build of Flipper-Glog (0.3.6) using ‘pod install’ fails if the Xcode application name contains a blank space.
React Native version:
react-native info info Fetching system and libraries information… System: OS: macOS 10.16 CPU: (8) x64 Intel® Core™ 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
Steps To Reproduce
- Name the Xcode application something like ‘Xcode-beta 12.0’.
- Run:
sudo xcode-select --switch /Applications/Xcode-beta\ 12.0.app
- Run:
pod install
Expected Results
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).
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 17
In my case, just selecting Command Line Tools on Xcode Settings and it will fix.
That’s really weird, but just renaming the Xcode, removing the blank space worked for me as well.
@madeinquant Thanks that was it! For those who didnt understand, In case you named your xcode directory something like ‘Xcode 12.2’ you need to change it to Xcode12.2.app. Then you need to change your active developer path to the new path which is: sudo xcode-select --switch /Applications/Xcode12.2.app/Contents/Developer
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 See
config.log’ for more detailsAfter all attempts and no luck, try restarting the mac
i try to run
pod install
onMac mini(Late 2014) macOS Monterey version 12.3 (21E230)
and i always have this issues ,my Xcode version is 13.3.1 That’s really weird, same macOS version and same Xcode version on my mac book pro works fine.anybody can help help pls.this works in my case
This worked for me. Thanks!