Clang Static Analyzer for xcode for dummies - xcode

Could somebody please help me get Clang up and running? (I don't have 3.2)
I've followed numerous tutorials (basically every link off of this page Using Clang Static Analyzer from within XCode) but I just cant get it to work!
The only thing I've managed to do successfully so far is download clang! Grrrr .... dubbeat smash!
Bear in mind I've never written an apple script before.
I have clang on my desktop

The easiest way is to just update to Xcode 3.2.1 - using clang then becomes a no-brainer - nothing to install or configure - just set the compiler to Clang LLVM 1.0 in the project settings.

I don't user the Clang Static Analyzer but there's a built in static analysis in XCode 3.2:
http://developer.apple.com/mac/library/featuredarticles/StaticAnalysis/index.html

Either use the version bundled in XCode, or download a newer version at https://clang-analyzer.llvm.org/ then see some additional instructions at https://clang-analyzer.llvm.org/xcode.html to switch XCode to that downloaded version.
The question you've linked is quite old and the information is out-of-date, I would not refer to it much, any more.

Related

GCC support for cortex-a55

Can someone please let me know which version of GCC onwards has the support for cortex-a55 as the mtune/mcpu option?
Below is the link mentioning the support has been added, however am unable to correlate which is the exact GNU version this support had been added first. Link for the commit below:-
https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=0bf57487e7aeb4794d513e9d124c75cc707c65c7&utm_source=anzwix
Try to map to a version like this for eg:- gcc-linaro-aarch64-linux-gnu-4.9-2014.06-02_linux
Thanks in advance.
---- Merged query ----
How to find version related to a particular GCC commit?
Eg:- https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=0bf57487e7aeb4794d513e9d124c75cc707c65c7&utm_source=anzwix
GCC 8.1 is the first release that added support for it.
It's in the release notes https://gcc.gnu.org/gcc-8/changes.html#aarch64

Using Apple's coding examples in XCode 4.3.2 - Base SDK Missing

I'm discovering XCode and iOS development.
Delving into the iOS documentation, I've tried to download and run some of the programming examples.
As an example, I'll use AccelerometerGraph.
If I download the code and try to compile, i get an error message, and I realize that the Navigation panel tells me : Base SDK Missing.
After fiddling around (the existing answers on stackoverflow refer to the Xcode 3.2 answer, which doesn't work) I figured I should go to "Editor > Validate Settings…" and accept the changes.
It "seems" to work, (as in the "Missing SDK" message disappears, and I can compile) but I'm wondering if i'm missing something more fundamental.
Also, I thought if there is such a fundamental change, it would be useful to have it up there in one of the questions.
Thx
P.
Go to the project settings and choose "Latest SDK" for the SDK option and that should fix your projects.
And if you want to be super helpful, file a bug with Apple (at http://bugreporter.apple.com) and tell them to update these outdated sample projects to use the latest SDK's if possible.
Not missing something more fundamental. Apple's sample projects have a variety of vintages. Mostly they compile and link under the current versions of Xcode and friends. Some need to be brought up to date. What you found was one that was originally set up for an obsolete version of the SDK and it compiles and links fine with one that was automagically found on your system when you updated it.

how to Install glibc 2.3.2 on Gentoo?

I'm wrote an application and I need to execute it on Gentoo,
but when I try run it, I get the following message:
/lib/libc.so.6: version `GLIBC_2.3.4' not found (required by /usr/local/myapp/lib/myapplib.so.1)
the current GLIBC version in this gentoo is 2.3.2.
I can't update this glibc, because I don't have permission, so I need to 'downgrade'
my glibc to the same version (2.3.2) ... how can I do it?
tks,
The "/lib/libc.so.6: version `GLIBC_2.3.4' not found" problem comes from trying to run a binary compiled against a newer glibc on a system with an old version of glibc. Downgrading glibc is strongly discouraged for this reason.
Since you say you wrote the application, it seems to me that the simplest solution is to recompile the application on the system where you plan to run it.
I'm actually wrestling with the same issue, so maybe I have some information that can help.
In short, your binary was compiled to look for libc.so.6. GLIBC_2.3.4 is in libc.so.5. As far as I know, if you downgrade your glibc on your dev machine some of your other programs may not work properly (because they were compiled to look for the current version). Somehow CentOS/RHEL have a compat-glibc package that can live along side of a current glibc without causing this error. If your dev box uses CentOS/RHEL, install that package/recompile and you should be good to go. You may need to use an older compiler for it to look for the older library. If you're not developing on CentOS/RHEL, continue on.
My plan of attack today is to compile glibc from source. This means using a compiler that was released around the same time as the older version of glibc. You may run into some stumbling blocks (such as needing an older version of buildutils, etc.), but my hope is once the libc.so.5 is compiled and installed into /usr/local/lib my application will find that before it finds libc.so.6 in /lib.
So there it is. It's not for the faint of heart, and it's definitely not a quick solution. Today I plan on testing this out, so I can't really say it's the right solution. Please, hivemind.. if I'm flat-out wrong correct me and save this poor soul from this winding torturous road :-)
EDIT: link to glibc sources

I don’t see the Buid and Analyze option in my Build Option in Xcode

I am trying to use the Clang static analyzer in my code. I installed it and can run it succesfully from the terminal. But I wanted see it locally on the code not on Safari. The resort [sic] is to activate Build And Analyze in Build Options, which I dont see at all. Help me with this. Any clear step by step procedure for Clang's installation?
You are probably using Xcode 3.1.x and reading documentation for Xcode 3.2. In the earlier version you had to download Clang, run it from the command line, and view the results as HTML. In Xcode 3.2 it's all built-in and you choose Build and Analyze from the Build menu. If you don't see that menu item, you're probably using the earlier version of Xcode.
Xcode 3.2 only runs on Mac OS X 10.6 Snow Leopard, by the way, and requires an Intel-based Mac.

XCode and CUDA integration

Was just wondering if anyone has any experience working with CUDA and XCode? I'm having a nightmare setting it all up...
Dawson
I'm working with XCode, CMAKE & CUDA. No problems so far! Works like a charm, though you'll need to make sure, that XCode is using the gcc 4.0 instead of 4.2 (in case of 10.6).
I suggest you to also use CMAKE in combination with FindCUDA.cmake for generating the xcode project file. FindCUDA.cmake is here
There is also a plugin for XCode, making it recognize .cu files, found here in message #29. Also a good "tutorial" is given here, mentioning the plugin.

Resources