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

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

Related

Command PhaseScriptExecution failed with a nonzero exit code - React Native

Whenever I try to run npm-run-ios for any react native project I run into the following error with Xcode.
The following build commands failed: PhaseScriptExecution [CP-User]\ Generate\ Specs /Users/keenanmapp/Library/Developer/Xcode/DerivedData/UnsplashSearch-ancvrrzszrqkahamhpgtfqwhhuns/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/FBReactNativeSpec.build/Script-5F4C70EF7D90A5A5BDAEB404
I tried removing the pods and reinstalling but nothing works.

Error while running make command using Fabric 1.0.6 after all the 15 steps

I am installing fabric in a custom path $HOME//gopath/src/github.com/hyperledger/fabric using the make command but after installing all the 15 steps, I am getting the following error
Step 15/15 : LABEL org.hyperledger.fabric.version=1.0.2 org.hyperledger.fabric.base.version=0.3.2
---> Running in ed05a67810db
Removing intermediate container ed05a67810db
---> 99b4b0b28957
Successfully built 99b4b0b28957
Successfully tagged hyperledger/fabric-javaenv:latest
docker tag hyperledger/fabric-javaenv hyperledger/fabric-javaenv:x86_64-1.0.2
build/bin/peer
CGO_CFLAGS=" " GOBIN=/root/gopath/src/github.com/hyperledger/fabric/build/bin go install -tags "" -ldflags "-X github.com/hyperledger/fabric/common/metadata.Version=1.0.2 -X github.com/hyperledger/fabric/common/metadata.BaseVersion=0.3.2 -X github.com/hyperledger/fabric/common/metadata.BaseDockerLabel=org.hyperledger.fabric -X github.com/hyperledger/fabric/common/metadata.DockerNamespace=hyperledger -X github.com/hyperledger/fabric/common/metadata.BaseDockerNamespace=hyperledger" github.com/hyperledger/fabric/peer
go build github.com/hyperledger/fabric/vendor/github.com/miekg/pkcs11: invalid flag in #cgo LDFLAGS: -Wl,--no-as-needed
Makefile:227: recipe for target 'build/bin/peer' failed
make: *** [build/bin/peer] Error 1
Docker version 17.12.0-ce, build c97c6d6
docker-compose version 1.18.0, build 8dd22a9
go version go1.9.4 linux/amd64
OS : Ubuntu 16.04
I have set the following path also
$ mkdir $HOME/gopath
$ export GOPATH=$HOME/gopath
$ export GOROOT=$HOME/go
$ export PATH=$PATH:$GOROOT/bin
Jira Link: https://jira.hyperledger.org/browse/FAB-2218 which I have already done
It is a known issue in go 1.9.4:
https://github.com/golang/go/issues/23739
While go people are fixing it, you can manually whitelist the flags before starting make:
$ export CGO_LDFLAGS_ALLOW='-Wl,--no-as-needed'
$ make
Alternatively you can just downgrade to go 1.9.3
as far as I know you don't need to build the fabric itself.
You just need to have sources in the gopath, as your chaincode will need this, when you are building your chaincode for the blockchain itself.
In addition you will probably also need to install the fabric-ca for your chaincode to build successfully, if you use the certificate-stuff.
This is sufficient to check if you installed fabric correctly:
cd $GOPATH/src/github.com/hyperledger/fabric
make unit-test
Keep going if this works.
I found this confusing at first as well ;)
I'd assume you switch to golang 1.9.4 or greater hence I belive this actually related to following issue, to solve it you need to update vendor dependencies:
govendor fetch github.com/hyperledger/fabric/vendor/github.com/miekg/pkcs11
Next continue to build binaries and run tests.

"generate-pch command failed with exit code 1" when making a new Xcode scheme

I'm following the instruction here http://www.teratotech.com/blog/xcode-7-steps-to-easily-switch-between-multiple-environments/ to generate different schemes for different environments..
I created a testing configuration and created a new scheme to use that configuration. However, when I build and run, I'm getting this error:
<unknown>:0: error: generate-pch command failed with exit code 1 (use -v to see invocation)
error: 'AFNetworking/AFNetworking.h' file not found
#import <AFNetworking/AFNetworking.h>
1 error generated.
<unknown>:0: error: failed to emit precompiled header '/var/folders/f2/6j4b4kz54xy1vf_2gdlnrllc0000gn/T/My-Project-Header-47bffb.pch' for bridging header '/Users/me/Dev/my-project/My-Project-Header.h'
When I build with my original scheme, everything's fine... I only have 1 target. Am I missing anything?
EDIT: I'm using Cocoapods to manage my dependencies, if that makes any difference.
i solved this issue by running below commands
$ pod repo update
$ pod install
Usually such issue happens when project directory is changed or copied form some other machine.

gradle.daemon react-native: Could not find or load main class “Dorg.gradle.daemon=true”

When I try to build the project with the command 'react-native run-android' the following error appears:
Error: Could not find or load main class “Dorg.gradle.daemon=true”
JS server already running.
Building and installing the app on the device (cd android && ./gradlew installDebug...
Error: Could not find or load main class “Dorg.gradle.daemon=true”
Could not install the app on the device, read the error above for details.
.bash_profile contains the following global variables:
export ANDROID_HOME=$HOME/Library/Android/Android-SDK
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_92.jdk/Contents/Hom
export GRADLE_OPTS=“Dorg.gradle.daemon=true”
I have my emulator running and I have ran the command "source ~/.bash_profile".
All I want is to enable gradle daemon and execute the project.
Don't know if this is the reason but should be rather:
GRADLE_OPTS="-Dorg.gradle.daemon=true"
mind the dash -.

Error while installing sumo-0.21.0 for Veins 3.0

I first build sumo using
export CPPFLAGS="$CPPFLAGS -I/opt/local/include"
export LDFLAGS="$LDFLAGS -L/opt/local/lib"
make -f Makefile.cvs
./configure --with-fox-config=/opt/local/bin/fox-config -with-proj-gdal=/opt/local --with-xerces=/opt/local --prefix=/opt/sumo
then sudo make install ends with the following error
NIImporter_ArcView.cpp:129:49: error: no member named 'Open' in 'OGRSFDriverRegistrar'
best regards
SG
In ./configure should be --with-proj-gdal=/opt/local (with two dashes).

Resources