I have spent about 30 mins trying to build Google Dart. The problem is in macosx sdk version. Google Dart needs 10.5 for building, but there is no 10.5 sdk in XCode 4 in Lion.
Error message:
=== BUILD NATIVE TARGET v8_base OF PROJECT v8 WITH CONFIGURATION Debug_x64 === ** BUILD FAILED **
Full instruction how to build Google Dart and fix this issue:
0. Install depot_tools
First of all, we need depot_tools from google:
http://dev.chromium.org/developers/how-tos/install-depot-tools
svn co http://src.chromium.org/svn/trunk/tools/depot_tools export PATH="$PATH":`pwd`/depot_tools
1. Getting the source
How to get the source: http://code.google.com/p/dart/wiki/GettingTheSource
gclient config http://dart.googlecode.com/svn/trunk/deps/all.deps gclient sync
2. Change Mac OS X SDK to 10.6
Open tools/build.py and add the following lines after line 108:
'-sdk', 'macosx10.6',
Now build.py 108-119 lines should look like:
args = ['xcodebuild',
'-sdk',
'macosx10.6',
'-project',
project_file,
'-target',
target,
'-parallelizeTargets',
'-configuration',
build_config,
'SYMROOT=%s' % os.path.abspath('xcodebuild')
]
Diff:
Index: tools/build.py
===================================================================
--- tools/build.py (revision 296)
+++ tools/build.py (working copy)
@@ -106,6 +106,8 @@
if os.path.exists('dart-%s.gyp' % CurrentDirectoryBaseName()):
project_file = 'dart-%s.xcodeproj' % CurrentDirectoryBaseName()
args = ['xcodebuild',
+ '-sdk',
+ 'macosx10.6',
'-project',
project_file,
'-target',
3. Building everything
Next step is described in Google guide:
http://code.google.com/p/dart/wiki/Building#Building_everything
Just run
./tools/build.py --arch=ia32
or
./tools/build.py --arch=x64
That’s all.
I believe I have followed your instructions (running everything in /Users/andy/dart), but I get the following error when building with –arch=x64
xcodebuild -sdk macosx10.6 -project dart.xcodeproj -target All -parallelizeTargets -configuration Debug_x64 SYMROOT=/Users/andy/dart/dart/xcodebuild
Build settings from command line:
SDKROOT = macosx10.6
SYMROOT = /Users/andy/dart/dart/xcodebuild
2011-10-10 13:22:52.055 xcodebuild[15680:4203] error: Error Domain=NSPOSIXErrorDomain Code=2 “Non-zero exit code 127 returned from shell command: /Developer/usr/bin/gcc-4.2 -v -E -dM -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.6.sdk -x c++ -c /dev/null 2>&1″ UserInfo=0x4018702e0 {NSLocalizedDescription=Non-zero exit code 127 returned from shell command: /Developer/usr/bin/gcc-4.2 -v -E -dM -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.6.sdk -x c++ -c /dev/null 2>&1, NSLocalizedFailureReason=No such file or directory}
2011-10-10 13:22:52.056 xcodebuild[15680:4203] Warning: Couldn’t discover the ‘gcc-4.2′ compiler’s built-in search paths and preprocessor definitions for language dialect ‘c++’.
Compiler: /Developer/usr/bin/gcc-4.2
Reason: /Developer/usr/bin/gcc-4.2 -v -E -dM -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.6.sdk -x c++ -c /dev/null 2>&1
=== BUILD NATIVE TARGET v8_base OF PROJECT v8 WITH CONFIGURATION Debug_x64 ===
Check dependencies
2011-10-10 13:22:52.212 xcodebuild[15680:4b03] error: Error Domain=NSPOSIXErrorDomain Code=2 “Non-zero exit code 127 returned from shell command: /Developer/usr/bin/gcc-4.2 -v -E -dM -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.6.sdk -x c -c /dev/null 2>&1″ UserInfo=0x4001bea00 {NSLocalizedDescription=Non-zero exit code 127 returned from shell command: /Developer/usr/bin/gcc-4.2 -v -E -dM -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.6.sdk -x c -c /dev/null 2>&1, NSLocalizedFailureReason=No such file or directory}
2011-10-10 13:22:52.222 xcodebuild[15680:4b03] Warning: Couldn’t discover the ‘gcc-4.2′ compiler’s built-in search paths and preprocessor definitions for language dialect ‘c’.
Compiler: /Developer/usr/bin/gcc-4.2
Reason: /Developer/usr/bin/gcc-4.2 -v -E -dM -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.6.sdk -x c -c /dev/null 2>&1
Unsupported compiler ‘GCC 4.2′ selected for architecture ‘x86_64′
=== BUILD AGGREGATE TARGET generate_corelib_impl_cc_file OF PROJECT dart-runtime WITH CONFIGURATION Debug_x64 ===
=== BUILD AGGREGATE TARGET generate_corelib_cc_file OF PROJECT dart-runtime WITH CONFIGURATION Debug_x64 ===
=== BUILD NATIVE TARGET libdart_vm OF PROJECT dart-runtime WITH CONFIGURATION Debug_x64 ===
=== BUILD AGGREGATE TARGET d8_js2c OF PROJECT d8 WITH CONFIGURATION Debug_x64 ===
=== BUILD AGGREGATE TARGET closure_compiler OF PROJECT dart-compiler WITH CONFIGURATION Debug_x64 ===
=== BUILD NATIVE TARGET libjscre OF PROJECT dart-runtime WITH CONFIGURATION Debug_x64 ===
=== BUILD AGGREGATE TARGET js2c OF PROJECT v8 WITH CONFIGURATION Debug_x64 ===
=== BUILD AGGREGATE TARGET generate_builtin_cc_file OF PROJECT dart-runtime WITH CONFIGURATION Debug_x64 ===
** BUILD FAILED **
The following build commands failed:
Check dependencies
(1 failure)
BUILD FAILED
and similarly with arch=ia32
xcodebuild -sdk macosx10.6 -project dart.xcodeproj -target All -parallelizeTargets -configuration Debug_ia32 SYMROOT=/Users/andy/dart/dart/xcodebuild
Build settings from command line:
SDKROOT = macosx10.6
SYMROOT = /Users/andy/dart/dart/xcodebuild
=== BUILD AGGREGATE TARGET generate_corelib_cc_file OF PROJECT dart-runtime WITH CONFIGURATION Debug_ia32 ===
Check dependencies
2011-10-10 13:23:44.279 xcodebuild[15725:4c03] error: Error Domain=NSPOSIXErrorDomain Code=2 “Non-zero exit code 127 returned from shell command: /Developer/usr/bin/gcc-4.2 -v -E -dM -arch i386 -isysroot /Developer/SDKs/MacOSX10.6.sdk -x c++ -c /dev/null 2>&1″ UserInfo=0x4021772c0 {NSLocalizedDescription=Non-zero exit code 127 returned from shell command: /Developer/usr/bin/gcc-4.2 -v -E -dM -arch i386 -isysroot /Developer/SDKs/MacOSX10.6.sdk -x c++ -c /dev/null 2>&1, NSLocalizedFailureReason=No such file or directory}
2011-10-10 13:23:44.279 xcodebuild[15725:4c03] Warning: Couldn’t discover the ‘gcc-4.2′ compiler’s built-in search paths and preprocessor definitions for language dialect ‘c++’.
Compiler: /Developer/usr/bin/gcc-4.2
Reason: /Developer/usr/bin/gcc-4.2 -v -E -dM -arch i386 -isysroot /Developer/SDKs/MacOSX10.6.sdk -x c++ -c /dev/null 2>&1
PhaseScriptExecution “Action “generate_corelib_cc”" /Users/andy/dart/dart/xcodebuild/dart-runtime.build/Debug_ia32/generate_corelib_cc_file.build/Script-61B70A4850462E150C53D7EB.sh
cd /Users/andy/dart/dart/runtime
/bin/sh -c /Users/andy/dart/dart/xcodebuild/dart-runtime.build/Debug_ia32/generate_corelib_cc_file.build/Script-61B70A4850462E150C53D7EB.sh
note: Generating /Users/andy/dart/dart/xcodebuild/DerivedSources/Debug_ia32/corelib_gen.cc file.
2011-10-10 13:23:44.441 xcodebuild[15725:4c03] error: Error Domain=NSPOSIXErrorDomain Code=2 “Non-zero exit code 127 returned from shell command: /Developer/usr/bin/gcc-4.2 -v -E -dM -arch i386 -isysroot /Developer/SDKs/MacOSX10.6.sdk -x c -c /dev/null 2>&1″ UserInfo=0×400810360 {NSLocalizedDescription=Non-zero exit code 127 returned from shell command: /Developer/usr/bin/gcc-4.2 -v -E -dM -arch i386 -isysroot /Developer/SDKs/MacOSX10.6.sdk -x c -c /dev/null 2>&1, NSLocalizedFailureReason=No such file or directory}
2011-10-10 13:23:44.442 xcodebuild[15725:4c03] Warning: Couldn’t discover the ‘gcc-4.2′ compiler’s built-in search paths and preprocessor definitions for language dialect ‘c’.
Compiler: /Developer/usr/bin/gcc-4.2
Reason: /Developer/usr/bin/gcc-4.2 -v -E -dM -arch i386 -isysroot /Developer/SDKs/MacOSX10.6.sdk -x c -c /dev/null 2>&1
=== BUILD AGGREGATE TARGET closure_compiler OF PROJECT dart-compiler WITH CONFIGURATION Debug_ia32 ===
=== BUILD NATIVE TARGET libjscre OF PROJECT dart-runtime WITH CONFIGURATION Debug_ia32 ===
=== BUILD AGGREGATE TARGET d8_js2c OF PROJECT d8 WITH CONFIGURATION Debug_ia32 ===
PhaseScriptExecution “Action “d8_js2c”" /Users/andy/dart/dart/xcodebuild/d8.build/Debug_ia32/d8_js2c.build/Script-0CE341204FB41915C1FDC093.sh
cd /Users/andy/dart/dart/third_party/v8/src
/bin/sh -c /Users/andy/dart/dart/xcodebuild/d8.build/Debug_ia32/d8_js2c.build/Script-0CE341204FB41915C1FDC093.sh
=== BUILD AGGREGATE TARGET generate_corelib_impl_cc_file OF PROJECT dart-runtime WITH CONFIGURATION Debug_ia32 ===
=== BUILD NATIVE TARGET v8_base OF PROJECT v8 WITH CONFIGURATION Debug_ia32 ===
Check dependencies
Unsupported compiler ‘GCC 4.2′ selected for architecture ‘i386′
=== BUILD AGGREGATE TARGET js2c OF PROJECT v8 WITH CONFIGURATION Debug_ia32 ===
=== BUILD NATIVE TARGET libdart_vm OF PROJECT dart-runtime WITH CONFIGURATION Debug_ia32 ===
** BUILD FAILED **
The following build commands failed:
Check dependencies
(1 failure)
BUILD FAILED
Any ideas on how I can fix this?
Try to use 10.7 instead of 10.6 or ia32 arch
I changed it to 10.7 but still get a similar error:
xcodebuild -sdk macosx10.7 -project dart.xcodeproj -target All -parallelizeTargets -configuration Debug_x64 SYMROOT=/Users/andy/dart/dart/xcodebuild
Build settings from command line:
SDKROOT = macosx10.7
SYMROOT = /Users/andy/dart/dart/xcodebuild
2011-10-11 11:34:28.793 xcodebuild[17429:4203] error: Error Domain=NSPOSIXErrorDomain Code=2 “Non-zero exit code 127 returned from shell command: /Developer/usr/bin/gcc-4.2 -v -E -dM -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.7.sdk -x c++ -c /dev/null 2>&1″ UserInfo=0x40016ff00 {NSLocalizedDescription=Non-zero exit code 127 returned from shell command: /Developer/usr/bin/gcc-4.2 -v -E -dM -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.7.sdk -x c++ -c /dev/null 2>&1, NSLocalizedFailureReason=No such file or directory}
2011-10-11 11:34:28.794 xcodebuild[17429:4203] Warning: Couldn’t discover the ‘gcc-4.2′ compiler’s built-in search paths and preprocessor definitions for language dialect ‘c++’.
Compiler: /Developer/usr/bin/gcc-4.2
Reason: /Developer/usr/bin/gcc-4.2 -v -E -dM -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.7.sdk -x c++ -c /dev/null 2>&1
=== BUILD NATIVE TARGET libdart_vm OF PROJECT dart-runtime WITH CONFIGURATION Debug_x64 ===
Check dependencies
2011-10-11 11:34:28.926 xcodebuild[17429:4203] error: Error Domain=NSPOSIXErrorDomain Code=2 “Non-zero exit code 127 returned from shell command: /Developer/usr/bin/gcc-4.2 -v -E -dM -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.7.sdk -x c -c /dev/null 2>&1″ UserInfo=0x40278d540 {NSLocalizedDescription=Non-zero exit code 127 returned from shell command: /Developer/usr/bin/gcc-4.2 -v -E -dM -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.7.sdk -x c -c /dev/null 2>&1, NSLocalizedFailureReason=No such file or directory}
2011-10-11 11:34:28.926 xcodebuild[17429:4203] Warning: Couldn’t discover the ‘gcc-4.2′ compiler’s built-in search paths and preprocessor definitions for language dialect ‘c’.
Compiler: /Developer/usr/bin/gcc-4.2
Reason: /Developer/usr/bin/gcc-4.2 -v -E -dM -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.7.sdk -x c -c /dev/null 2>&1
Unsupported compiler ‘GCC 4.2′ selected for architecture ‘x86_64′
=== BUILD AGGREGATE TARGET d8_js2c OF PROJECT d8 WITH CONFIGURATION Debug_x64 ===
=== BUILD AGGREGATE TARGET generate_corelib_cc_file OF PROJECT dart-runtime WITH CONFIGURATION Debug_x64 ===
=== BUILD AGGREGATE TARGET closure_compiler OF PROJECT dart-compiler WITH CONFIGURATION Debug_x64 ===
=== BUILD AGGREGATE TARGET js2c OF PROJECT v8 WITH CONFIGURATION Debug_x64 ===
=== BUILD AGGREGATE TARGET generate_corelib_impl_cc_file OF PROJECT dart-runtime WITH CONFIGURATION Debug_x64 ===
=== BUILD NATIVE TARGET libjscre OF PROJECT dart-runtime WITH CONFIGURATION Debug_x64 ===
=== BUILD AGGREGATE TARGET generate_builtin_cc_file OF PROJECT dart-runtime WITH CONFIGURATION Debug_x64 ===
=== BUILD NATIVE TARGET libdart_api OF PROJECT dart-runtime WITH CONFIGURATION Debug_x64 ===
=== BUILD AGGREGATE TARGET generate_snapshot_test_dat_file OF PROJECT dart-runtime WITH CONFIGURATION Debug_x64 ===
=== BUILD NATIVE TARGET libdart_lib OF PROJECT dart-runtime WITH CONFIGURATION Debug_x64 ===
=== BUILD NATIVE TARGET libdart_builtin OF PROJECT dart-runtime WITH CONFIGURATION Debug_x64 ===
=== BUILD NATIVE TARGET v8_nosnapshot OF PROJECT v8 WITH CONFIGURATION Debug_x64 ===
=== BUILD NATIVE TARGET v8_base OF PROJECT v8 WITH CONFIGURATION Debug_x64 ===
Check dependencies
Unsupported compiler ‘GCC 4.2′ selected for architecture ‘x86_64′
** BUILD FAILED **
The following build commands failed:
Check dependencies
Check dependencies
(2 failures)
BUILD FAILED
Changing it to ia32 gives me the same error as above:
xcodebuild -sdk macosx10.7 -project dart.xcodeproj -target All -parallelizeTargets -configuration Debug_ia32 SYMROOT=/Users/andy/dart/dart/xcodebuild
Build settings from command line:
SDKROOT = macosx10.7
SYMROOT = /Users/andy/dart/dart/xcodebuild
2011-10-11 11:37:37.487 xcodebuild[17479:3903] error: Error Domain=NSPOSIXErrorDomain Code=2 “Non-zero exit code 127 returned from shell command: /Developer/usr/bin/gcc-4.2 -v -E -dM -arch i386 -isysroot /Developer/SDKs/MacOSX10.7.sdk -x c++ -c /dev/null 2>&1″ UserInfo=0x40191eee0 {NSLocalizedDescription=Non-zero exit code 127 returned from shell command: /Developer/usr/bin/gcc-4.2 -v -E -dM -arch i386 -isysroot /Developer/SDKs/MacOSX10.7.sdk -x c++ -c /dev/null 2>&1, NSLocalizedFailureReason=No such file or directory}
2011-10-11 11:37:37.488 xcodebuild[17479:3903] Warning: Couldn’t discover the ‘gcc-4.2′ compiler’s built-in search paths and preprocessor definitions for language dialect ‘c++’.
Compiler: /Developer/usr/bin/gcc-4.2
Reason: /Developer/usr/bin/gcc-4.2 -v -E -dM -arch i386 -isysroot /Developer/SDKs/MacOSX10.7.sdk -x c++ -c /dev/null 2>&1
2011-10-11 11:37:37.545 xcodebuild[17479:4007] error: Error Domain=NSPOSIXErrorDomain Code=2 “Non-zero exit code 127 returned from shell command: /Developer/usr/bin/gcc-4.2 -v -E -dM -arch i386 -isysroot /Developer/SDKs/MacOSX10.7.sdk -x c -c /dev/null 2>&1″ UserInfo=0x400b24f80 {NSLocalizedDescription=Non-zero exit code 127 returned from shell command: /Developer/usr/bin/gcc-4.2 -v -E -dM -arch i386 -isysroot /Developer/SDKs/MacOSX10.7.sdk -x c -c /dev/null 2>&1, NSLocalizedFailureReason=No such file or directory}
2011-10-11 11:37:37.546 xcodebuild[17479:4007] Warning: Couldn’t discover the ‘gcc-4.2′ compiler’s built-in search paths and preprocessor definitions for language dialect ‘c’.
Compiler: /Developer/usr/bin/gcc-4.2
Reason: /Developer/usr/bin/gcc-4.2 -v -E -dM -arch i386 -isysroot /Developer/SDKs/MacOSX10.7.sdk -x c -c /dev/null 2>&1
=== BUILD AGGREGATE TARGET d8_js2c OF PROJECT d8 WITH CONFIGURATION Debug_ia32 ===
Check dependencies
=== BUILD AGGREGATE TARGET js2c OF PROJECT v8 WITH CONFIGURATION Debug_ia32 ===
Check dependencies
PhaseScriptExecution “Action “js2c_experimental”" /Users/andy/dart/dart/xcodebuild/v8.build/Debug_ia32/js2c.build/Script-951434FB453799A2BBEC6349.sh
cd /Users/andy/dart/dart/third_party/v8/tools/gyp
/bin/sh -c /Users/andy/dart/dart/xcodebuild/v8.build/Debug_ia32/js2c.build/Script-951434FB453799A2BBEC6349.sh
=== BUILD AGGREGATE TARGET generate_corelib_impl_cc_file OF PROJECT dart-runtime WITH CONFIGURATION Debug_ia32 ===
=== BUILD AGGREGATE TARGET generate_corelib_cc_file OF PROJECT dart-runtime WITH CONFIGURATION Debug_ia32 ===
=== BUILD AGGREGATE TARGET generate_builtin_cc_file OF PROJECT dart-runtime WITH CONFIGURATION Debug_ia32 ===
=== BUILD AGGREGATE TARGET generate_snapshot_test_dat_file OF PROJECT dart-runtime WITH CONFIGURATION Debug_ia32 ===
=== BUILD NATIVE TARGET libjscre OF PROJECT dart-runtime WITH CONFIGURATION Debug_ia32 ===
Check dependencies
Unsupported compiler ‘GCC 4.2′ selected for architecture ‘i386′
=== BUILD NATIVE TARGET v8_base OF PROJECT v8 WITH CONFIGURATION Debug_ia32 ===
Check dependencies
Unsupported compiler ‘GCC 4.2′ selected for architecture ‘i386′
=== BUILD AGGREGATE TARGET closure_compiler OF PROJECT dart-compiler WITH CONFIGURATION Debug_ia32 ===
=== BUILD NATIVE TARGET libdart_vm OF PROJECT dart-runtime WITH CONFIGURATION Debug_ia32 ===
=== BUILD NATIVE TARGET libdart_api OF PROJECT dart-runtime WITH CONFIGURATION Debug_ia32 ===
=== BUILD NATIVE TARGET libdart_lib OF PROJECT dart-runtime WITH CONFIGURATION Debug_ia32 ===
=== BUILD NATIVE TARGET libdart_builtin OF PROJECT dart-runtime WITH CONFIGURATION Debug_ia32 ===
=== BUILD NATIVE TARGET v8_nosnapshot OF PROJECT v8 WITH CONFIGURATION Debug_ia32 ===
** BUILD FAILED **
The following build commands failed:
Check dependencies
Check dependencies
(2 failures)
BUILD FAILED
You my friend, are a genius. Thank you! Worked perfectly.
This didn’t work for me using “macosx10.6″ as the -sdk value. I had to use “macosx10.7″, which seems to be working fine. Thanks for the tips! I never would’ve figured out the issue and how to fix it.
I still have an error:
xcodebuild -sdk macosx10.6 -project dart.xcodeproj -target All -parallelizeTargets -configuration Debug_ia32 SYMROOT=/Users/fabrice/.dart/dart/xcodebuild
Build settings from command line:
SDKROOT = macosx10.6
SYMROOT = /Users/fabrice/.dart/dart/xcodebuild
=== BUILD AGGREGATE TARGET js2c OF PROJECT v8 WITH CONFIGURATION Debug_ia32 ===
Check dependencies
=== BUILD NATIVE TARGET v8_base OF PROJECT v8 WITH CONFIGURATION Debug_ia32 ===
Check dependencies
Unsupported compiler ‘GCC 4.2′ selected for architecture ‘i386′
=== BUILD AGGREGATE TARGET d8_js2c OF PROJECT d8 WITH CONFIGURATION Debug_ia32 ===
=== BUILD NATIVE TARGET v8_nosnapshot OF PROJECT v8 WITH CONFIGURATION Debug_ia32 ===
** BUILD FAILED **
The following build commands failed:
Check dependencies
(1 failure)
BUILD FAILED
Any ideas to fix it?
Thank’s
And 10.7 failed too?
Yep failed too
Hi,
When trying to build for the Mac I get the following. Any ideas?
Thanks
Command:
./tools/build.py xcodebuild –arch=x64
Output:
xcodebuild -sdk macosx10.6 -project dart.xcodeproj -target xcodebuild -parallelizeTargets -configuration Debug_x64 SYMROOT=/Users/morne7/Google/dart/xcodebuild
Build settings from command line:
SDKROOT = macosx10.6
SYMROOT = /Users/morne7/Google/dart/xcodebuild
xcodebuild: error: ‘dart.xcodeproj’ does not exist.
BUILD FAILED
You’ve checkout google dart using svn co. Just recheckout using gclient: http://code.google.com/p/dart/wiki/GettingTheSource
I did use gclient after struggling with svn co. Will try to do so again, might be that my directories are corrupt or incomplete.
Thanks
How about simply uploading the binaries and spare people the pain? I’ve followed your instructions and others and still fail to build…
Ok, let’s try:
http://dl.dropbox.com/u/44999582/dart-binaries.zip
It’s hard to find knowledgeable people on this topic, but you sound like you know what you’re talking about! Thank you for this article!
Best regards Alex
Yeah even after setting the SDK I still get a build failure, with 10.6 AND 10.7 (using Xcode 4.2)
michael:dart Developer$ ./tools/build.py –arch=x64
xcodebuild -sdk macosx10.7 -project dart.xcodeproj -target All -parallelizeTargets -configuration Debug_x64 SYMROOT=/Users/Developer/repositories/gclient/dart/xcodebuild
Build settings from command line:
SDKROOT = macosx10.7
SYMROOT = /Users/Developer/repositories/gclient/dart/xcodebuild
2011-10-15 22:59:25.734 xcodebuild[9461:3c03] error: Error Domain=NSPOSIXErrorDomain Code=2 “Non-zero exit code 127 returned from shell command: /Developer/usr/bin/gcc-4.2 -v -E -dM -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.7.sdk -x c++ -c /dev/null 2>&1″ UserInfo=0x4001cb0a0 {NSLocalizedDescription=Non-zero exit code 127 returned from shell command: /Developer/usr/bin/gcc-4.2 -v -E -dM -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.7.sdk -x c++ -c /dev/null 2>&1, NSLocalizedFailureReason=No such file or directory}
2011-10-15 22:59:25.736 xcodebuild[9461:3c03] Warning: Couldn’t discover the ‘gcc-4.2′ compiler’s built-in search paths and preprocessor definitions for language dialect ‘c++’.
Compiler: /Developer/usr/bin/gcc-4.2
Reason: /Developer/usr/bin/gcc-4.2 -v -E -dM -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.7.sdk -x c++ -c /dev/null 2>&1
2011-10-15 22:59:25.830 xcodebuild[9461:3c03] error: Error Domain=NSPOSIXErrorDomain Code=2 “Non-zero exit code 127 returned from shell command: /Developer/usr/bin/gcc-4.2 -v -E -dM -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.7.sdk -x c -c /dev/null 2>&1″ UserInfo=0x401633b20 {NSLocalizedDescription=Non-zero exit code 127 returned from shell command: /Developer/usr/bin/gcc-4.2 -v -E -dM -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.7.sdk -x c -c /dev/null 2>&1, NSLocalizedFailureReason=No such file or directory}
2011-10-15 22:59:25.837 xcodebuild[9461:3c03] Warning: Couldn’t discover the ‘gcc-4.2′ compiler’s built-in search paths and preprocessor definitions for language dialect ‘c’.
Compiler: /Developer/usr/bin/gcc-4.2
Reason: /Developer/usr/bin/gcc-4.2 -v -E -dM -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.7.sdk -x c -c /dev/null 2>&1
=== BUILD AGGREGATE TARGET js2c OF PROJECT v8 WITH CONFIGURATION Debug_x64 ===
Check dependencies
PhaseScriptExecution “Action “js2c”" /Users/Developer/repositories/gclient/dart/xcodebuild/v8.build/Debug_x64/js2c.build/Script-65883A0FF6CD34C4B88C9154.sh
cd /Users/Developer/repositories/gclient/dart/third_party/v8/tools/gyp
/bin/sh -c /Users/Developer/repositories/gclient/dart/xcodebuild/v8.build/Debug_x64/js2c.build/Script-65883A0FF6CD34C4B88C9154.sh
=== BUILD NATIVE TARGET v8_base OF PROJECT v8 WITH CONFIGURATION Debug_x64 ===
** BUILD FAILED **
And the same error with ia32?
For the “Unsupported compiler ‘GCC 4.2′ selected for architecture ‘x86_64′” error the solution is this:
http://vombat.tumblr.com/
I found that at least in my Lion I had to change the instructions on the link I posted to:
find . -name “*.pbxproj” -print -exec sed -ie ‘s/GCC_VERSION = 4.2/GCC_VERSION = “”/g’ {} ;
(had to use -ie and not -i with sed)
I got this error on my build, using OS X 10.7.2, any help appreciated:
** BUILD FAILED **
The following build commands failed:
PhaseScriptExecution “Action “build_dartc”" /Users/rjezuz/Software/dart/xcodebuild/dart-compiler.build/Debug_x64/dartc.build/Script-85526B89821EAEBE18292E1E.sh
(1 failure)
BUILD FAILED
I get a similar error to Jesus Guerrero:
=== BUILD AGGREGATE TARGET js2c OF PROJECT v8 WITH CONFIGURATION Debug_ia32 ===
** BUILD FAILED **
The following build commands failed:
Check dependencies
PhaseScriptExecution “Action “build_closure_compiler”" /Users/gedefar/workspace/dart/dart/xcodebuild/dart-compiler.build/Debug_ia32/closure_compiler.build/Script-83F146809089295397E58BF0.sh
(2 failures)
BUILD FAILED