Xcode 11 build failure with command PhaseScriptExecution - xcode

Recently I rain into a strange issue when I doing a flutter project. My code can build and run in android studio, but when build on Xcode, it always hit the below error during the end of the process and failed with error "Command PhaseScriptExecution failed with a nonzero exit code". My xcode is of the latest version 11.1. Anyone encountered the same issue and any clue to resolve it? thanks and any help is appreciated.
The detail error msg is as shown below:
export TOOLCHAINS=com.apple.dt.toolchain.XcodeDefault
export TOOLCHAIN_DIR=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain
export TREAT_MISSING_BASELINES_AS_TEST_FAILURES=NO
export TeamIdentifierPrefix=7HVQ37VRT5.
export UID=501
export UNLOCALIZED_RESOURCES_FOLDER_PATH=Runner.app
export UNSTRIPPED_PRODUCT=NO
export USER=derrickxiang
export USER_APPS_DIR=/Users/derrickxiang/Applications
export USER_LIBRARY_DIR=/Users/derrickxiang/Library
export USE_DYNAMIC_NO_PIC=YES
export USE_HEADERMAP=YES
export USE_HEADER_SYMLINKS=NO
export USE_LLVM_TARGET_TRIPLES=YES
export USE_LLVM_TARGET_TRIPLES_FOR_CLANG=YES
export USE_LLVM_TARGET_TRIPLES_FOR_LD=YES
export USE_LLVM_TARGET_TRIPLES_FOR_TAPI=YES
export USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES=YES
export VALIDATE_DEVELOPMENT_ASSET_PATHS=YES_ERROR
export VALIDATE_PRODUCT=NO
export VALIDATE_WORKSPACE=NO
export VALID_ARCHS="i386 x86_64"
export VERBOSE_PBXCP=NO
export VERSIONING_SYSTEM=apple-generic
export VERSIONPLIST_PATH=Runner.app/version.plist
export VERSION_INFO_BUILDER=derrickxiang
export VERSION_INFO_FILE=Runner_vers.c
export VERSION_INFO_STRING=""#(#)PROGRAM:Runner PROJECT:Runner-1""
export WRAPPER_EXTENSION=app
export WRAPPER_NAME=Runner.app
export WRAPPER_SUFFIX=.app
export WRAP_ASSET_PACKS_IN_SEPARATE_DIRECTORIES=NO
export XCODE_APP_SUPPORT_DIR=/Applications/Xcode.app/Contents/Developer/Library/Xcode
export XCODE_PRODUCT_BUILD_VERSION=11A1027
export XCODE_VERSION_ACTUAL=1110
export XCODE_VERSION_MAJOR=1100
export XCODE_VERSION_MINOR=1110
export XPCSERVICES_FOLDER_PATH=Runner.app/XPCServices
export YACC=yacc
export arch=undefined_arch
export variant=normal
/bin/sh -c /Users/derrickxiang/Library/Developer/Xcode/DerivedData/Runner-ddqqlsawcqbvcocyrpnrjfejjuha/Build/Intermediates.noindex/Runner.build/Debug-iphonesimulator/Runner.build/Script-3B06AD1E1E4923F5004D2608.sh
Non-fat binary /Users/derrickxiang/Library/Developer/Xcode/DerivedData/Runner-ddqqlsawcqbvcocyrpnrjfejjuha/Build/Products/Debug-iphonesimulator/Runner.app/Frameworks/App.framework/App is not x86_64. Running lipo -info:
Non-fat file: /Users/derrickxiang/Library/Developer/Xcode/DerivedData/Runner-ddqqlsawcqbvcocyrpnrjfejjuha/Build/Products/Debug-iphonesimulator/Runner.app/Frameworks/App.framework/App is architecture: arm64
Command PhaseScriptExecution failed with a nonzero exit code

Related

Command PhaseScriptExecution failed with a nonzero exit code.PhaseScriptExecution [CP-User]

This is a react native project.
After pod install, execute yarn ios and get the following error:
export VERSION_INFO_BUILDER\=link
export VERSION_INFO_FILE\=FBReactNativeSpec_vers.c
export VERSION_INFO_STRING\=\"#\(\#\)PROGRAM:FBReactNativeSpec\ \ PROJECT:Pods-\"
export WRAP_ASSET_PACKS_IN_SEPARATE_DIRECTORIES\=NO
export XCODE_APP_SUPPORT_DIR\=/Applications/Xcode.app/Contents/Developer/Library/Xcode
export XCODE_PRODUCT_BUILD_VERSION\=13C100
export XCODE_VERSION_ACTUAL\=1321
export XCODE_VERSION_MAJOR\=1300
export XCODE_VERSION_MINOR\=1320
export XPCSERVICES_FOLDER_PATH\=/XPCServices
export YACC\=yacc
export arch\=undefined_arch
export variant\=normal
/bin/sh -c /Users/link/Library/Developer/Xcode/DerivedData/rnApp-blqornskbkxcupglcsclzbmwefcw/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/FBReactNativeSpec.build/Script-5F4C70EF7D90A5A5BDAEB404279F232A.sh
Command PhaseScriptExecution failed with a nonzero exit code
objc[28114]: Class AMSupportURLConnectionDelegate is implemented in both /usr/lib/libauthinstall.dylib (0x211582b90) and /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x1041e42c8). One of the two will be used. Which one is undefined.
objc[28114]: Class AMSupportURLSession is implemented in both /usr/lib/libauthinstall.dylib (0x211582be0) and /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x1041e4318). One of the two will be used. Which one is undefined.
** BUILD FAILED **
The following build commands failed:
PhaseScriptExecution [CP-User]\ Generate\ Specs /Users/link/Library/Developer/Xcode/DerivedData/rnApp-blqornskbkxcupglcsclzbmwefcw/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/FBReactNativeSpec.build/Script-5F4C70EF7D90A5A5BDAEB404279F232A.sh (in target 'FBReactNativeSpec' from project 'Pods')
(1 failure)
However, when using sudo yarn ios, it can work normally. I don't understand why?
This is because of the node version you are using, Using the current
lts version will work for react native 0.67 version.
I try to "nvm unalias default". It worked. Ref: https://github.com/react-native-community/upgrade-support/issues/161

Hadoop: bad execution compiling WordCount

I have installed Hadoop 3.1.1 and it is working. However, when I try to compile the WordCount example, I am receiving this error:
/usr/local/hadoop/libexec/hadoop-functions.sh: line 2358: HADOOP_COM.SUN.TOOLS.JAVAC.MAIN_USER: bad substitution
/usr/local/hadoop/libexec/hadoop-functions.sh: line 2453: HADOOP_COM.SUN.TOOLS.JAVAC.MAIN_OPTS: bad substitution
To compile, I used the next line:
hadoop com.sun.tools.javac.Main WordCount.java
I have the next variables in the .bashrc:
#Hadoop variables
export HADOOP_HOME=/usr/local/hadoop
export CONF=$HADOOP_HOME/etc/hadoop
export PATH=$PATH:$HADOOP_HOME/bin
export PATH=$PATH:$HADOOP_HOME/sbin
#Java home
export JAVA_HOME=${JAVA_HOME}/java-8-oracle
#Path Java Tools
export HADOOP_CLASSPATH=$JAVA_HOME/lib/tools.jar
This time I am using Java 8 of Oracle because the apt-get of Ubuntu 18.08 LTS does not give me the option of installing the OpenJDK8. I have updated and upgraded Ubuntu.
I have read a lot of different post and possible solutions, but I cannot solve it.
This is a viable solution I found in https://janzhou.org/2014/how-to-compile-hadoop.html
Set the HADOOP_CLASSPATH:
export HADOOP_CLASSPATH=$(bin/hadoop classpath)
Compile:
javac -classpath ${HADOOP_CLASSPATH} -d WordCount/ WordCount.java

DatabaseError: DPI-1047

I’m having an issue with instantclient. I was following the exact instructions in the http://www.oracle.com/technetwork/topics/intel-macsoft-096467.html#ic_osx_inst to install Instant Client 11.2 on macOS.
However, when starting the server in the command line it return the following error:
DatabaseError: DPI-1047: 64-bit Oracle Client library cannot be loaded: "dlopen(libclntsh.dylib,
What is your version of Python? Is it 32-bit or 64-bit?
64-bit
What is your cx_Oracle version?
The latest version as of today, I believe it's 6.4.1
What exact command caused the problem (e.g. what command did you try to install with)?
When executing this command ‘python manage.py’ to run the application
What error(s) you are seeing?
DatabaseError: DPI-1047: 64-bit Oracle Client library cannot be loaded: "dlopen(libclntsh.dylib, 1): image not found". See https://oracle.github.io/odpi/doc/installation.html#macos
In my bash profile I have these established:
export PATH="/usr/local/mysql/bin:$PATH"
export PATH=/usr/local/sbin:/usr/local/bin:$PATH
# Load .bashrc if it exists
test -f ~/.bashrc && source ~/.bashrc
export WORKON_HOME=$HOME/Virtualenvs
export VIRTUALENVWRAPPER_VIRTUALENV_ARGS='--no-site-packages'
export VIRTUALENVWRAPPER_PYTHON=/usr/local/Cellar/python#2/2.7.15_1/bin/python2.7
export VIRTUALENVWRAPPER_VIRTUALENV=usr/local/Cellar/python#2/2.7.15_1/bin/virtualenv
export PIP_VIRTUALENV_BASE=$WORKON_HOME
export PIP_RESPECT_VIRTUALENV=true
export TNS_ADMIN=/usr/local/oracle/instantclient_11_2
source /usr/local/bin/virtualenvwrapper.sh
export PATH="/usr/local/opt/gettext/bin:$PATH"
if [ -f $(brew --prefix)/etc/bash_completion ]; then
source $(brew --prefix)/etc/bash_completion
fi
export PATH=~/instantclient_11_2:$PATH
# Setting PATH for Python 2.7
# The original version is saved in .bash_profile.pysave
PATH="/Library/Frameworks/Python.framework/Versions/2.7/bin:${PATH}"
export PATH
Review the installation notes for cx_Oracle: https://cx-oracle.readthedocs.io/en/latest/installation.html#installing-cx-oracle-on-macos. Note especially the first sentence -- you cannot use the OS installation of Python!
If anyone is still getting the error DPI-1047 in Python, you might want to upgrade cx_Oracle. The latest major version (which supersedes cx_Oracle 8.3) has a new name python-oracledb. By default this new version doesn't need Oracle Client libraries. Check the installation documentation.

PyCharm: Can't find spark-submit

I am trying to run a test file in PyCharm with unittest.
It errors with this message:
FileNotFoundError: [Errno 2] No such file or directory: 'myfolder/opt/spark/./bin/spark-submit': 'myfolder/opt/spark/./bin/spark-submit'
I think it has something to do with my .bash_profile which a coworker helped configure. It looks like this:
export SPARK_HOME=myfolder/opt/spark
export PATH=$SPARK_HOME/bin:$PATH
export PATH=$HOME/.node_modules_global/bin:$PATH
# added by Anaconda3 5.1.0 installer
export PATH="/Users/myname/anaconda3/bin:$PATH"
Important to note, the path myfolder/opt/spark/./bin/spark-submit does not exist, but myfolder/opt/spark/bin/spark-submit does. I have no idea why the extra ./ is being added to the path.

Trouble with cygwin and hadoop 2.6.1 - null\bin\winutils.exe

I want to run hadoop 2.6.1 on cygwin64. (Later I want to run hBsae,too)
The problem is, that I start start-dfs.sh, I will get this exception:
15/10/07 21:13:54 ERROR util.Shell: Failed to locate the winutils binary in the hadoop binary path
java.io.IOException: Could not locate executable null\bin\winutils.exe in the Hadoop binaries.
at org.apache.hadoop.util.Shell.getQualifiedBinPath(Shell.java:355)
at org.apache.hadoop.util.Shell.getWinUtilsPath(Shell.java:370)
at org.apache.hadoop.util.Shell.<clinit>(Shell.java:363)
at org.apache.hadoop.util.GenericOptionsParser.preProcessForWindows(GenericOptionsParser.java:438)
at org.apache.hadoop.util.GenericOptionsParser.parseGeneralOptions(GenericOptionsParser.java:484)
at org.apache.hadoop.util.GenericOptionsParser.<init>(GenericOptionsParser.java:170)
at org.apache.hadoop.util.GenericOptionsParser.<init>(GenericOptionsParser.java:153)
at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:64)
at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:84)
at org.apache.hadoop.hdfs.tools.GetConf.main(GetConf.java:331)
Okay, I know that this is a well known problem and some solutions in this forum say something about adding HADOOP_HOME to the envirements. But the problem is still available.
this is a snippet of my bash_profile:
# cygwin path translation
export JAVA_HOME=$(cygpath -u $(cygpath -m -s "${JAVA_HOME}"))
export HADOOP_PREFIX=/home/user/hadoop-2.6.1
export PATH=$PATH:$(cygpath -u $(cygpath -m -s "${JAVA_HOME}\bin")):/home/user/hadoop-2.6.1/bin
export HADOOP_INSTALL=/home/user/hadoop-2.6.1
export HADOOP_HOME=/home/user/hadoop-2.6.1/
export HADOOP_MAPRED_HOME=$HADOOP_INSTALL
export HADOOP_COMMON_HOME=$HADOOP_INSTALL
export HADOOP_HDFS_HOME=$HADOOP_INSTALL
export YARN_HOME=$HADOOP_INSTALL
export HADOOP_COMMON_LIB_NATIVE_DIR=/home/user/hadoop-2.6.1/lib/native
export PATH=$PATH:$HADOOP_INSTALL/sbin
export PATH=$PATH:$HADOOP_INSTALL/bin
an echo $HADOOP_HOME also prints the path. But why is the path of winutils incomplete? Or is there a variable that I ferget?
greetings
You should set up winutils.exe in your PATH (environment variable).

Resources