linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Coccinelle: badzero.cocci failure
@ 2017-11-14  8:09 Masahiro Yamada
  2017-11-14  9:07 ` Julia Lawall
  0 siblings, 1 reply; 9+ messages in thread
From: Masahiro Yamada @ 2017-11-14  8:09 UTC (permalink / raw)
  To: cocci
  Cc: Nicolas Palix, Gilles Muller, Julia Lawall,
	Linux Kernel Mailing List, Linux Kbuild mailing list

Hi Coccinelle developers,


When I was working on my patch, I was hit by another issue.

badzero.cocci failed on all modes.


Can you take a look at it, please?



I tried to use DEBUG_FILE and dump the log,
but I could not get a clue of the cause of the failure.

My spatch version is:
spatch version 1.0.6-00345-g2ca0bef compiled with OCaml version 4.02.3




The following is the result on my PC:


$ make  coccicheck  COCCI=scripts/coccinelle/null/badzero.cocci  MODE=report

Please check for false positives in the output before submitting a patch.
When using "patch" mode, carefully review the patch before submitting it.

coccicheck failed
$ make  coccicheck  COCCI=scripts/coccinelle/null/badzero.cocci  MODE=patch

Please check for false positives in the output before submitting a patch.
When using "patch" mode, carefully review the patch before submitting it.

coccicheck failed
$ make  coccicheck  COCCI=scripts/coccinelle/null/badzero.cocci  MODE=context

Please check for false positives in the output before submitting a patch.
When using "patch" mode, carefully review the patch before submitting it.

coccicheck failed
$ make  coccicheck  COCCI=scripts/coccinelle/null/badzero.cocci  MODE=org

Please check for false positives in the output before submitting a patch.
When using "patch" mode, carefully review the patch before submitting it.

coccicheck failed
$ make  coccicheck  COCCI=scripts/coccinelle/null/badzero.cocci
MODE=report  DEBUG_FILE=cocci-debug.txt

Please check for false positives in the output before submitting a patch.
When using "patch" mode, carefully review the patch before submitting it.

coccicheck failed
$ cat cocci-debug.txt
/home/masahiro/bin/spatch -D report --no-show-diff --very-quiet
--cocci-file scripts/coccinelle/null/badzero.cocci --dir . -I
./arch/x86/include -I ./arch/x86/include/generated -I ./include -I
./arch/x86/include/uapi -I ./arch/x86/include/generated/uapi -I
./include/uapi -I ./include/generated/uapi --include
./include/linux/kconfig.h --jobs 8 --chunksize 1
Fatal error: exception
Yes_prepare_ocamlcocci.LinkFailure("/tmp/ocaml_cocci_18c9f9.cmxs")






-- 
Best Regards
Masahiro Yamada

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Coccinelle: badzero.cocci failure
  2017-11-14  8:09 Coccinelle: badzero.cocci failure Masahiro Yamada
@ 2017-11-14  9:07 ` Julia Lawall
  2017-11-14 10:11   ` Masahiro Yamada
  0 siblings, 1 reply; 9+ messages in thread
From: Julia Lawall @ 2017-11-14  9:07 UTC (permalink / raw)
  To: Masahiro Yamada
  Cc: cocci, Nicolas Palix, Gilles Muller, Linux Kernel Mailing List,
	Linux Kbuild mailing list

> coccicheck failed
> $ cat cocci-debug.txt
> /home/masahiro/bin/spatch -D report --no-show-diff --very-quiet
> --cocci-file scripts/coccinelle/null/badzero.cocci --dir . -I
> ./arch/x86/include -I ./arch/x86/include/generated -I ./include -I
> ./arch/x86/include/uapi -I ./arch/x86/include/generated/uapi -I
> ./include/uapi -I ./include/generated/uapi --include
> ./include/linux/kconfig.h --jobs 8 --chunksize 1
> Fatal error: exception
> Yes_prepare_ocamlcocci.LinkFailure("/tmp/ocaml_cocci_18c9f9.cmxs")

Does your Coccinelle support OCaml?  I'm not sure what is the proper way to
check for this, but in my coccinelle/config.log file I have

FEATURE_OCAML='1'

spatch --version gives:

spatch version 1.0.6-00147-g19f9421 compiled with OCaml version 4.02.3
Flags passed to the configure script: [none]
Python scripting support: yes
Syntax of regular expresssions: Str

I'm not sure why it doesn't give feedback on whether OCaml scripting is
supported.  I will check on this.

julia

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Coccinelle: badzero.cocci failure
  2017-11-14  9:07 ` Julia Lawall
@ 2017-11-14 10:11   ` Masahiro Yamada
  2017-11-15  6:22     ` Julia Lawall
  0 siblings, 1 reply; 9+ messages in thread
From: Masahiro Yamada @ 2017-11-14 10:11 UTC (permalink / raw)
  To: Julia Lawall
  Cc: cocci, Nicolas Palix, Gilles Muller, Linux Kernel Mailing List,
	Linux Kbuild mailing list

Hi Julia,


2017-11-14 18:07 GMT+09:00 Julia Lawall <julia.lawall@lip6.fr>:
>> coccicheck failed
>> $ cat cocci-debug.txt
>> /home/masahiro/bin/spatch -D report --no-show-diff --very-quiet
>> --cocci-file scripts/coccinelle/null/badzero.cocci --dir . -I
>> ./arch/x86/include -I ./arch/x86/include/generated -I ./include -I
>> ./arch/x86/include/uapi -I ./arch/x86/include/generated/uapi -I
>> ./include/uapi -I ./include/generated/uapi --include
>> ./include/linux/kconfig.h --jobs 8 --chunksize 1
>> Fatal error: exception
>> Yes_prepare_ocamlcocci.LinkFailure("/tmp/ocaml_cocci_18c9f9.cmxs")
>
> Does your Coccinelle support OCaml?  I'm not sure what is the proper way to
> check for this, but in my coccinelle/config.log file I have
>
> FEATURE_OCAML='1'


Yes.  I also see this line in my config.log


> spatch --version gives:
>
> spatch version 1.0.6-00147-g19f9421 compiled with OCaml version 4.02.3
> Flags passed to the configure script: [none]
> Python scripting support: yes
> Syntax of regular expresssions: Str

My version output looks like follows:

$ spatch --version
spatch version 1.0.6-00345-g2ca0bef compiled with OCaml version 4.02.3
Flags passed to the configure script: --prefix=/home/masahiro
Python scripting support: yes
Syntax of regular expresssions: PCRE


> I'm not sure why it doesn't give feedback on whether OCaml scripting is
> supported.  I will check on this.
>

Thanks!


-- 
Best Regards
Masahiro Yamada

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Coccinelle: badzero.cocci failure
  2017-11-14 10:11   ` Masahiro Yamada
@ 2017-11-15  6:22     ` Julia Lawall
  2017-11-15  8:23       ` Masahiro Yamada
  0 siblings, 1 reply; 9+ messages in thread
From: Julia Lawall @ 2017-11-15  6:22 UTC (permalink / raw)
  To: Masahiro Yamada
  Cc: cocci, Nicolas Palix, Gilles Muller, Linux Kernel Mailing List,
	Linux Kbuild mailing list



On Tue, 14 Nov 2017, Masahiro Yamada wrote:

> Hi Julia,
>
>
> 2017-11-14 18:07 GMT+09:00 Julia Lawall <julia.lawall@lip6.fr>:
> >> coccicheck failed
> >> $ cat cocci-debug.txt
> >> /home/masahiro/bin/spatch -D report --no-show-diff --very-quiet
> >> --cocci-file scripts/coccinelle/null/badzero.cocci --dir . -I
> >> ./arch/x86/include -I ./arch/x86/include/generated -I ./include -I
> >> ./arch/x86/include/uapi -I ./arch/x86/include/generated/uapi -I
> >> ./include/uapi -I ./include/generated/uapi --include
> >> ./include/linux/kconfig.h --jobs 8 --chunksize 1
> >> Fatal error: exception
> >> Yes_prepare_ocamlcocci.LinkFailure("/tmp/ocaml_cocci_18c9f9.cmxs")
> >
> > Does your Coccinelle support OCaml?  I'm not sure what is the proper way to
> > check for this, but in my coccinelle/config.log file I have
> >
> > FEATURE_OCAML='1'
>
>
> Yes.  I also see this line in my config.log
>
>
> > spatch --version gives:
> >
> > spatch version 1.0.6-00147-g19f9421 compiled with OCaml version 4.02.3
> > Flags passed to the configure script: [none]
> > Python scripting support: yes
> > Syntax of regular expresssions: Str
>
> My version output looks like follows:
>
> $ spatch --version
> spatch version 1.0.6-00345-g2ca0bef compiled with OCaml version 4.02.3
> Flags passed to the configure script: --prefix=/home/masahiro
> Python scripting support: yes
> Syntax of regular expresssions: PCRE
>
>
> > I'm not sure why it doesn't give feedback on whether OCaml scripting is
> > supported.  I will check on this.

Can you try the following semantic patch (called eg nothing.cocci):

@script:ocaml@
@@

()

on any .c file, ie

spatch --sp-file nothing.cocci test.c

julia

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Coccinelle: badzero.cocci failure
  2017-11-15  6:22     ` Julia Lawall
@ 2017-11-15  8:23       ` Masahiro Yamada
  2017-11-15  8:37         ` Julia Lawall
  2017-11-15 14:56         ` [Cocci] " Thierry Martinez
  0 siblings, 2 replies; 9+ messages in thread
From: Masahiro Yamada @ 2017-11-15  8:23 UTC (permalink / raw)
  To: Julia Lawall
  Cc: cocci, Nicolas Palix, Gilles Muller, Linux Kernel Mailing List,
	Linux Kbuild mailing list

Hi Julia,


2017-11-15 15:22 GMT+09:00 Julia Lawall <julia.lawall@lip6.fr>:
>
>
> On Tue, 14 Nov 2017, Masahiro Yamada wrote:
>
>> Hi Julia,
>>
>>
>> 2017-11-14 18:07 GMT+09:00 Julia Lawall <julia.lawall@lip6.fr>:
>> >> coccicheck failed
>> >> $ cat cocci-debug.txt
>> >> /home/masahiro/bin/spatch -D report --no-show-diff --very-quiet
>> >> --cocci-file scripts/coccinelle/null/badzero.cocci --dir . -I
>> >> ./arch/x86/include -I ./arch/x86/include/generated -I ./include -I
>> >> ./arch/x86/include/uapi -I ./arch/x86/include/generated/uapi -I
>> >> ./include/uapi -I ./include/generated/uapi --include
>> >> ./include/linux/kconfig.h --jobs 8 --chunksize 1
>> >> Fatal error: exception
>> >> Yes_prepare_ocamlcocci.LinkFailure("/tmp/ocaml_cocci_18c9f9.cmxs")
>> >
>> > Does your Coccinelle support OCaml?  I'm not sure what is the proper way to
>> > check for this, but in my coccinelle/config.log file I have
>> >
>> > FEATURE_OCAML='1'
>>
>>
>> Yes.  I also see this line in my config.log
>>
>>
>> > spatch --version gives:
>> >
>> > spatch version 1.0.6-00147-g19f9421 compiled with OCaml version 4.02.3
>> > Flags passed to the configure script: [none]
>> > Python scripting support: yes
>> > Syntax of regular expresssions: Str
>>
>> My version output looks like follows:
>>
>> $ spatch --version
>> spatch version 1.0.6-00345-g2ca0bef compiled with OCaml version 4.02.3
>> Flags passed to the configure script: --prefix=/home/masahiro
>> Python scripting support: yes
>> Syntax of regular expresssions: PCRE
>>
>>
>> > I'm not sure why it doesn't give feedback on whether OCaml scripting is
>> > supported.  I will check on this.
>
> Can you try the following semantic patch (called eg nothing.cocci):
>
> @script:ocaml@
> @@
>
> ()
>
> on any .c file, ie
>
> spatch --sp-file nothing.cocci test.c
>


Thanks for the simple test semantic patch!



I noticed  1.0.4 is OK,
but 1.0.5 is NG

I guess this is a problem on Coccinelle side.


I git-bisect:ed and the first bad commit bad was:


commit cd539cd12ad0674d5a8f4c33f6c21ae00aec8e57
Author: Sébastien Hinderer <Sebastien.Hinderer@inria.fr>
Date:   Tue Mar 15 12:06:00 2016 +0100

    Get rid of the --enable-release configure option.




$ spatch --version
spatch byte-code version 1.0.4-00212-g8238ba5 compiled with OCaml version 4.02.3
Flags passed to the configure script: --prefix=/home/masahiro
Python scripting support: yes
Syntax of regular expresssions: PCRE
$ spatch  --sp-file nothing.cocci kernel/kmod.c
init_defs_builtins: /home/masahiro/lib/coccinelle/standard.h
Using native version of ocamlc/ocamlopt/ocamldep
ocamlc.opt -c /tmp/ocaml_cocci_23600a.cmo -g -I /usr/lib/ocaml  -I
/home/masahiro/lib/coccinelle/ocaml /tmp/ocaml_cocci_23600a.ml
Compilation OK!
Loading ML code of the SP...
HANDLING: kernel/kmod.c
$ spatch --version
spatch native version 1.0.4-00213-gcd539cd compiled with OCaml version 4.02.3
Flags passed to the configure script: --prefix=/home/masahiro
Python scripting support: yes
Syntax of regular expresssions: PCRE
$ spatch  --sp-file nothing.cocci kernel/kmod.c
init_defs_builtins: /home/masahiro/lib/coccinelle/standard.h
Using native version of ocamlc/ocamlopt/ocamldep
ocamlopt.opt -shared -o /tmp/ocaml_cocci_fdd282.cmxs -g -I
/usr/lib/ocaml  -I /home/masahiro/lib/coccinelle/ocaml
/tmp/ocaml_cocci_fdd282.ml
Compilation OK!
Loading ML code of the SP...
implementation mismatch on Iteration
Fatal error: exception
Yes_prepare_ocamlcocci.LinkFailure("/tmp/ocaml_cocci_fdd282.cmxs")


-- 
Best Regards
Masahiro Yamada

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Coccinelle: badzero.cocci failure
  2017-11-15  8:23       ` Masahiro Yamada
@ 2017-11-15  8:37         ` Julia Lawall
  2017-11-15 14:56         ` [Cocci] " Thierry Martinez
  1 sibling, 0 replies; 9+ messages in thread
From: Julia Lawall @ 2017-11-15  8:37 UTC (permalink / raw)
  To: Masahiro Yamada
  Cc: cocci, Nicolas Palix, Gilles Muller, Linux Kernel Mailing List,
	Linux Kbuild mailing list

[-- Attachment #1: Type: text/plain, Size: 2030 bytes --]

> > Can you try the following semantic patch (called eg nothing.cocci):
> >
> > @script:ocaml@
> > @@
> >
> > ()
> >
> > on any .c file, ie
> >
> > spatch --sp-file nothing.cocci test.c
> >
>
>
> Thanks for the simple test semantic patch!
>
>
>
> I noticed  1.0.4 is OK,
> but 1.0.5 is NG
>
> I guess this is a problem on Coccinelle side.
>
>
> I git-bisect:ed and the first bad commit bad was:
>
>
> commit cd539cd12ad0674d5a8f4c33f6c21ae00aec8e57
> Author: Sébastien Hinderer <Sebastien.Hinderer@inria.fr>
> Date:   Tue Mar 15 12:06:00 2016 +0100
>
>     Get rid of the --enable-release configure option.
>
>
>
>
> $ spatch --version
> spatch byte-code version 1.0.4-00212-g8238ba5 compiled with OCaml version 4.02.3
> Flags passed to the configure script: --prefix=/home/masahiro
> Python scripting support: yes
> Syntax of regular expresssions: PCRE
> $ spatch  --sp-file nothing.cocci kernel/kmod.c
> init_defs_builtins: /home/masahiro/lib/coccinelle/standard.h
> Using native version of ocamlc/ocamlopt/ocamldep
> ocamlc.opt -c /tmp/ocaml_cocci_23600a.cmo -g -I /usr/lib/ocaml  -I
> /home/masahiro/lib/coccinelle/ocaml /tmp/ocaml_cocci_23600a.ml
> Compilation OK!
> Loading ML code of the SP...
> HANDLING: kernel/kmod.c
> $ spatch --version
> spatch native version 1.0.4-00213-gcd539cd compiled with OCaml version 4.02.3
> Flags passed to the configure script: --prefix=/home/masahiro
> Python scripting support: yes
> Syntax of regular expresssions: PCRE
> $ spatch  --sp-file nothing.cocci kernel/kmod.c
> init_defs_builtins: /home/masahiro/lib/coccinelle/standard.h
> Using native version of ocamlc/ocamlopt/ocamldep
> ocamlopt.opt -shared -o /tmp/ocaml_cocci_fdd282.cmxs -g -I
> /usr/lib/ocaml  -I /home/masahiro/lib/coccinelle/ocaml
> /tmp/ocaml_cocci_fdd282.ml
> Compilation OK!
> Loading ML code of the SP...
> implementation mismatch on Iteration
> Fatal error: exception
> Yes_prepare_ocamlcocci.LinkFailure("/tmp/ocaml_cocci_fdd282.cmxs")

Thanks for the feedback.  I will try to find out more about this.

julia

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Cocci] Coccinelle: badzero.cocci failure
  2017-11-15  8:23       ` Masahiro Yamada
  2017-11-15  8:37         ` Julia Lawall
@ 2017-11-15 14:56         ` Thierry Martinez
  2017-11-15 15:49           ` Masahiro Yamada
  1 sibling, 1 reply; 9+ messages in thread
From: Thierry Martinez @ 2017-11-15 14:56 UTC (permalink / raw)
  To: Masahiro Yamada
  Cc: Julia Lawall, Linux Kernel Mailing List,
	Linux Kbuild mailing list, Nicolas Palix, cocci

Hi, Masahiro.

Masahiro:
> Fatal error: exception
> Yes_prepare_ocamlcocci.LinkFailure("/tmp/ocaml_cocci_fdd282.cmxs")

If you can rerun your test with coccinelle GitHub master, the
LinkFailure exception will now be more verbose, in order to understand
the problem.

I suspect a mismatch between the version of OCaml you use to compile
coccinelle, and the version of OCaml that coccinelle uses to compile
OCaml scripts in rules.

Thank you for helping us investigating this.
Best regards.
-- 
Thierry Martinez.

----- Original Message -----
> From: "Masahiro Yamada" <yamada.masahiro@socionext.com>
> To: "Julia Lawall" <julia.lawall@lip6.fr>
> Cc: "Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>, "Linux Kbuild mailing list"
> <linux-kbuild@vger.kernel.org>, "Nicolas Palix" <nicolas.palix@imag.fr>, cocci@systeme.lip6.fr
> Sent: Wednesday, November 15, 2017 9:23:11 AM
> Subject: Re: [Cocci] Coccinelle: badzero.cocci failure
> 
> Hi Julia,
> 
> 
> 2017-11-15 15:22 GMT+09:00 Julia Lawall <julia.lawall@lip6.fr>:
> >
> >
> > On Tue, 14 Nov 2017, Masahiro Yamada wrote:
> >
> >> Hi Julia,
> >>
> >>
> >> 2017-11-14 18:07 GMT+09:00 Julia Lawall <julia.lawall@lip6.fr>:
> >> >> coccicheck failed
> >> >> $ cat cocci-debug.txt
> >> >> /home/masahiro/bin/spatch -D report --no-show-diff --very-quiet
> >> >> --cocci-file scripts/coccinelle/null/badzero.cocci --dir . -I
> >> >> ./arch/x86/include -I ./arch/x86/include/generated -I ./include -I
> >> >> ./arch/x86/include/uapi -I ./arch/x86/include/generated/uapi -I
> >> >> ./include/uapi -I ./include/generated/uapi --include
> >> >> ./include/linux/kconfig.h --jobs 8 --chunksize 1
> >> >> Fatal error: exception
> >> >> Yes_prepare_ocamlcocci.LinkFailure("/tmp/ocaml_cocci_18c9f9.cmxs")
> >> >
> >> > Does your Coccinelle support OCaml?  I'm not sure what is the proper way
> >> > to
> >> > check for this, but in my coccinelle/config.log file I have
> >> >
> >> > FEATURE_OCAML='1'
> >>
> >>
> >> Yes.  I also see this line in my config.log
> >>
> >>
> >> > spatch --version gives:
> >> >
> >> > spatch version 1.0.6-00147-g19f9421 compiled with OCaml version 4.02.3
> >> > Flags passed to the configure script: [none]
> >> > Python scripting support: yes
> >> > Syntax of regular expresssions: Str
> >>
> >> My version output looks like follows:
> >>
> >> $ spatch --version
> >> spatch version 1.0.6-00345-g2ca0bef compiled with OCaml version 4.02.3
> >> Flags passed to the configure script: --prefix=/home/masahiro
> >> Python scripting support: yes
> >> Syntax of regular expresssions: PCRE
> >>
> >>
> >> > I'm not sure why it doesn't give feedback on whether OCaml scripting is
> >> > supported.  I will check on this.
> >
> > Can you try the following semantic patch (called eg nothing.cocci):
> >
> > @script:ocaml@
> > @@
> >
> > ()
> >
> > on any .c file, ie
> >
> > spatch --sp-file nothing.cocci test.c
> >
> 
> 
> Thanks for the simple test semantic patch!
> 
> 
> 
> I noticed  1.0.4 is OK,
> but 1.0.5 is NG
> 
> I guess this is a problem on Coccinelle side.
> 
> 
> I git-bisect:ed and the first bad commit bad was:
> 
> 
> commit cd539cd12ad0674d5a8f4c33f6c21ae00aec8e57
> Author: Sébastien Hinderer <Sebastien.Hinderer@inria.fr>
> Date:   Tue Mar 15 12:06:00 2016 +0100
> 
>     Get rid of the --enable-release configure option.
> 
> 
> 
> 
> $ spatch --version
> spatch byte-code version 1.0.4-00212-g8238ba5 compiled with OCaml version
> 4.02.3
> Flags passed to the configure script: --prefix=/home/masahiro
> Python scripting support: yes
> Syntax of regular expresssions: PCRE
> $ spatch  --sp-file nothing.cocci kernel/kmod.c
> init_defs_builtins: /home/masahiro/lib/coccinelle/standard.h
> Using native version of ocamlc/ocamlopt/ocamldep
> ocamlc.opt -c /tmp/ocaml_cocci_23600a.cmo -g -I /usr/lib/ocaml  -I
> /home/masahiro/lib/coccinelle/ocaml /tmp/ocaml_cocci_23600a.ml
> Compilation OK!
> Loading ML code of the SP...
> HANDLING: kernel/kmod.c
> $ spatch --version
> spatch native version 1.0.4-00213-gcd539cd compiled with OCaml version 4.02.3
> Flags passed to the configure script: --prefix=/home/masahiro
> Python scripting support: yes
> Syntax of regular expresssions: PCRE
> $ spatch  --sp-file nothing.cocci kernel/kmod.c
> init_defs_builtins: /home/masahiro/lib/coccinelle/standard.h
> Using native version of ocamlc/ocamlopt/ocamldep
> ocamlopt.opt -shared -o /tmp/ocaml_cocci_fdd282.cmxs -g -I
> /usr/lib/ocaml  -I /home/masahiro/lib/coccinelle/ocaml
> /tmp/ocaml_cocci_fdd282.ml
> Compilation OK!
> Loading ML code of the SP...
> implementation mismatch on Iteration
> Fatal error: exception
> Yes_prepare_ocamlcocci.LinkFailure("/tmp/ocaml_cocci_fdd282.cmxs")
> 
> 
> --
> Best Regards
> Masahiro Yamada
> _______________________________________________
> Cocci mailing list
> Cocci@systeme.lip6.fr
> https://systeme.lip6.fr/mailman/listinfo/cocci
> 

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Cocci] Coccinelle: badzero.cocci failure
  2017-11-15 14:56         ` [Cocci] " Thierry Martinez
@ 2017-11-15 15:49           ` Masahiro Yamada
  2017-11-16  2:19             ` Masahiro Yamada
  0 siblings, 1 reply; 9+ messages in thread
From: Masahiro Yamada @ 2017-11-15 15:49 UTC (permalink / raw)
  To: Thierry Martinez
  Cc: Julia Lawall, Linux Kernel Mailing List,
	Linux Kbuild mailing list, Nicolas Palix, cocci

Hi Thierry,

2017-11-15 23:56 GMT+09:00 Thierry Martinez <thierry.martinez@inria.fr>:
> Hi, Masahiro.
>
> Masahiro:
>> Fatal error: exception
>> Yes_prepare_ocamlcocci.LinkFailure("/tmp/ocaml_cocci_fdd282.cmxs")
>
> If you can rerun your test with coccinelle GitHub master, the
> LinkFailure exception will now be more verbose, in order to understand
> the problem.
>
> I suspect a mismatch between the version of OCaml you use to compile
> coccinelle, and the version of OCaml that coccinelle uses to compile
> OCaml scripts in rules.
>

Now I am out of the office
and working from home.
badzero.cocci works fine on my PC at home.

I suspect the difference of installed packages.


I will try the latest commit in the GitHub
tomorrow at the office.




Best Regards
Masahiro Yamada

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Cocci] Coccinelle: badzero.cocci failure
  2017-11-15 15:49           ` Masahiro Yamada
@ 2017-11-16  2:19             ` Masahiro Yamada
  0 siblings, 0 replies; 9+ messages in thread
From: Masahiro Yamada @ 2017-11-16  2:19 UTC (permalink / raw)
  To: Thierry Martinez
  Cc: Julia Lawall, Linux Kernel Mailing List,
	Linux Kbuild mailing list, Nicolas Palix, cocci

Hi Thierry,


2017-11-16 0:49 GMT+09:00 Masahiro Yamada <yamada.masahiro@socionext.com>:
> Hi Thierry,
>
> 2017-11-15 23:56 GMT+09:00 Thierry Martinez <thierry.martinez@inria.fr>:
>> Hi, Masahiro.
>>
>> Masahiro:
>>> Fatal error: exception
>>> Yes_prepare_ocamlcocci.LinkFailure("/tmp/ocaml_cocci_fdd282.cmxs")
>>
>> If you can rerun your test with coccinelle GitHub master, the
>> LinkFailure exception will now be more verbose, in order to understand
>> the problem.
>>
>> I suspect a mismatch between the version of OCaml you use to compile
>> coccinelle, and the version of OCaml that coccinelle uses to compile
>> OCaml scripts in rules.
>>
>
> Now I am out of the office
> and working from home.
> badzero.cocci works fine on my PC at home.
>
> I suspect the difference of installed packages.
>
>
> I will try the latest commit in the GitHub
> tomorrow at the office.
>
>

I tested the latest coccinelle
on my PC at office.

The result is as follows:


$ spatch --version
spatch version 1.0.6-00359-g1a8f958 compiled with OCaml version 4.02.3
Flags passed to the configure script: --prefix=/home/masahiro
OCaml scripting support: yes
Python scripting support: yes
Syntax of regular expresssions: PCRE
$ spatch --sp-file nothing.cocci kernel/kmod.c
init_defs_builtins: /home/masahiro/bin/../lib/coccinelle/standard.h
Using native version of ocamlc/ocamlopt/ocamldep
ocamlopt.opt -shared -o /tmp/ocaml_cocci_d59676.cmxs -g -I
/usr/lib/ocaml  -I /home/masahiro/bin/../lib/coccinelle/ocaml
/tmp/ocaml_cocci_d59676.ml
Compilation OK!
Loading ML code of the SP...
implementation mismatch on Coccilib
Fatal error: exception
Yes_prepare_ocamlcocci.LinkFailure("/tmp/ocaml_cocci_d59676.cmxs",
"implementation mismatch on Coccilib")




I use Ubuntu 16.04 LTS

$ cat  /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=16.04
DISTRIB_CODENAME=xenial
DISTRIB_DESCRIPTION="Ubuntu 16.04.2 LTS"


I checked install.txt
and I confirmed all of the following packages are installed on my PC.

On Debian/Ubuntu, install the following packages
 - pkg-config (optional, but strongly recommended)
 - ocaml-native-compilers (or alternatively ocaml)
 - ocaml-findlib
 - menhir and libmenhir-ocaml-dev (optional, bundled)
 - libpcre-ocaml-dev (optional, bundled)
 - texlive-fonts-extra (for the documentation)




-- 
Best Regards
Masahiro Yamada

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2017-11-16  2:20 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-14  8:09 Coccinelle: badzero.cocci failure Masahiro Yamada
2017-11-14  9:07 ` Julia Lawall
2017-11-14 10:11   ` Masahiro Yamada
2017-11-15  6:22     ` Julia Lawall
2017-11-15  8:23       ` Masahiro Yamada
2017-11-15  8:37         ` Julia Lawall
2017-11-15 14:56         ` [Cocci] " Thierry Martinez
2017-11-15 15:49           ` Masahiro Yamada
2017-11-16  2:19             ` Masahiro Yamada

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).