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

[0.54.0] IOS pod install error. Module glog cannot be installed #18408

Closed
stsiushkevich opened this issue Mar 16, 2018 · 15 comments
Closed

[0.54.0] IOS pod install error. Module glog cannot be installed #18408

stsiushkevich opened this issue Mar 16, 2018 · 15 comments
Labels
Platform: iOS iOS applications. Ran Commands One of our bots successfully processed a command. Resolution: Locked This issue was locked by the bot.

Comments

@stsiushkevich
Copy link

stsiushkevich commented Mar 16, 2018

I'm trying to upgrade from 0.42.0 to 0.54.0. When I run pod install I receive an error:

users-MacBook-Pro:ios stsiushkevich$ pod install
Analyzing dependencies
Fetching podspec for `DoubleConversion` from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`
Fetching podspec for `Folly` from `../node_modules/react-native/third-party-podspecs/Folly.podspec`
Fetching podspec for `React` from `../node_modules/react-native`
Fetching podspec for `ReactNativeFabric` from `../node_modules/react-native-fabric`
Fetching podspec for `glog` from `../node_modules/react-native/third-party-podspecs/glog.podspec`
Fetching podspec for `react-native-google-maps` from `../node_modules/react-native-maps`
Fetching podspec for `react-native-maps` from `../node_modules/react-native-maps`
Fetching podspec for `yoga` from `../node_modules/react-native/ReactCommon/yoga`
Downloading dependencies
Using Crashlytics (3.9.3)
Installing DoubleConversion (1.1.5)
Using Fabric (1.7.2)
Using Firebase (4.0.4)
Using FirebaseAnalytics (4.0.2)
Using FirebaseCore (4.0.4)
Using FirebaseInstanceID (2.0.0)
Using FirebaseMessaging (2.0.0)
Installing Folly (2016.09.26.00)
Using GoogleMaps (2.5.0)
Using GoogleToolboxForMac (2.1.1)
Using Protobuf (3.3.0)
Using QBImagePickerController (3.4.0)
Using RSKImageCropper (1.6.3)
Installing React 0.54.0 (was 0.53.0)
Installing ReactNativeFabric 0.5.1 (was 0.5.1)
Installing boost-for-react-native (1.63.0)
Installing glog (0.3.4)
[!] /bin/bash -c 
set -e
#!/bin/bash
set -e

PLATFORM_NAME="${PLATFORM_NAME:-iphoneos}"
CURRENT_ARCH="${CURRENT_ARCH:-armv7}"

export CC="$(xcrun -find -sdk $PLATFORM_NAME cc) -arch $CURRENT_ARCH -isysroot $(xcrun -sdk $PLATFORM_NAME --show-sdk-path)"
export CXX="$CC"

# Remove automake symlink if it exists
if [ -h "test-driver" ]; then
    rm test-driver
fi

./configure --host arm-apple-darwin

# Fix build for tvOS
cat << EOF >> src/config.h

/* Add in so we have Apple Target Conditionals */
#ifdef __APPLE__
#include <TargetConditionals.h>
#include <Availability.h>
#endif

/* Special configuration for AppleTVOS */
#if TARGET_OS_TV
#undef HAVE_SYSCALL_H
#undef HAVE_SYS_SYSCALL_H
#undef OS_MACOSX
#endif

/* Special configuration for ucontext */
#undef HAVE_UCONTEXT_H
#undef PC_FROM_UCONTEXT
#if defined(__x86_64__)
#define PC_FROM_UCONTEXT uc_mcontext->__ss.__rip
#elif defined(__i386__)
#define PC_FROM_UCONTEXT uc_mcontext->__ss.__eip
#endif
EOF

checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for arm-apple-darwin-strip... no
checking for strip... strip
checking for a thread-safe mkdir -p... ./install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking for arm-apple-darwin-gcc... /Library/Developer/CommandLineTools/usr/bin/cc -arch armv7 -isysroot 
checking whether the C compiler works... no
xcrun: error: SDK "iphoneos" cannot be located
xcrun: error: SDK "iphoneos" cannot be located
xcrun: error: SDK "iphoneos" cannot be located
xcrun: error: unable to lookup item 'Path' in SDK 'iphoneos'
/Users/stsiushkevich/Library/Caches/CocoaPods/Pods/External/GLog/f09d6cdb8398b4922e87d51f5245de7e-1de0b/missing: Unknown `--is-lightweight' option
Try `/Users/stsiushkevich/Library/Caches/CocoaPods/Pods/External/GLog/f09d6cdb8398b4922e87d51f5245de7e-1de0b/missing --help' for more information
configure: WARNING: 'missing' script is too old or missing
configure: error: in `/Users/stsiushkevich/Library/Caches/CocoaPods/Pods/External/GLog/f09d6cdb8398b4922e87d51f5245de7e-1de0b':
configure: error: C compiler cannot create executables
See `config.log' for more details

I have tried to use 0.52.0 version, but had same error. Can you advice me how to resolve it?

Environment

Environment:
OS: macOS Sierra 10.12.5 (16F73)
Node: 6.11.3
npm: 5.6.0
Watchman: 4.9.0
Xcode: 8.3.3 (8E3004b)
Android Studio: 3.0.1

my Podfile:

# Uncomment the next line to define a global platform for your project
  platform :ios, '8.0'

target 'phrsimplyconnect' do
  # Uncomment the next line if you're using Swift or would like to use dynamic frameworks
  # use_frameworks!

  # Pods for phrsimplyconnect
  pod 'Firebase/Core'
  pod 'Firebase/Messaging'

  pod 'RSKImageCropper'
  pod 'QBImagePickerController'
  
  pod 'Fabric'
  pod 'Crashlytics'
  pod 'ReactNativeFabric', :path => '../node_modules/react-native-fabric'

  target 'phrsimplyconnectTests' do
    inherit! :search_paths
    # Pods for testing
  end
  
  rn_path = '../node_modules/react-native'
  
  pod 'yoga', :path => "#{rn_path}/ReactCommon/yoga"
  
  pod 'React', path: rn_path, subspecs: [
  'Core',
  'CxxBridge',
  'DevSupport',
  'RCTActionSheet',
  'RCTAnimation',
  'RCTGeolocation',
  'RCTImage',
  'RCTLinkingIOS',
  'RCTNetwork',
  'RCTSettings',
  'RCTText',
  'RCTVibration',
  'RCTWebSocket'
  ]
  
  pod 'boost-for-react-native'
  
  # Third party deps podspec link
  pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec'
  pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec'
  pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec'
  
  pod 'GoogleMaps'
  pod 'react-native-maps', path: '../node_modules/react-native-maps'
  pod 'react-native-google-maps', path: '../node_modules/react-native-maps'
end

post_install do |installer|
    installer.pods_project.targets.each do |target|
        if target.name == 'react-native-google-maps'
            target.build_configurations.each do |config|
                config.build_settings['CLANG_ENABLE_MODULES'] = 'No'
            end
        end
        if target.name == "React"
            target.remove_from_project
        end
    end
end

Packages: (wanted => installed)
"react": "16.3.0-alpha.1",
"react-dom": "16.3.0-alpha.1",
"prop-types": "15.6.1",
"react-mixin": "4.0.0",
"react-native": "0.54.0",

Expected Behavior

pod install is executed successfully

Actual Behavior

image
image

@react-native-bot react-native-bot added Platform: iOS iOS applications. Ran Commands One of our bots successfully processed a command. labels Mar 16, 2018
@stsiushkevich
Copy link
Author

I have just tried to install 0.51.0, but have the same issue((( What I do incorrectly?

@kelset
Copy link
Contributor

kelset commented Mar 16, 2018

Overall I think you need to carefully go through the release notes for the 12 versions (!) of react native you are trying to "merge".

There have been many breaking changes.

I suggest you maybe do 'baby-steps' of 2 versions per step, while cleaning up the pods & caches every time.

@stsiushkevich
Copy link
Author

I think if we have an instruction in the documentation we have to get a successful result. I will keep in mind about breaking changes in my source code, but installation must be without such errors.

@stsiushkevich
Copy link
Author

I have upgraded Xcode version from 8.3.3 to 9.2. Then issue was disappeared))) I think new Xcode have required sdk's and platforms.

@vovkasm
Copy link
Contributor

vovkasm commented Mar 16, 2018

Module glog have been renamed in 0.54 (or 0.53), GLog -> glog, so all paths was renamed, but fs is case-insensitive by default on macOS, so cocoapods run into troubles when try to delete/rename/create folders... :-/

I go through this update with this steps:

pod deintegrate
git add .
git commit -m 'pod deintegrate' // at this step no other `GLog` directories
pod install
git add .
git commit -m 'pod install' // at this step right paths will be recorded to VCS

@matt-dalton
Copy link

I'm still having this issue, having tried all of the above. It happened when I upgraded React Native from 0.52 -> 0.54.4 (and React to 16.3.0).

I have pod --version 1.5.0 & Xcode version 9.2. I've tried clearing Pods dir/cocoapods cache, deleting my whole repo and rebuilding, running deintegrate with commits to git each time etc.

Anyone else got any ideas? Not really sure what else to try at this point

@matt-dalton
Copy link

Also, bonus information. This podfile below works when I run pod install:

# platform :ios, '9.0'

target 'oban' do
  platform :ios, '9.0'
  
  pod 'Mixpanel'

  # Pods for AppCenter
  pod "yoga", :path => "../node_modules/react-native/ReactCommon/yoga"
  pod 'React', :path => '../node_modules/react-native', :subspecs => [
    'RCTText',
    'RCTImage',
    'DevSupport',
   # 'CxxBridge',
    'RCTWebSocket',
    'RCTNetwork',
    'RCTLinkingIOS'
  ]

  pod 'RNDeviceInfo', :path => '../node_modules/react-native-device-info'

  pod 'react-native-notifications', :path => '../node_modules/react-native-notifications'

  pod 'RNSVG', :path => '../node_modules/react-native-svg'

end

It fails when I uncomment out 'CxxBridge'. I then need this spec to be able to archive in Xcode.

@YuryKorovko
Copy link

YuryKorovko commented May 4, 2018

The issue is closed but in case if above answers don't work.
put this in console -> xcrun -k --sdk iphoneos --show-sdk-path
if the answer is
xcrun:_ error: SDK "iphoneos" cannot be located
xcrun: error: SDK "iphoneos" cannot be located
xcrun: error: unable to lookup item 'Path' in SDK 'iphoneos'

then put this sudo xcode-select --switch /Applications/Xcode.app

Then install pod again

@nguyenvanuyn96
Copy link

Thanks @YuryKorovko a lot. You save my day.

@rptwsthi
Copy link

I have upgraded Xcode version from 8.3.3 to 9.2. Then issue was disappeared))) I think new Xcode have required sdk's and platforms.

I am on XCode Version 10.0, And having same problem.\

@NikolayShubenkovProgSchool

Xcode 10.1 also was fixed by
sudo xcode-select --switch /Applications/Xcode.app
thanks to @YuryKorovko

@imchintan
Copy link

imchintan commented Jan 4, 2019

Thank you @YuryKorovko

Mac OS: 10.14.2 (18C54) Mojave
Xcode Version: 10.1 (10B61)
Pod version: 1.5.3
React-native: 0.55.4

Work for me below command
sudo xcode-select --switch /Applications/Xcode.app

@nikhilarunw
Copy link

Thank you @YuryKorovko
sudo xcode-select --switch /Applications/Xcode.app
It works.

@tmjordan
Copy link

tmjordan commented Feb 7, 2019

Thanku you very much @YuryKorovko 👍

@code4cake
Copy link

thank you very very much @YuryKorovko. Would you mind explaining what those commands do? Thanks a lot man :)

@facebook facebook locked as resolved and limited conversation to collaborators Mar 16, 2019
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Mar 16, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Platform: iOS iOS applications. Ran Commands One of our bots successfully processed a command. Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests