3

i tried with some simple codes to build a task.

the steps like that:

cordova -d create hello com.example.hello HelloWorld

cd hello

cordova platform add ios

cordova build ios

and it threw error:

Create product structure
/bin/mkdir -p /Users/millet/hello/platforms/ios/build/emulator/HelloWorld.app

PhaseScriptExecution Copy\ www\ directory build/HelloWorld.build/Debug-iphonesimulator/HelloWorld.build/Script-304B58A110DAC018002A0835.sh
    cd /Users/millet/hello/platforms/ios
    /bin/sh -c /Users/millet/hello/platforms/ios/build/HelloWorld.build/Debug-iphonesimulator/HelloWorld.build/Script-304B58A110DAC018002A0835.sh
dyld: bad external relocation length
/Users/millet/hello/platforms/ios/build/HelloWorld.build/Debug-iphonesimulator/HelloWorld.build/Script-304B58A110DAC018002A0835.sh: line 2: 15137 Trace/BPT trap: 5       node cordova/lib/copy-www-build-step.js
Command /bin/sh failed with exit code 133

** BUILD FAILED **


The following build commands failed:
    PhaseScriptExecution Copy\ www\ directory build/HelloWorld.build/Debug-iphonesimulator/HelloWorld.build/Script-304B58A110DAC018002A0835.sh
(1 failure)
Error: Error code 65 for command: xcodebuild with args: -xcconfig,/Users/millet/hello/platforms/ios/cordova/build-debug.xcconfig,-project,HelloWorld.xcodeproj,ARCHS=i386,-target,HelloWorld,-configuration,Debug,-sdk,iphonesimulator,build,VALID_ARCHS=i386,CONFIGURATION_BUILD_DIR=/Users/millet/hello/platforms/ios/build/emulator,SHARED_PRECOMPS_DIR=/Users/millet/hello/platforms/ios/build/sharedpch

my ios version is 4.1.1 and cordova version is 6.2.0 and xcode version is 7.2

guanwanjun
  • 31
  • 1
  • 2
  • Have a look here: [I installed nvm n and now I keep getting “dyld: bad external relocation length”](http://stackoverflow.com/questions/29099767/i-installed-nvm-n-and-now-i-keep-getting-dyld-bad-external-relocation-length) – Beat Jul 20 '16 at 12:52
  • Did you every resolve this? I'm getting this same 'PhaseScriptExecution' error. – Marques Woodson Jun 21 '18 at 17:57

1 Answers1

2

I fixed by running following command:

chmod +x "[Path].sh"

Change Path to your path where showing in error messages

jyjin
  • 95
  • 7