[prev in list] [next in list] [prev in thread] [next in thread]
List: cfe-dev
Subject: Re: [cfe-dev] Trouble Using scan-build in Windows 7
From: Anton Yartsev <anton.yartsev () gmail ! com>
Date: 2013-06-28 20:48:42
Message-ID: 51CDF6AA.3050905 () Gmail ! com
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
On 28.06.2013 22:56, Anna Zaks wrote:
>
>
> On Jun 28, 2013, at 11:47 AM, Anton Yartsev <anton.yartsev@gmail.com
> <mailto:anton.yartsev@gmail.com>> wrote:
>
>> On 28.06.2013 21:28, Anna Zaks wrote:
>>> +<p>By default scan-build searches for clang executables in ./ or
>>> ./bin paths relative to itself.
>>> +Use --use-analyzer=[path to clang] option to explicitly provide
>>> path to your clang executables for scan-build:</p>
>>> +
>>> +<pre class="code_example">
>>> + scan-build <span
>>> class="code_highlight">--use-analyzer=</span>F:/llvm/Release+Asserts/bin/clang.exe
>>> make
>>> +</pre>
>>>
>>> This is applicable to all users, not only Windows. Is there a reason
>>> why Windows users would need this option more?
>>>
>>> If not, I'd recommend documenting it with other generic options.
>>> Usually, we do prefer users to use clang that comes with the
>>> installation. If this is mainly for users who modify the analyzer,
>>> maybe we should include it in the developer manual section.
>> Thanks for review!
>> Updated the patch with your remarks considered.
>> This documentation is for ordinary users, included the path to manual
>> build by force of habit. Now when --use-analyzer is added to the list
>> of generic options the example is removed.
>>
>> Also removed references to all perl ports except msys perl for now so
>> the documentation is actual.
>> Ok to commit?
>>
>
> Let's commit but only after the scan-build.bat is in.
Committed at r185199, scan-build.bat is already in.
>
> Thanks!
> Anna.
>>>
>>> Cheers,
>>> Anna.
>>>
>>> On Jun 28, 2013, at 9:44 AM, Anton Yartsev <anton.yartsev@gmail.com
>>> <mailto:anton.yartsev@gmail.com>> wrote:
>>>
>>>>> Anton,
>>>>>
>>>>> Maybe we should add a page describing what it takes to run
>>>>> scan-build on Windows to the static analyzer website?
>>>> Added "For Windows Users" section to scan-build.html, will become
>>>> actual after '[PATCH][analyzer][review request] scan-build port for
>>>> windows' patch gets in.
>>>> Could you please give a feedback on it? Mainly worry about syntax.
>>>>>
>>>>> Cheers,
>>>>> Anna.
>>>>> On Jun 17, 2013, at 9:34 PM, Anton Yartsev
>>>>> <anton.yartsev@gmail.com <mailto:anton.yartsev@gmail.com>> wrote:
>>>>>
>>>>>> On 18.06.2013 7:39, Lockhart, Jonathan (lockhaja) wrote:
>>>>>>> Anton,
>>>>>>>
>>>>>>> Well earlier today I uninstalled ActiveState perl for Strawberry
>>>>>>> perl and oddly enough I ran into the same error, "getpwuid
>>>>>>> function is unimplemented", which means that apparently it isn't
>>>>>>> just ActiveState perl that causes the problem.
>>>>>>>
>>>>>>> Now I am surprised to hear you are using MinGW and that all I
>>>>>>> need is the MinGW installation with MSYS. I have that already
>>>>>>> installed, as I needed it for Eclipse with the C project I am
>>>>>>> working on, and it is already in my path. I also have the latest
>>>>>>> version of both llvm and clang from the trunk. I also added
>>>>>>> scan-build to my path. With all that I am still hitting the
>>>>>>> error I emailed back today.
>>>>>>>
>>>>>>> Now I have not tried the example you provided so I will give
>>>>>>> that a shot and be sure to provide it the build folder for
>>>>>>> clang.exe and see if that takes care of the problem. Only other
>>>>>>> thing I can figure is that scan-build can't find MinGW on my
>>>>>>> path though it is there.
>>>>>>>
>>>>>>> I have also checked the MinGW\msys folder, and there is no perl
>>>>>>> in the bin folder.
>>>>>> Tried to install MinGW from the latest installer
>>>>>> mingw-get-inst-20120426.exe
>>>>>> (http://sourceforge.net/projects/mingw/files/)
>>>>>> Found out that "MinGW Developer Toolkit" component should be
>>>>>> selected during installation to have perl installed at
>>>>>> \MinGW\msys\1.0\bin\
>>>>>>
>>>>>>>
>>>>>>> Looks like I still got a bunch of problems left to figure out.
>>>>>>>
>>>>>>> Regards,
>>>>>>> Jon
>>>>>>>
>>>>>>> ------------------------------------------------------------------------
>>>>>>> *From:*Anton Yartsev [anton.yartsev@gmail.com]
>>>>>>> *Sent:*Monday, June 17, 2013 11:09 PM
>>>>>>> *To:*Lockhart, Jonathan (lockhaja)
>>>>>>> *Cc:*Jordan Rose; cfe-dev Developers
>>>>>>> *Subject:*Re: Trouble Using scan-build in Windows 7
>>>>>>>
>>>>>>> On 16.06.2013 20:36, Lockhart, Jonathan (lockhaja) wrote:
>>>>>>>> Anton and Jordon,
>>>>>>>>
>>>>>>>> So I got scan-build to fire off, and when I do it does another
>>>>>>>> command with perl -S in front of it. Now I did not have perl
>>>>>>>> originally install on my machine but since have gone and
>>>>>>>> grabbed a copy of perl and installed it. Now when I run the
>>>>>>>> scan-build command I get this error:
>>>>>>>>
>>>>>>>> C:\Users\lockhaja\llvm\tools\clang\tools\scan-build>perl -S
>>>>>>>> scan-build
>>>>>>>> The getpwuid function is unimplemented at scan-build line 35.
>>>>>>>>
>>>>>>>> Now Patrik on the LLVM list point out this article to me:
>>>>>>>> http://lists.cs.uiuc.edu/pipermail/cfe-dev/2010-April/008659.html
>>>>>>>>
>>>>>>>> I read through it and believe I may be using the ActiveState
>>>>>>>> perl which appears not to work with scan-build. This would mean
>>>>>>>> I would have to go grab another version. I am curious to know
>>>>>>>> if I would have to perform all this changes that were described
>>>>>>>> further in the digest, as I am on 7 not XP, and I would feel
>>>>>>>> that the Static Analyzer has progressed since 2010 and its
>>>>>>>> building on Windows.
>>>>>>>>
>>>>>>>> I would be very interested in knowing your set up Anton.
>>>>>>> Now I see that it was a good idea to try MinGW first :)
>>>>>>> I got the same error "getpwuid function is unimplemented" when
>>>>>>> tried to launch scan-build with ActiveState perl. Then I
>>>>>>> switched to perl from my MinGW+MSYS installation, and after
>>>>>>> little changes in scripts scan-build worked for me. I never
>>>>>>> tried to launch scan-build with Cygwin.
>>>>>>> Clang repository (http://llvm.org/svn/llvm-project/cfe/trunk)
>>>>>>> holds the changes, allowing to use scan-build with MinGW+MSYS,
>>>>>>> since the revision 180905.
>>>>>>>
>>>>>>> Theoretically all you should do to get scan-build work is:
>>>>>>> 1) install MinGW+MSYS, get scan-build
>>>>>>> fromhttp://llvm.org/svn/llvm-project/cfe/trunk
>>>>>>> 2) add the path to scan-build to your PATH environment variable
>>>>>>> 3) provide --use-analyzer=[Xcode|path to clang] option to scan-build
>>>>>>>
>>>>>>> Here is a random example of how I use scan-build:
>>>>>>> for configuring:
>>>>>>> scan-build -v -v -v -o "./"
>>>>>>> --use-analyzer=F:/llvm_COMMON/-Eclipse_build-/Release+Asserts/bin/clang.exe
>>>>>>> ../configure DISABLE_ASSERTIONS=1
>>>>>>>
>>>>>>> for making:
>>>>>>> scan-build -v -v -v -o "./"
>>>>>>> --use-analyzer=F:/llvm_COMMON/-Eclipse_build-/Release+Asserts/bin/clang.exe
>>>>>>> make DISABLE_ASSERTIONS=1
>>>>>>>
>>>>>>> -o "./" forces scan-build to put reports to the current folder
>>>>>>> DISABLE_ASSERTIONS=1 is a command passed to the configure/make,
>>>>>>> not scan-build
>>>>>>>
>>>>>>> Hope that helps.
>>>>>>>
>>>>>>>> Regards,
>>>>>>>> Jon
>>>>>>>>
>>>>>>>> ------------------------------------------------------------------------
>>>>>>>> *From:*Anton Yartsev [anton.yartsev@gmail.com]
>>>>>>>> *Sent:*Thursday, June 06, 2013 9:29 PM
>>>>>>>> *To:*Lockhart, Jonathan (lockhaja)
>>>>>>>> *Cc:*Jordan Rose; cfe-dev Developers
>>>>>>>> *Subject:*Re: Trouble Using scan-build in Windows 7
>>>>>>>>
>>>>>>>> On 07.06.2013 5:24, Anton Yartsev wrote:
>>>>>>>>> Hi Jonathan,
>>>>>>>>>
>>>>>>>>> To use the scan-build you should get the contents of
>>>>>>>>> clang\tools\scan-build from Clang sources as Jordan pointed out.
>>>>>>>>> Currently the scan-build script expects the clang executables
>>>>>>>>> (clang.exe and clang++.exe) to live in ./clang or ./bin/clang
>>>>>>>> mistake, ./ or ./bin
>>>>>>>>> directory relative to directory with the scan-build stuff but
>>>>>>>>> you can use the --use-analyzer=[Xcode|path to clang]
>>>>>>>>> scan-build option to tell scan-build where your clang
>>>>>>>>> executables live.
>>>>>>>>> The last thing you should do is to add the path to scan-build
>>>>>>>>> to your PATH and then you should be able to use scan-build as
>>>>>>>>> it described inhttp://clang-analyzer.llvm.org/scan-build.html.
>>>>>>>>> Hope I've not missed something.
>>>>>>>>> Feel free to ask and point to problems.
>>>>>>>>>
>>>>>>>>>> No, cfe-dev is the appropriate list for questions. (Or
>>>>>>>>>> cfe-users, but to be honest we analyzer folks don't follow
>>>>>>>>>> that list much and you probably wouldn't have gotten an
>>>>>>>>>> answer there!)
>>>>>>>>>>
>>>>>>>>>> scan-build is not installed with Clang or LLVM; I believe
>>>>>>>>>> when the analyzer project first began it wasn't clear if
>>>>>>>>>> everyone would want it as a part of their default install.
>>>>>>>>>> You can find the executables in tools\scan-build under your
>>>>>>>>>> Clang source directory (probably llvm\tools\clang.)
>>>>>>>>>>
>>>>>>>>>> I've CC'd Anton Yartsev, who I know has been running
>>>>>>>>>> scan-build on Windows for some time. (Not sure which version,
>>>>>>>>>> though.)
>>>>>>>>>> Jordan
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> On Jun 3, 2013, at 14:13 , "Lockhart, Jonathan (lockhaja)"
>>>>>>>>>> <lockhaja@mail.uc.edu <mailto:lockhaja@mail.uc.edu>> wrote:
>>>>>>>>>>
>>>>>>>>>>> Hello Clang Users and Developers,
>>>>>>>>>>>
>>>>>>>>>>> I apologize in advance if this is going to the wrong email
>>>>>>>>>>> list, but I thought it would be inappropriate to send it to
>>>>>>>>>>> the dev list.
>>>>>>>>>>>
>>>>>>>>>>> I am currently working on using Clang and LLVM in some
>>>>>>>>>>> research I am doing. More specifically at this time I am
>>>>>>>>>>> trying to use the Clang Static Analysis Tool. I have been
>>>>>>>>>>> able to follow the instructions on the Static Analysis Tool
>>>>>>>>>>> site as well as the LLVM page for compiling the code with
>>>>>>>>>>> Cmake for use with Visual Studio, and I have successfully
>>>>>>>>>>> built the system using "ALL_BUILD" as well as have testing
>>>>>>>>>>> successfully clang by build "clang-test" in visual studio.
>>>>>>>>>>>
>>>>>>>>>>> With that said I seem to be able to find the bin file from
>>>>>>>>>>> which all the material from the system was installed.
>>>>>>>>>>> Following the directions, I would believe it to be located
>>>>>>>>>>> in the \bin directory under build but it is not there. I
>>>>>>>>>>> have also search my llvm and build directories with no
>>>>>>>>>>> mention of scan-build being found via inspection or search.
>>>>>>>>>>>
>>>>>>>>>>> I was wondering if the instructions online were outdated and
>>>>>>>>>>> a newer process for running the Clang Static Analyzer was
>>>>>>>>>>> now used? Is the project even still active and worth me
>>>>>>>>>>> using in the development of my C programs? Is there now a
>>>>>>>>>>> way to use the tool from an IDE on the code you have
>>>>>>>>>>> written, such as through Eclipse or Visual Studio?
>>>>>>>>>>>
>>>>>>>>>>> These are the questions I currently have as I am stuck after
>>>>>>>>>>> building and testing via the instructions found
>>>>>>>>>>> here:http://clang.llvm.org/get_started.html#build. Any
>>>>>>>>>>> assistance would be most appreciative.
>>>>>>>>>>>
>>>>>>>>>>> Regards,
>>>>>>>>>>> Jon Lockhart
>>>>>>>>>>> PhD Candidate - EE Systems
>>>>>>>>>>> IEEE Vice President 13/14
>>>>>>>>>>> University of Cincinnati
>>>>>>>>>>> lockhaja@mail.uc.edu <mailto:lockhaja@mail.uc.edu>
>>>>>>>>>>> _______________________________________________
>>>>>>>>>>> cfe-commits mailing list
>>>>>>>>>>> cfe-commits@cs.uiuc.edu <mailto:cfe-commits@cs.uiuc.edu>
>>>>>>>>>>> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>> Anton
>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> Anton
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> Anton
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Anton
>>>>>> _______________________________________________
>>>>>> cfe-dev mailing list
>>>>>> cfe-dev@cs.uiuc.edu <mailto:cfe-dev@cs.uiuc.edu>
>>>>>> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>>>>>
>>>>
>>>>
>>>> --
>>>> Anton
>>>> <scan-build-win-users-html_v1.patch>
>>>
>>
>>
>> --
>> Anton
>> <scan-build-win-users-html_v2.patch>
>
--
Anton
[Attachment #5 (text/html)]
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">On 28.06.2013 22:56, Anna Zaks wrote:<br>
</div>
<blockquote
cite="mid:23B16C73-D8E0-4E09-86E2-67996FC46B8B@apple.com"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1">
<div><br>
</div>
<div><br>
</div>
<div>
<div>On Jun 28, 2013, at 11:47 AM, Anton Yartsev <<a
moz-do-not-send="true" \
href="mailto:anton.yartsev@gmail.com">anton.yartsev@gmail.com</a>> wrote:</div>
<br class="Apple-interchange-newline">
<blockquote type="cite">
<div text="#000000" bgcolor="#FFFFFF" style="letter-spacing:
normal; orphans: auto; text-align: start; text-indent: 0px;
text-transform: none; white-space: normal; widows: auto;
word-spacing: 0px; -webkit-text-stroke-width: 0px;">
<div class="moz-cite-prefix">On 28.06.2013 21:28, Anna Zaks
wrote:<br>
</div>
<blockquote
cite="mid:1ED5E359-610D-4E68-BA36-C51250B0CBD8@apple.com"
type="cite">
<div>+<p>By default scan-build searches for clang
executables in ./ or ./bin paths relative to itself.</div>
<div>+Use --use-analyzer=[path to clang] option to
explicitly provide path to your clang executables for
scan-build:</p></div>
<div>+</div>
<div>+<pre class="code_example"></div>
<div>+ scan-build <span
class="code_highlight">--use-analyzer=</span>F:/llvm/Release+Asserts/bin/clang.exe
make</div>
<div>+</pre></div>
<div><br>
</div>
<div>This is applicable to all users, not only Windows. Is
there a reason why Windows users would need this option
more?</div>
<div><br>
</div>
<div>If not, I'd recommend documenting it with other
generic options. Usually, we do prefer users to use
clang that comes with the installation. If this is
mainly for users who modify the analyzer, maybe we
should include it in the developer manual section.</div>
</blockquote>
Thanks for review!<br>
Updated the patch with your remarks considered.<br>
This documentation is for ordinary users, included the path
to manual build by force of habit. Now when --use-analyzer
is added to the list of generic options the example is
removed.<br>
<br>
Also removed references to all perl ports except msys perl
for now so the documentation is actual.<br>
Ok to commit?<br>
<br>
</div>
</blockquote>
<div><br>
</div>
Let's commit but only after the scan-build.bat is in.</div>
</blockquote>
Committed at r185199, scan-build.bat is already in.<br>
<br>
<blockquote
cite="mid:23B16C73-D8E0-4E09-86E2-67996FC46B8B@apple.com"
type="cite">
<div><br>
</div>
<div>Thanks!</div>
<div>Anna.<br>
<blockquote type="cite">
<div text="#000000" bgcolor="#FFFFFF" style="letter-spacing:
normal; orphans: auto; text-align: start; text-indent: 0px;
text-transform: none; white-space: normal; widows: auto;
word-spacing: 0px; -webkit-text-stroke-width: 0px;">
<blockquote
cite="mid:1ED5E359-610D-4E68-BA36-C51250B0CBD8@apple.com"
type="cite">
<div><br>
</div>
<div>Cheers,</div>
<div>Anna.</div>
<div><br>
</div>
<div>
<div>On Jun 28, 2013, at 9:44 AM, Anton Yartsev <<a
moz-do-not-send="true"
href="mailto:anton.yartsev@gmail.com">anton.yartsev@gmail.com</a>>
wrote:</div>
<br class="Apple-interchange-newline">
<blockquote type="cite">
<div text="#000000" bgcolor="#FFFFFF"
style="letter-spacing: normal; orphans: auto;
text-align: start; text-indent: 0px; text-transform:
none; white-space: normal; widows: auto;
word-spacing: 0px; -webkit-text-stroke-width: 0px;">
<blockquote
cite="mid:D9853404-97FA-40DB-9BAE-BC0BCEAA3522@apple.com"
type="cite">Anton,
<div><br>
</div>
<div>Maybe we should add a page describing what it
takes to run scan-build on Windows to the static
analyzer website?</div>
</blockquote>
Added "For Windows Users" section to
scan-build.html, will become actual after
'[PATCH][analyzer][review request] scan-build port
for windows' patch gets in.<br>
Could you please give a feedback on it? Mainly worry
about syntax.<br>
<blockquote
cite="mid:D9853404-97FA-40DB-9BAE-BC0BCEAA3522@apple.com"
type="cite">
<div><br>
</div>
<div>Cheers,</div>
<div>Anna.<br>
<div>
<div>On Jun 17, 2013, at 9:34 PM, Anton
Yartsev <<a moz-do-not-send="true"
\
href="mailto:anton.yartsev@gmail.com">anton.yartsev@gmail.com</a>> wrote:</div>
<br class="Apple-interchange-newline">
<blockquote type="cite">
<div text="#000000" bgcolor="#FFFFFF"
style="direction: ltr; font-family:
Tahoma; font-size: 10pt; letter-spacing:
normal; orphans: auto; text-align: start;
text-indent: 0px; text-transform: none;
white-space: normal; widows: auto;
word-spacing: 0px;
-webkit-text-stroke-width: 0px;">
<div class="moz-cite-prefix">On 18.06.2013
7:39, Lockhart, Jonathan (lockhaja)
wrote:<br>
</div>
<blockquote
cite="mid:458E5DAEBA967A4787E9382B33ADA1FF283BB1BE@BL2PRD0111MB485.prod.exchangelabs.com"
type="cite">
<div style="direction: ltr; font-family:
Tahoma; font-size: 10pt;">Anton,<br>
<br>
Well earlier today I uninstalled
ActiveState perl for Strawberry perl
and oddly enough I ran into the same
error, "getpwuid function is
unimplemented", which means that
apparently it isn't just ActiveState
perl that causes the problem.<br>
<br>
Now I am surprised to hear you are
using MinGW and that all I need is the
MinGW installation with MSYS. I have
that already installed, as I needed it
for Eclipse with the C project I am
working on, and it is already in my
path. I also have the latest version
of both llvm and clang from the trunk.
I also added scan-build to my path.
With all that I am still hitting the
error I emailed back today.<br>
<br>
Now I have not tried the example you
provided so I will give that a shot
and be sure to provide it the build
folder for clang.exe and see if that
takes care of the problem. Only other
thing I can figure is that scan-build
can't find MinGW on my path though it
is there.<br>
<br>
I have also checked the MinGW\msys
folder, and there is no perl in the
bin folder.<br>
</div>
</blockquote>
Tried to install MinGW from the latest
installer mingw-get-inst-20120426.exe (<a
moz-do-not-send="true"
class="moz-txt-link-freetext"
\
href="http://sourceforge.net/projects/mingw/files/">http://sourceforge.net/projects/mingw/files/</a>)<br>
Found out that "MinGW Developer Toolkit"
component should be selected during
installation to have perl installed at
\MinGW\msys\1.0\bin\<br>
<br>
<blockquote
cite="mid:458E5DAEBA967A4787E9382B33ADA1FF283BB1BE@BL2PRD0111MB485.prod.exchangelabs.com"
type="cite">
<div style="direction: ltr; font-family:
Tahoma; font-size: 10pt;"><br>
Looks like I still got a bunch of
problems left to figure out.<br>
<br>
Regards,<br>
Jon<br>
<br>
<div style="font-family: 'Times New
Roman'; font-size: 16px;">
<hr tabindex="-1">
<div id="divRpF449692"
style="direction: ltr;"><font
size="2" face="Tahoma"><b>From:</b><span
\
class="Apple-converted-space"> </span>Anton Yartsev [<a
moz-do-not-send="true"
class="moz-txt-link-abbreviated"
href="mailto:anton.yartsev@gmail.com">anton.yartsev@gmail.com</a>]<br>
<b>Sent:</b><span
\
class="Apple-converted-space"> </span>Monday, June 17, 2013 11:09 PM<br>
<b>To:</b><span
\
class="Apple-converted-space"> </span>Lockhart, Jonathan (lockhaja)<br>
<b>Cc:</b><span
\
class="Apple-converted-space"> </span>Jordan Rose; cfe-dev Developers<br>
<b>Subject:</b><span
\
class="Apple-converted-space"> </span>Re: Trouble Using scan-build in
Windows 7<br>
</font><br>
</div>
<div>
<div class="moz-cite-prefix">On
16.06.2013 20:36, Lockhart,
Jonathan (lockhaja) wrote:<br>
</div>
<blockquote type="cite">
<div style="direction: ltr;
font-family: Tahoma;
font-size: 10pt;">Anton and
Jordon,<br>
<br>
So I got scan-build to fire
off, and when I do it does
another command with perl -S
in front of it. Now I did not
have perl originally install
on my machine but since have
gone and grabbed a copy of
perl and installed it. Now
when I run the scan-build
command I get this error:<br>
<br>
<font size="2" face="Tahoma"><span
dir="ltr"
style="font-size: \
10pt;">C:\Users\lockhaja\llvm\tools\clang\tools\scan-build>perl
-S scan-build<br>
The getpwuid function is
unimplemented at
scan-build line 35.<br>
<br>
Now Patrik on the LLVM
list point out this
article to me:<span
\
class="Apple-converted-space"> </span></span></font><br> <a \
moz-do-not-send="true"
\
href="http://lists.cs.uiuc.edu/pipermail/cfe-dev/2010-April/008659.html"
\
target="_blank">http://lists.cs.uiuc.edu/pipermail/cfe-dev/2010-April/008659.html</a><br>
<br>
I read through it and believe
I may be using the ActiveState
perl which appears not to work
with scan-build. This would
mean I would have to go grab
another version. I am curious
to know if I would have to
perform all this changes that
were described further in the
digest, as I am on 7 not XP,
and I would feel that the
Static Analyzer has progressed
since 2010 and its building on
Windows.<br>
<br>
I would be very interested in
knowing your set up Anton.<br>
</div>
</blockquote>
Now I see that it was a good idea
to try MinGW first :)<br>
I got the same error "getpwuid
function is unimplemented" when
tried to launch scan-build with
ActiveState perl. Then I switched
to perl from my MinGW+MSYS
installation, and after little
changes in scripts scan-build
worked for me. I never tried to
launch scan-build with Cygwin.<span
\
class="Apple-converted-space"> </span><br> Clang repository (<a
moz-do-not-send="true"
class="moz-txt-link-freetext"
\
href="http://llvm.org/svn/llvm-project/cfe/trunk"
\
target="_blank">http://llvm.org/svn/llvm-project/cfe/trunk</a>) holds the changes, \
allowing to use scan-build with MinGW+MSYS, since
the revision 180905.<br>
<br>
Theoretically all you should do to
get scan-build work is:<br>
1) install MinGW+MSYS, get
scan-build from<span
class="Apple-converted-space"> </span><a
moz-do-not-send="true"
class="moz-txt-link-freetext"
\
href="http://llvm.org/svn/llvm-project/cfe/trunk"
\
target="_blank">http://llvm.org/svn/llvm-project/cfe/trunk</a><br> 2) add the path \
to scan-build to your PATH environment variable<br>
3) provide
--use-analyzer=[Xcode|path to
clang] option to scan-build<br>
<br>
Here is a random example of how I
use scan-build:<br>
for configuring:<br>
scan-build -v -v -v -o "./"
\
--use-analyzer=F:/llvm_COMMON/-Eclipse_build-/Release+Asserts/bin/clang.exe
../configure DISABLE_ASSERTIONS=1<br>
<br>
for making:<br>
scan-build -v -v -v -o "./"
\
--use-analyzer=F:/llvm_COMMON/-Eclipse_build-/Release+Asserts/bin/clang.exe make \
DISABLE_ASSERTIONS=1<br> <br>
-o "./" forces scan-build to put
reports to the current folder<br>
DISABLE_ASSERTIONS=1 is a command
passed to the configure/make, not
scan-build<br>
<br>
Hope that helps.<br>
<br>
<blockquote type="cite">
<div style="direction: ltr;
font-family: Tahoma;
font-size: 10pt;">Regards,<br>
Jon<br>
<br>
<div>
<hr tabindex="-1">
<div id="divRpF999390"
style="direction: ltr;"><font
size="2" \
face="Tahoma"><b>From:</b><span class="Apple-converted-space"> </span>Anton \
Yartsev [<a moz-do-not-send="true"
class="moz-txt-link-abbreviated" href="mailto:anton.yartsev@gmail.com"
\
target="_blank">anton.yartsev@gmail.com</a>]<br> <b>Sent:</b><span
\
class="Apple-converted-space"> </span>Thursday, June 06, 2013 9:29 PM<br>
<b>To:</b><span
\
class="Apple-converted-space"> </span>Lockhart, Jonathan (lockhaja)<br>
<b>Cc:</b><span
\
class="Apple-converted-space"> </span>Jordan
Rose; cfe-dev Developers<br>
<b>Subject:</b><span
\
class="Apple-converted-space"> </span>Re: Trouble Using scan-build
in Windows 7<br>
</font><br>
</div>
<div>
<div
class="moz-cite-prefix">On
07.06.2013 5:24, Anton
Yartsev wrote:<br>
</div>
<blockquote type="cite">
<div
class="moz-cite-prefix">Hi
Jonathan,<br>
<br>
To use the scan-build
you should get the
contents of
clang\tools\scan-build
from Clang sources as
Jordan pointed out.<br>
Currently the
scan-build script
expects the clang
executables (clang.exe
and clang++.exe) to
live in ./clang or
./bin/clang</div>
</blockquote>
mistake, ./ or ./bin<br>
<blockquote type="cite">
<div
class="moz-cite-prefix">directory
relative to directory
with the scan-build
stuff but you can use
the
--use-analyzer=[Xcode|path
to clang] scan-build
option to tell
scan-build where your
clang executables
live.<br>
The last thing you
should do is to add
the path to scan-build
to your PATH and then
you should be able to
use scan-build as it
described in<span
\
class="Apple-converted-space"> </span><a moz-do-not-send="true" \
class="moz-txt-link-freetext"
\
href="http://clang-analyzer.llvm.org/scan-build.html"
\
target="_blank">http://clang-analyzer.llvm.org/scan-build.html</a>.<br> Hope I've \
not missed something.<br>
Feel free to ask and
point to problems.<br>
<br>
</div>
<blockquote type="cite">
<div>No, cfe-dev is
the appropriate list
for questions. (Or
cfe-users, but to be
honest we analyzer
folks don't follow
that list much and
you probably
wouldn't have gotten
an answer there!)</div>
<div><br>
</div>
<div>scan-build is not
installed with Clang
or LLVM; I believe
when the analyzer
project first began
it wasn't clear if
everyone would want
it as a part of
their default
install. You can
find the executables
in tools\scan-build
under your Clang
source directory
(probably
llvm\tools\clang.)</div>
<div><br>
</div>
<div>I've CC'd Anton
Yartsev, who I know
has been running
scan-build on
Windows for some
time. (Not sure
which version,
though.)</div>
<div>Jordan</div>
<div><br>
</div>
<br>
<div>
<div>On Jun 3, 2013,
at 14:13 ,
"Lockhart,
Jonathan
(lockhaja)" <<a
moz-do-not-send="true" href="mailto:lockhaja@mail.uc.edu"
\
target="_blank">lockhaja@mail.uc.edu</a>> wrote:</div>
<br
\
class="Apple-interchange-newline"> <blockquote
type="cite">
<div
style="font-family:
Helvetica;
font-size: 13px;
font-style:
normal;
font-variant:
normal;
font-weight:
normal;
letter-spacing:
normal;
line-height:
normal; orphans:
2; text-indent:
0px;
text-transform:
none;
white-space:
normal; widows:
2; word-spacing:
0px;">
<div
style="direction:
ltr;
font-family:
Tahoma;
font-size:
10pt;">Hello
Clang Users
and
Developers,<br>
<br>
I apologize in
advance if
this is going
to the wrong
email list,
but I thought
it would be
inappropriate
to send it to
the dev list.<span
class="Apple-converted-space"> </span><br>
<br>
I am currently
working on
using Clang
and LLVM in
some research
I am doing.
More
specifically
at this time I
am trying to
use the Clang
Static
Analysis Tool.
I have been
able to follow
the
instructions
on the Static
Analysis Tool
site as well
as the LLVM
page for
compiling the
code with
Cmake for use
with Visual
Studio, and I
have
successfully
built the
system using
"ALL_BUILD" as
well as have
testing
successfully
clang by build
"clang-test"
in visual
studio.<span
\
class="Apple-converted-space"> </span><br> <br>
With that said
I seem to be
able to find
the bin file
from which all
the material
from the
system was
installed.
Following the
directions, I
would believe
it to be
located in the
\bin directory
under build
but it is not
there. I have
also search my
llvm and build
directories
with no
mention of
scan-build
being found
via inspection
or search.<span
class="Apple-converted-space"> </span><br>
<br>
I was
wondering if
the
instructions
online were
outdated and a
newer process
for running
the Clang
Static
Analyzer was
now used? Is
the project
even still
active and
worth me using
in the
development of
my C programs?
Is there now a
way to use the
tool from an
IDE on the
code you have
written, such
as through
Eclipse or
Visual Studio?<br>
<br>
These are the
questions I
currently have
as I am stuck
after building
and testing
via the
instructions
found here:<a
moz-do-not-send="true"
\
href="http://clang.llvm.org/get_started.html#build" \
target="_blank">http://clang.llvm.org/get_started.html#build</a>. Any assistance
would be most
appreciative.<br>
<br>
<div>Regards,<br>
<div
style="font-family:
Tahoma;
font-size:
13px;">
<div
style="font-family:
Tahoma;
font-size:
13px;">
<div
style="font-family:
Tahoma;
font-size:
13px;">Jon
Lockhart<br>
PhD Candidate
- EE Systems<br>
IEEE Vice
President
13/14<br>
University of
Cincinnati<br>
<a
moz-do-not-send="true"
href="mailto:lockhaja@mail.uc.edu" target="_blank">lockhaja@mail.uc.edu</a></div>
</div>
</div>
</div>
</div>
_______________________________________________<br>
cfe-commits
mailing list<br>
<a
moz-do-not-send="true"
href="mailto:cfe-commits@cs.uiuc.edu" target="_blank">cfe-commits@cs.uiuc.edu</a><br>
<a
moz-do-not-send="true"
href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits"
\
target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits</a><br> </div>
</blockquote>
</div>
<br>
</blockquote>
<br>
<br>
<pre class="moz-signature" \
cols="72">-- Anton</pre>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">-- \
Anton</pre>
</div>
</div>
</div>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">--
Anton</pre>
</div>
</div>
</div>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">--
Anton</pre>
_______________________________________________<br>
cfe-dev mailing list<br>
<a moz-do-not-send="true"
\
href="mailto:cfe-dev@cs.uiuc.edu">cfe-dev@cs.uiuc.edu</a><br> <a \
moz-do-not-send="true"
\
href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a><br>
</div>
</blockquote>
</div>
<br>
</div>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">--
Anton</pre>
<span><scan-build-win-users-html_v1.patch></span></div>
</blockquote>
</div>
<br>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">--
Anton</pre>
<span><scan-build-win-users-html_v2.patch></span></div>
</blockquote>
</div>
<br>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">--
Anton</pre>
</body>
</html>
_______________________________________________
cfe-dev mailing list
cfe-dev@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic