* help for using sparse
@ 2010-06-09 15:09 bonneta
2010-06-09 16:00 ` Christopher Li
` (3 more replies)
0 siblings, 4 replies; 7+ messages in thread
From: bonneta @ 2010-06-09 15:09 UTC (permalink / raw)
To: linux-sparse
Hello,
I am working on git, and i would like to apply sparse on its source code.
I've downloaded the source of sparse from its git repository, and compiled
it successfully.
I've read the little documentation furnished with the code, but i didn't
manage to apply sparse on the sources of git.
I've basically tried "sparse file.c", but it always returns with an error
like :
"git-compat-util.h:140:11: error: unable to open 'openssl/ssl.h'"
or
"builtin/blame.c:7:10: error: unable to open 'cache.h'"
I don't know how to resolve it...
Axel
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: help for using sparse
2010-06-09 15:09 help for using sparse bonneta
@ 2010-06-09 16:00 ` Christopher Li
2010-06-09 16:01 ` Dan Carpenter
` (2 subsequent siblings)
3 siblings, 0 replies; 7+ messages in thread
From: Christopher Li @ 2010-06-09 16:00 UTC (permalink / raw)
To: bonneta; +Cc: linux-sparse
On Wed, Jun 9, 2010 at 8:09 AM, bonneta <bonneta@ensimag.fr> wrote:
> I've basically tried "sparse file.c", but it always returns with an error
> like :
> "git-compat-util.h:140:11: error: unable to open 'openssl/ssl.h'"
> or
> "builtin/blame.c:7:10: error: unable to open 'cache.h'"
>
> I don't know how to resolve it...
You need to tell sparse where is your openssl/ssl.h.
BTW, can you compile file.c using git's make system?
You can try to copy the file searching path to sparse.
Another thing to try is using the cgcc. Cgcc is a wrapper
script that try to behave like gcc + sparse check.
Chris
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: help for using sparse
2010-06-09 15:09 help for using sparse bonneta
2010-06-09 16:00 ` Christopher Li
@ 2010-06-09 16:01 ` Dan Carpenter
2010-06-09 16:10 ` Josh Triplett
2010-06-09 18:48 ` Sam Ravnborg
3 siblings, 0 replies; 7+ messages in thread
From: Dan Carpenter @ 2010-06-09 16:01 UTC (permalink / raw)
To: bonneta; +Cc: linux-sparse
On Wed, Jun 09, 2010 at 05:09:54PM +0200, bonneta wrote:
> I've basically tried "sparse file.c", but it always returns with an error
> like :
> "git-compat-util.h:140:11: error: unable to open 'openssl/ssl.h'"
> or
> "builtin/blame.c:7:10: error: unable to open 'cache.h'"
>
make CC=~/path/to/sparse/cgcc
regards,
dan carpenter
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: help for using sparse
2010-06-09 15:09 help for using sparse bonneta
2010-06-09 16:00 ` Christopher Li
2010-06-09 16:01 ` Dan Carpenter
@ 2010-06-09 16:10 ` Josh Triplett
2010-06-09 16:35 ` bonneta
2010-06-09 18:48 ` Sam Ravnborg
3 siblings, 1 reply; 7+ messages in thread
From: Josh Triplett @ 2010-06-09 16:10 UTC (permalink / raw)
To: bonneta; +Cc: linux-sparse
On Wed, Jun 09, 2010 at 05:09:54PM +0200, bonneta wrote:
> I am working on git, and i would like to apply sparse on its source code.
>
> I've downloaded the source of sparse from its git repository, and compiled
> it successfully.
>
> I've read the little documentation furnished with the code, but i didn't
> manage to apply sparse on the sources of git.
>
> I've basically tried "sparse file.c", but it always returns with an error
> like :
> "git-compat-util.h:140:11: error: unable to open 'openssl/ssl.h'"
> or
> "builtin/blame.c:7:10: error: unable to open 'cache.h'"
>
> I don't know how to resolve it...
These errors occur because you haven't supplied the full compiler
command-line that Git supplies in its build process, which includes
flags for include paths.
The script "cgcc", provided with sparse, provides the most convenient
way to integrate Sparse into an existing build system with minimal work.
Once you've done a "make install" of Sparse into a directory on your
$PATH (or just put the Sparse source directory on your $PATH), just do
"make CC=cgcc".
- Josh Triplett
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: help for using sparse
2010-06-09 16:10 ` Josh Triplett
@ 2010-06-09 16:35 ` bonneta
2010-06-09 16:59 ` Dan Carpenter
0 siblings, 1 reply; 7+ messages in thread
From: bonneta @ 2010-06-09 16:35 UTC (permalink / raw)
To: linux-sparse
On Wed, 9 Jun 2010 09:10:59 -0700, Josh Triplett <josh@joshtriplett.org>
wrote:
> On Wed, Jun 09, 2010 at 05:09:54PM +0200, bonneta wrote:
>> I am working on git, and i would like to apply sparse on its source
code.
>>
>> I've downloaded the source of sparse from its git repository, and
>> compiled
>> it successfully.
>>
>> I've read the little documentation furnished with the code, but i
didn't
>> manage to apply sparse on the sources of git.
>>
>> I've basically tried "sparse file.c", but it always returns with an
error
>> like :
>> "git-compat-util.h:140:11: error: unable to open 'openssl/ssl.h'"
>> or
>> "builtin/blame.c:7:10: error: unable to open 'cache.h'"
>>
>> I don't know how to resolve it...
>
> These errors occur because you haven't supplied the full compiler
> command-line that Git supplies in its build process, which includes
> flags for include paths.
>
> The script "cgcc", provided with sparse, provides the most convenient
> way to integrate Sparse into an existing build system with minimal work.
> Once you've done a "make install" of Sparse into a directory on your
> $PATH (or just put the Sparse source directory on your $PATH), just do
> "make CC=cgcc".
Thank you all, it works fine.
Does sparse look for all the errors with this method?
I saw in the sparse man page that a "Wsparse-all" option exists.
Is it used by default? Otherwise how to use it in the "make" command line?
Axel Bonnet
>
> - Josh Triplett
> --
> To unsubscribe from this list: send the line "unsubscribe linux-sparse"
in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: help for using sparse
2010-06-09 16:35 ` bonneta
@ 2010-06-09 16:59 ` Dan Carpenter
0 siblings, 0 replies; 7+ messages in thread
From: Dan Carpenter @ 2010-06-09 16:59 UTC (permalink / raw)
To: bonneta; +Cc: linux-sparse
On Wed, Jun 09, 2010 at 06:35:31PM +0200, bonneta wrote:
> Thank you all, it works fine.
> Does sparse look for all the errors with this method?
Don't know the defaults.
>
> I saw in the sparse man page that a "Wsparse-all" option exists.
> Is it used by default? Otherwise how to use it in the "make" command line?
>
CHECK="~/path/to/sparse --params" make CC=~/path/to/cgcc
regards,
dan carpenter
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: help for using sparse
2010-06-09 15:09 help for using sparse bonneta
` (2 preceding siblings ...)
2010-06-09 16:10 ` Josh Triplett
@ 2010-06-09 18:48 ` Sam Ravnborg
3 siblings, 0 replies; 7+ messages in thread
From: Sam Ravnborg @ 2010-06-09 18:48 UTC (permalink / raw)
To: bonneta; +Cc: linux-sparse
On Wed, Jun 09, 2010 at 05:09:54PM +0200, bonneta wrote:
> Hello,
>
> I am working on git, and i would like to apply sparse on its source code.
>
> I've downloaded the source of sparse from its git repository, and compiled
> it successfully.
>
> I've read the little documentation furnished with the code, but i didn't
> manage to apply sparse on the sources of git.
It looks like git already supports sparse.
Try "make check"
Try to search for "sparse" in the makefile of git.
Sam
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2010-06-09 18:48 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-09 15:09 help for using sparse bonneta
2010-06-09 16:00 ` Christopher Li
2010-06-09 16:01 ` Dan Carpenter
2010-06-09 16:10 ` Josh Triplett
2010-06-09 16:35 ` bonneta
2010-06-09 16:59 ` Dan Carpenter
2010-06-09 18:48 ` Sam Ravnborg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).