ignite: Installation just failed

Describe the bug

Installation just failed, I let all default option for installation as default.

Installing boost (1.76.0)
Installing fmt (6.2.1)
Installing glog (0.3.5)
[!] /usr/local/bin/bash -c
set -e
#!/bin/bash
# Copyright (c) Meta Platforms, Inc. and affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.

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="arm64"
    fi
fi

if [ "$CURRENT_ARCH" == "arm64" ]; then
    cat <<\EOF >>fix_glog_0.3.5_apple_silicon.patch
diff --git a/config.sub b/config.sub
index 1761d8b..43fa2e8 100755
--- a/config.sub
+++ b/config.sub
@@ -1096,6 +1096,9 @@ case $basic_machine in
 		basic_machine=z8k-unknown
 		os=-sim
 		;;
+	arm64-*)
+		basic_machine=$(echo $basic_machine | sed 's/arm64/aarch64/')
+		;;
 	none)
 		basic_machine=none-none
 		os=-none
EOF

    patch -p1 config.sub fix_glog_0.3.5_apple_silicon.patch
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

# Manually disable gflags include to fix issue https://github.com/facebook/react-native/issues/28446
sed -i '' 's/\@ac_cv_have_libgflags\@/0/' src/glog/logging.h.in
sed -i '' 's/HAVE_LIB_GFLAGS/HAVE_LIB_GFLAGS_DISABLED/' src/config.h.in

./configure --host arm-apple-darwin

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 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

# Prepare exported header include
EXPORTED_INCLUDE_DIR="exported/glog"
mkdir -p exported/glog
cp -f src/glog/log_severity.h "$EXPORTED_INCLUDE_DIR/"
cp -f src/glog/logging.h "$EXPORTED_INCLUDE_DIR/"
cp -f src/glog/raw_logging.h "$EXPORTED_INCLUDE_DIR/"
cp -f src/glog/stl_logging.h "$EXPORTED_INCLUDE_DIR/"
cp -f src/glog/vlog_is_on.h "$EXPORTED_INCLUDE_DIR/"

patching file config.sub
sed: can't read s/\@ac_cv_have_libgflags\@/0/: No such file or directory

./bin/postInstall failed on command:
  if [ -d "ios" ]; then cd ios && pod install && cd -; fi
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

Ignite version

8.2.5

Additional info

npx ignite-cli doctor
System
  platform           darwin
  arch               x64
  cpu                8 cores      Intel(R) Core(TM) i7-8569U CPU @ 2.80GHz
  directory          AcTracker    /Users/jfischer/minds/AcTracker

JavaScript (and globally-installed packages)
  node                16.15.1                                   /usr/local/bin/node
  npm                 8.19.2                                    /usr/local/bin/npm
    corepack          0.10.0
    diff-so-fancy     1.3.0
    es-check          5.2.3
    gatsby            2.24.87
    gtop              1.0.2
    jest              27.2.0
    license-checker   25.0.1
    neovim            4.10.0
    netlify-cli       3.38.9
    nodemon           2.0.6
    npm               8.19.2
    postcss           8.1.7
    pure-prompt       1.16.0
    tspath            1.3.7
    twilio-cli        2.12.0
    typescript        4.4.3
    yarn              1.22.17
  yarn                1.22.17                                   /usr/local/bin/yarn
    create-vite       3.0.2
    node-gyp          6.1.0
    vite              2.3.7
  pnpm                7.9.0                                     /usr/local/bin/pnpm
                      <no pnpm global package info available>
  expo                46.0.15                                   managed

Ignite
  ignite-cli         8.2.5        /Users/jfischer/.npm/_npx/e31027f3785124a8/node_modules/.bin/ignite
  ignite src         build        /Users/jfischer/.npm/_npx/e31027f3785124a8/node_modules/ignite-cli/build

Android
  java               1.8.0_292    /usr/bin/java
  android home       -            undefined

iOS
  xcode              14.0.1
  cocoapods          1.11.3       /usr/local/bin/pod

Tools
  git                git version 2.34.1   /usr/local/bin/git
  

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 20 (8 by maintainers)

Most upvoted comments

Had the same issue but i think i found the issue.

I noticed that it was using my old pod version, and not the one i just installed by gem. By running which pod, i saw that it was pointing to /usr/local/bin/pod which is the built in version. Changing this to the one installed by gem i added /opt/homebrew/opt/ruby/bin to my path.

But that was not all. The script would still fail on

Fetching podspec for `hermes-engine` from `../node_modules/react-native/sdks/hermes/hermes-engine.podspec`
[!] CocoaPods could not find compatible versions for pod "hermes-engine":
  In snapshot (Podfile.lock):

So I removed the Podfile.lock in the ios directory and then manually ran pod install in that ios directory.

This made all the pods install correctly.

@Peege151 Hi can you move the conversation over to #2286 please as this issue is closed. Thanks

@frankcalise was experiencing the same problem as @martengooz (CocoaPods could not find compatible versions for pod “hermes-engine”).

Can confirm removing Podfile.lock and re-running ./bin/postinstall from project directory worked, installing hermes-engine 0.69.6

If it helps, hermes-engine version in Podfile.lock was 0.69.5 and in Pods/Local Podspecs/hermes-engine.podspec 0.69.6

@jfroffice can you try updating cocoapods as well?

sudo gem install cocoapods

and then retry the installation with the latest ignite verison