3

I am evaluating the use of clang scan-build as one of my build steps in my Jenkins iOS build job. I first tried running the scan-build on command line using the following command

../clang-scan/scan-build -k -v -v -o "/Users/admin/clangScanBuildReports" -v xcodebuild -workspace AppsWorkspace.xcworkspace -scheme testapp -configuration Debug -arch i386 -sdk iphonesimulator clean build

The above command works fine, however, when I try to use the architecture as armv6 or armv7, it gives me the following error: Check dependencies [BEROR]No architectures to compile for (ARCHS=armv6, VALID_ARCHS=i386).

Wanted to confirm if clang static analyzer can't be executed on armv6 or armv7 architectures, can it only be executed for i386?

Thanks, Asheesh

ash1977
  • 187
  • 1
  • 4
  • 12
  • I'm also receiving a build failure while running the command above. ld: file not found: /usr/lib/arc/libarclite_iphonesimulator.a. Am I missing out on setting anything in the command above? Any help would be appreciated in this regard. Thanks, Asheesh – ash1977 Jun 12 '12 at 19:19
  • me2, but you command works fine. – user392412 Aug 03 '12 at 13:52

4 Answers4

4

4Not sure why, but creating a symlink of /usr/lib/arc/libarclite_iphonesimulator.a to /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/arc/libarclite_iphonesimulator.a fixed our builds for us.

(Xcode 4.4.1, checker-267, OSX 10.7.4)

lottadot
  • 367
  • 3
  • 7
  • 1
    Fixed with : ln -s /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/arc/libarclite_iphonesimulator.a /usr/lib/arc/libarclite_iphonesimulator.a – ıɾuǝʞ Aug 24 '12 at 08:05
  • It worked for until I copied the binary from **/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/u‌​sr/lib/arc/libarclite_iphonesimulator.a** to **/usr/lib/arc/libarclite_iphonesimulator.a** don't now why the soft link didn't work – David H. Mar 26 '13 at 22:19
0

In you xcode target build settings, just make sure the "Build Active Architecture Only" for your Debug build is set to No.

0

All,

We have also faced the same issue, and found the appropriate simulator is missing in Mountain Lion. Once we installed the simulator, it worked fine without any issues.

Dwarak
  • 1
0

That is true when your -sdk is iphonesimulator.

For 'arm' arch you need to specify -sdk as iphoneos6.1 or whichever you want to build against.

to see list of sdks execute below command in terminal.

xcodebuild -showsdks

Hope this helps someone.

Saran
  • 6,274
  • 3
  • 39
  • 48