<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<blockquote
cite="mid:D9853404-97FA-40DB-9BAE-BC0BCEAA3522@apple.com"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1">
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>
<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 style="font-family: 'Times New Roman';
font-size: 16px;">
<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>
</div>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">--
Anton</pre>
</body>
</html>