Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
359 views
in Technique[技术] by (71.8m points)

iphone - llvm-gcc-4.2: error

The Project build & runs fine on a real device but a build for the iphone simulator finishes in this error 'llvm-gcc-4.2: error'. Any ideas?

llvm-gcc-4.2: error trying to exec '/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/../llvm-gcc-4.2/bin/arm-apple-darwin10-llvm-gcc-4.2': execvp: No such file or directory 
Command /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/llvm-gcc-4.2 failed with exit code 255

thx, Fabian

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

### XCode < 4.3.2 ###

After updating XCode from 4.2 to 4.3, I had exactly the same issue with lots of "unrelated" errors:

make[1]: /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2: No such file or directory

Including a Command /Developer/usr/bin/clang failed with exit code 1 error.

I fixed that with:

cd /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin
ln -s llvm-gcc-4.2 gcc-4.2

### XCode >= 4.3.2 < 5.0 ###

After updating XCode to 4.3.2 and since it's now an App (not in /Developer anymore). Need to do these steps for both the simulator and the iOS device:

Fix the issue on the simulator:

cd /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin
ln -s ../llvm-gcc-4.2/bin/llvm-gcc-4.2 gcc
ln -s ../llvm-gcc-4.2/bin/llvm-gcc-4.2 gcc-4.2

Fix the issue on iOS devices:

cd /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin
ln -s ../llvm-gcc-4.2/bin/llvm-gcc-4.2 gcc
ln -s ../llvm-gcc-4.2/bin/llvm-gcc-4.2 gcc-4.2

### XCode >= 5.0 ### (11/03/2014)

Fix the issue on the simulator:

cd /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin
ln -s /usr/bin/llvm-gcc gcc-4.2

Fix the issue on iOS devices:

cd /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin
ln -s /usr/bin/llvm-gcc gcc-4.2

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...