React-native: [glog] During pod install: ./configure: No such file or directory

Created on 21 Aug 2018  路  3Comments  路  Source: facebook/react-native

Reproducible?

Yes, I had a colleague follow the instructions in the repo below on their computer and it gave them the same error.

https://github.com/rob-keepsafe/RNGlogIssue

Environment

  React Native Environment Info:
    System:
      OS: macOS High Sierra 10.13.6
      CPU: x64 Intel(R) Core(TM) i7-4870HQ CPU @ 2.50GHz
      Memory: 1.58 GB / 16.00 GB
      Shell: 5.3 - /bin/zsh
    Binaries:
      Node: 8.7.0 - ~/.nvm/versions/node/v8.7.0/bin/node
      Yarn: 1.3.2 - /usr/local/bin/yarn
      npm: 6.4.0 - ~/.nvm/versions/node/v8.7.0/bin/npm
    SDKs:
      iOS SDK:
        Platforms: iOS 11.4, macOS 10.13, tvOS 11.4, watchOS 4.3
    IDEs:
      Xcode: 9.4.1/9F2000 - /usr/bin/xcodebuild
    npmPackages:
      react: 16.0.0-beta.5 => 16.0.0-beta.5
      react-native: ^0.56.0 => 0.56.0
    npmGlobalPackages:
      react-native-cli: 2.0.1

Error Description

While running pod install, it errors on glog with the error below.

Note: the file source shown below is located at: node_modules/react-native/scripts/ios-configure-glog.sh

Installing glog (0.3.4)
[!] /bin/bash -c
set -e
#!/bin/bash
set -e

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

if [ -z "$CURRENT_ARCH" ] || [ "$CURRENT_ARCH" == "undefined_arch" ]; then
    # Xcode 10 beta sets CURRENT_ARCH to "undefined_arch", this leads to incorrect linker arg.
    # it's better to rely on platform name as fallback because architecture differs between simulator and device

    if [[ "$PLATFORM_NAME" == *"simulator"* ]]; then
        CURRENT_ARCH="x86_64"
    else
        CURRENT_ARCH="armv7"
    fi
fi

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

/bin/bash: line 27: ./configure: No such file or directory

Relevant section of Podfile:

react_pod 'React', npm_path: 'react-native', subspecs: %w[
    Core
    CxxBridge
    RCTImage
    RCTNetwork
    RCTText
    RCTLinkingIOS
    RCTWebSocket
    RCTAnimation
  ]
# Required by ReactNative
react_pod 'yoga', npm_path: 'react-native/ReactCommon/yoga'
react_pod 'DoubleConversion', npm_path: 'react-native/third-party-podspecs'
react_pod 'glog', npm_path: 'react-native/third-party-podspecs'
react_pod 'Folly', npm_path: 'react-native/third-party-podspecs'
Bug iOS For Stack Overflow Locked

Most helpful comment

@Unoken could you try this: It worked for me:
sudo xcode-select --switch /Applications/Xcode.app
Check the original answer on SO: https://stackoverflow.com/questions/53028367/glog-configure-warning-missing-script-is-too-old-or-missing

All 3 comments

Same error :(, i wasted 2 days for this, try some solutions but none work. @rob-keepsafe : do you resolved this?

@Unoken could you try this: It worked for me:
sudo xcode-select --switch /Applications/Xcode.app
Check the original answer on SO: https://stackoverflow.com/questions/53028367/glog-configure-warning-missing-script-is-too-old-or-missing

馃憢 hey all; thanks for raising this issue and also for posting a way to fix the issue.

Given @juansimon18 response above I'm inclined to think this is a local dev environment issue rather than being specific to React Native; admittedly the error message could maybe specify how to resolve the issue as above (but I'm not sure this is something that can be done from React Native, unfortunately).

Because of this; I'm going to go ahead and close this for now.

Thank you

Was this page helpful?
0 / 5 - 0 ratings