Re: [Cocci] coccinelle issues
On 6/14/20 11:21 AM, Mike Galbraith wrote: > On Sun, 2020-06-14 at 14:59 +0200, Julia Lawall wrote: >> >> On Sun, 14 Jun 2020, Mike Galbraith wrote: >> >>> On Sun, 2020-06-14 at 10:43 +0200, Julia Lawall wrote: What is your Linux distribution? >>> >>> openSUSE Leap-15.1 >> >> Our CI already has an entry for openSUSE Leap. We will look into it, but >> if you have any further information about the problem, please let us know. > > Executive Summary: > > warning: Can't find macro file: > /usr/local/coccinelle/bin/../lib/coccinelle/standard.h > warning: Can't find default iso file: > /usr/local/coccinelle/bin/../lib/coccinelle/standard.iso > > I find those under lib64, apply symlink bandaid, proggy acks. > > WRT the HEAD make install booboo.. > > git@homer:~/coccinelle> sudo make install > mkdir -p /usr/local/coccinelle/bin /usr/local/coccinelle/lib64/coccinelle > mkdir -p /usr/local/coccinelle/lib64/coccinelle/ocaml > if test -f bundles/pyml/dllpyml_stubs.so; then \ > /usr/bin/install -c -m 755 bundles/pyml/dllpyml_stubs.so \ > /usr/local/coccinelle/lib64/coccinelle; \ > fi > if test -f bundles/pcre/dllpcre_stubs.so; then \ > /usr/bin/install -c -m 755 bundles/pcre/dllpcre_stubs.so \ > /usr/local/coccinelle/lib64/coccinelle; \ > fi > /usr/bin/install -c -m 755 spatch.opt /usr/local/coccinelle/bin/spatch > /usr/bin/install -c -m 644 standard.h /usr/local/coccinelle/lib64/coccinelle > /usr/bin/install -c -m 644 standard.iso /usr/local/coccinelle/lib64/coccinelle > /usr/bin/install -c -m 644 ocaml/*.cmi > /usr/local/coccinelle/lib64/coccinelle/ocaml/ > if test -f ocaml/coccilib.cmx; then \ > /usr/bin/install -c -m 644 ocaml/*.cmx > /usr/local/coccinelle/lib64/coccinelle/ocaml/; \ > fi > /usr/bin/install -c -m 755 tools/spgen/source/spgen.opt \ > /usr/local/coccinelle/bin/spgen > /usr/bin/install -c -m 644 python/coccilib/*.py \ > /usr/local/coccinelle/lib64/coccinelle/python/coccilib > /usr/bin/install: target > '/usr/local/coccinelle/lib64/coccinelle/python/coccilib' is not a directory > make: *** [Makefile:332: install-python] Error 1 > > mkdir -p bandaid worked. > Thanks, Mike. It seems to be working now. -- ~Randy ___ Cocci mailing list Cocci@systeme.lip6.fr https://systeme.lip6.fr/mailman/listinfo/cocci
Re: [Cocci] coccinelle issues
P.S. > > warning: Can't find macro file: > > /usr/local/coccinelle/bin/../lib/coccinelle/standard.h > > warning: Can't find default iso file: > > /usr/local/coccinelle/bin/../lib/coccinelle/standard.iso The hard coded "lib" causing this issue lives in globals/config.ml.in. diff --git a/globals/config.ml.in b/globals/config.ml.in index 2a4135f3b06e..5969be5aa1e2 100644 --- a/globals/config.ml.in +++ b/globals/config.ml.in @@ -37,7 +37,7 @@ let path = exec_dir else List.fold_left Filename.concat exec_dir - [Filename.parent_dir_name; "lib"; "coccinelle"] + [Filename.parent_dir_name; "lib64"; "coccinelle"] let std_iso = ref (Filename.concat path "standard.iso") ___ Cocci mailing list Cocci@systeme.lip6.fr https://systeme.lip6.fr/mailman/listinfo/cocci
Re: [Cocci] coccinelle issues
On Sun, 14 Jun 2020, Mike Galbraith wrote: > On Sun, 2020-06-14 at 14:59 +0200, Julia Lawall wrote: > > > > On Sun, 14 Jun 2020, Mike Galbraith wrote: > > > > > On Sun, 2020-06-14 at 10:43 +0200, Julia Lawall wrote: > > > > > > > > What is your Linux distribution? > > > > > > openSUSE Leap-15.1 > > > > Our CI already has an entry for openSUSE Leap. We will look into it, but > > if you have any further information about the problem, please let us know. > > Executive Summary: Thanks for all the information! julia > > warning: Can't find macro file: > /usr/local/coccinelle/bin/../lib/coccinelle/standard.h > warning: Can't find default iso file: > /usr/local/coccinelle/bin/../lib/coccinelle/standard.iso > > I find those under lib64, apply symlink bandaid, proggy acks. > > WRT the HEAD make install booboo.. > > git@homer:~/coccinelle> sudo make install > mkdir -p /usr/local/coccinelle/bin /usr/local/coccinelle/lib64/coccinelle > mkdir -p /usr/local/coccinelle/lib64/coccinelle/ocaml > if test -f bundles/pyml/dllpyml_stubs.so; then \ > /usr/bin/install -c -m 755 bundles/pyml/dllpyml_stubs.so \ > /usr/local/coccinelle/lib64/coccinelle; \ > fi > if test -f bundles/pcre/dllpcre_stubs.so; then \ > /usr/bin/install -c -m 755 bundles/pcre/dllpcre_stubs.so \ > /usr/local/coccinelle/lib64/coccinelle; \ > fi > /usr/bin/install -c -m 755 spatch.opt /usr/local/coccinelle/bin/spatch > /usr/bin/install -c -m 644 standard.h /usr/local/coccinelle/lib64/coccinelle > /usr/bin/install -c -m 644 standard.iso /usr/local/coccinelle/lib64/coccinelle > /usr/bin/install -c -m 644 ocaml/*.cmi > /usr/local/coccinelle/lib64/coccinelle/ocaml/ > if test -f ocaml/coccilib.cmx; then \ > /usr/bin/install -c -m 644 ocaml/*.cmx > /usr/local/coccinelle/lib64/coccinelle/ocaml/; \ > fi > /usr/bin/install -c -m 755 tools/spgen/source/spgen.opt \ > /usr/local/coccinelle/bin/spgen > /usr/bin/install -c -m 644 python/coccilib/*.py \ > /usr/local/coccinelle/lib64/coccinelle/python/coccilib > /usr/bin/install: target > '/usr/local/coccinelle/lib64/coccinelle/python/coccilib' is not a directory > make: *** [Makefile:332: install-python] Error 1 > > mkdir -p bandaid worked. > ___ Cocci mailing list Cocci@systeme.lip6.fr https://systeme.lip6.fr/mailman/listinfo/cocci
Re: [Cocci] coccinelle issues
On Sun, 2020-06-14 at 14:59 +0200, Julia Lawall wrote: > > On Sun, 14 Jun 2020, Mike Galbraith wrote: > > > On Sun, 2020-06-14 at 10:43 +0200, Julia Lawall wrote: > > > > > > What is your Linux distribution? > > > > openSUSE Leap-15.1 > > Our CI already has an entry for openSUSE Leap. We will look into it, but > if you have any further information about the problem, please let us know. Executive Summary: warning: Can't find macro file: /usr/local/coccinelle/bin/../lib/coccinelle/standard.h warning: Can't find default iso file: /usr/local/coccinelle/bin/../lib/coccinelle/standard.iso I find those under lib64, apply symlink bandaid, proggy acks. WRT the HEAD make install booboo.. git@homer:~/coccinelle> sudo make install mkdir -p /usr/local/coccinelle/bin /usr/local/coccinelle/lib64/coccinelle mkdir -p /usr/local/coccinelle/lib64/coccinelle/ocaml if test -f bundles/pyml/dllpyml_stubs.so; then \ /usr/bin/install -c -m 755 bundles/pyml/dllpyml_stubs.so \ /usr/local/coccinelle/lib64/coccinelle; \ fi if test -f bundles/pcre/dllpcre_stubs.so; then \ /usr/bin/install -c -m 755 bundles/pcre/dllpcre_stubs.so \ /usr/local/coccinelle/lib64/coccinelle; \ fi /usr/bin/install -c -m 755 spatch.opt /usr/local/coccinelle/bin/spatch /usr/bin/install -c -m 644 standard.h /usr/local/coccinelle/lib64/coccinelle /usr/bin/install -c -m 644 standard.iso /usr/local/coccinelle/lib64/coccinelle /usr/bin/install -c -m 644 ocaml/*.cmi /usr/local/coccinelle/lib64/coccinelle/ocaml/ if test -f ocaml/coccilib.cmx; then \ /usr/bin/install -c -m 644 ocaml/*.cmx /usr/local/coccinelle/lib64/coccinelle/ocaml/; \ fi /usr/bin/install -c -m 755 tools/spgen/source/spgen.opt \ /usr/local/coccinelle/bin/spgen /usr/bin/install -c -m 644 python/coccilib/*.py \ /usr/local/coccinelle/lib64/coccinelle/python/coccilib /usr/bin/install: target '/usr/local/coccinelle/lib64/coccinelle/python/coccilib' is not a directory make: *** [Makefile:332: install-python] Error 1 mkdir -p bandaid worked. ___ Cocci mailing list Cocci@systeme.lip6.fr https://systeme.lip6.fr/mailman/listinfo/cocci
Re: [Cocci] coccinelle issues
> > Note2: https://github.com/coccinelle/coccinelle/blob/master/install.txt > > says that 'spatch' is a script, but it seems to be a binary executable file. > > Actually, it is a script, and the fact that you say it is a binary may be > the reason for your python problem. Normally there is a script > (scripts/spatch) that make install puts in place that refers back to where > your Coccinelle is installed. I suggest to take another look at the corresponding software development history. The build infrastructures were occasionally updated in the meantime. elfring@Sonne:~> SP=$(which spatch) && file $SP && du -h $SP /usr/local/bin/spatch: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 3.2.0, with debug_info, not stripped 16M /usr/local/bin/spatch Regards, Markus ___ Cocci mailing list Cocci@systeme.lip6.fr https://systeme.lip6.fr/mailman/listinfo/cocci
Re: [Cocci] coccinelle issues
On Sun, 14 Jun 2020, Randy Dunlap wrote: > On 6/14/20 12:39 AM, Julia Lawall wrote: > > > > > > On Sat, 13 Jun 2020, Randy Dunlap wrote: > > > >> Hi, > >> > >> OK, I've not used Coccinelle and now I am trying to use it. > >> It seems that I am having a few issues. > >> The primary one is when I run spatch (via 'make coccicheck' in > >> the kernel source tree), it tells me: > >> > >> Python error: No module named coccilib.elems > >> > >> I do see "elems.py" in /usr/local/lib64/coccinelle/python/coccilib. > >> > >> I am using coccinelle-master downloaded from github on > >> Friday June 12, 2020. > >> > >> > >> I have also made the following notes while building/installing it. > >> > >> > >> Note1: The latest coccinelle tarball is not actually available > >> at the coccinelle home page although the kernel documentation says it is. > > > > Yes, I'm aware of this problem. We're not able to update the home page at > > the moment. This problem is being worked on. > > > >> > >> Note2: https://github.com/coccinelle/coccinelle/blob/master/install.txt > >> says that 'spatch' is a script, but it seems to be a binary executable > >> file. > > > > Actually, it is a script, and the fact that you say it is a binary may be > > the reason for your python problem. Normally there is a script > > (scripts/spatch) that make install puts in place that refers back to where > > your Coccinelle is installed. > > Yes, I saw scripts/spatch, but that script is not what is installed in > /usr/local/bin. > (see more below) OK. I don't install Coccinelle in the normal way. I will check on what is intended. > > >> Note3: https://github.com/coccinelle/coccinelle/blob/master/install.txt > >> probably should say to use 'sudo make install' instead of just > >> 'make install', just like 'coccinelle.rst' file in the kernel tree says. > > > > OK. A lot of documentation for a lot of projects seems to omit the sudo, > > but I have indeed never understood why. > > > > Maybe try again with make distclean, ./autogen, ./configure, sudo make > > install? > > OK, I did all of those. > > Is this expected? > > $ ./autogen > cat: VERSION: No such file or directory > cat: VERSION: No such file or directory > cat: VERSION: No such file or directory > cat: VERSION: No such file or directory > cat: VERSION: No such file or directory > cat: VERSION: No such file or directory > cat: VERSION: No such file or directory > cat: VERSION: No such file or directory > cat: VERSION: No such file or directory > cat: VERSION: No such file or directory > cat: VERSION: No such file or directory Sorry. This problem has no impact, but I just pushed a commit to github to solve it. julia > > > spatch is installed in /usr/local/bin/spatch: > > $ ll /usr/local/bin/spatch > -rwxr-xr-x 1 root root 15547736 Jun 14 07:32 /usr/local/bin/spatch* > > $ file /usr/local/bin/spatch > /usr/local/bin/spatch: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), > dynamically linked, interpreter /lib64/l, > BuildID[sha1]=2b658c12a1a49deae24010b71d22d262988ce041, for GNU/Linux 3.2.0, > with debug_info, not stripped > > > I still get this runtime error: > > Python error: No module named coccilib.elems > > -- > ~Randy > > ___ Cocci mailing list Cocci@systeme.lip6.fr https://systeme.lip6.fr/mailman/listinfo/cocci
Re: [Cocci] coccinelle issues
On 6/14/20 12:39 AM, Julia Lawall wrote: > > > On Sat, 13 Jun 2020, Randy Dunlap wrote: > >> Hi, >> >> OK, I've not used Coccinelle and now I am trying to use it. >> It seems that I am having a few issues. >> The primary one is when I run spatch (via 'make coccicheck' in >> the kernel source tree), it tells me: >> >> Python error: No module named coccilib.elems >> >> I do see "elems.py" in /usr/local/lib64/coccinelle/python/coccilib. >> >> I am using coccinelle-master downloaded from github on >> Friday June 12, 2020. >> >> >> I have also made the following notes while building/installing it. >> >> >> Note1: The latest coccinelle tarball is not actually available >> at the coccinelle home page although the kernel documentation says it is. > > Yes, I'm aware of this problem. We're not able to update the home page at > the moment. This problem is being worked on. > >> >> Note2: https://github.com/coccinelle/coccinelle/blob/master/install.txt >> says that 'spatch' is a script, but it seems to be a binary executable >> file. > > Actually, it is a script, and the fact that you say it is a binary may be > the reason for your python problem. Normally there is a script > (scripts/spatch) that make install puts in place that refers back to where > your Coccinelle is installed. Yes, I saw scripts/spatch, but that script is not what is installed in /usr/local/bin. (see more below) >> Note3: https://github.com/coccinelle/coccinelle/blob/master/install.txt >> probably should say to use 'sudo make install' instead of just >> 'make install', just like 'coccinelle.rst' file in the kernel tree says. > > OK. A lot of documentation for a lot of projects seems to omit the sudo, > but I have indeed never understood why. > > Maybe try again with make distclean, ./autogen, ./configure, sudo make > install? OK, I did all of those. Is this expected? $ ./autogen cat: VERSION: No such file or directory cat: VERSION: No such file or directory cat: VERSION: No such file or directory cat: VERSION: No such file or directory cat: VERSION: No such file or directory cat: VERSION: No such file or directory cat: VERSION: No such file or directory cat: VERSION: No such file or directory cat: VERSION: No such file or directory cat: VERSION: No such file or directory cat: VERSION: No such file or directory spatch is installed in /usr/local/bin/spatch: $ ll /usr/local/bin/spatch -rwxr-xr-x 1 root root 15547736 Jun 14 07:32 /usr/local/bin/spatch* $ file /usr/local/bin/spatch /usr/local/bin/spatch: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/l, BuildID[sha1]=2b658c12a1a49deae24010b71d22d262988ce041, for GNU/Linux 3.2.0, with debug_info, not stripped I still get this runtime error: Python error: No module named coccilib.elems -- ~Randy ___ Cocci mailing list Cocci@systeme.lip6.fr https://systeme.lip6.fr/mailman/listinfo/cocci
Re: [Cocci] coccinelle issues
On Sun, 14 Jun 2020, Mike Galbraith wrote: > On Sun, 2020-06-14 at 10:43 +0200, Julia Lawall wrote: > > > > What is your Linux distribution? > > openSUSE Leap-15.1 Our CI already has an entry for openSUSE Leap. We will look into it, but if you have any further information about the problem, please let us know. thanks, julia ___ Cocci mailing list Cocci@systeme.lip6.fr https://systeme.lip6.fr/mailman/listinfo/cocci
Re: [Cocci] coccinelle issues
On Sun, 14 Jun 2020, Mike Galbraith wrote: > On Sun, 2020-06-14 at 10:43 +0200, Julia Lawall wrote: > > > > What is your Linux distribution? > > openSUSE Leap-15.1 OK, this problem has occurred before. I think we should add openSUSE to our CI. Thanks for the report. julia ___ Cocci mailing list Cocci@systeme.lip6.fr https://systeme.lip6.fr/mailman/listinfo/cocci
Re: [Cocci] coccinelle issues
On Sun, 14 Jun 2020, Mike Galbraith wrote: > On Sun, 2020-06-14 at 10:00 +0200, Mike Galbraith wrote: > > On Sun, 2020-06-14 at 09:57 +0200, Mike Galbraith wrote: > > > On Sun, 2020-06-14 at 09:42 +0200, Julia Lawall wrote: > > > > > > > > On Sun, 14 Jun 2020, Mike Galbraith wrote: > > > > > > > > > > > > > I didn't download, rather pulled/built. I didn't have the same issue > > > > > you did, but make coccicheck was a bust here until I backed down to > > > > > version 1.0.6. Neither HEAD, 1.0.8 or 1.0.7 ran, and following its > > > > > MODE=blah suggestion helped not at all. > > > > > > > > Did you get a segmentation fault? > > > > > > Nope. Turned out to be a dinky install gotcha. Creating a symlink.. > > > > > > lrwxrwxrwx 1 root root 27 Jun 14 09:40 /usr/local/coccinelle/lib -> > > > /usr/local/coccinelle/lib64 > > > > > > ..seems to have fixed 1.0.8 all up. The very first time I installed, I > > > had to create one directory (forget which) by hand as well. > > > > Oh well, not all fixed up, but it does run. > > > > ./fs/xfs/xfs_rmap_item.c:56:5-24: atomic_dec_and_test variation before > > object free at line 57. > > ./kernel/nsproxy.c:253:11-30: atomic_dec_and_test variation before object > > free at line 254. > > ./net/unix/scm.c:80:6-30: atomic_dec_and_test variation before object free > > at line 81. > > coccicheck failed > > make: *** [Makefile:1822: coccicheck] Error 2 > > And doing the DEBUG_FILE="all.err" thing says... > > /usr/local/bin/spatch -D report --no-show-diff --very-quiet --cocci-file > ./scripts/coccinelle/api/alloc/alloc_cast.cocci --no-includes > --include-headers --dir . -I ./arch/x86/include -I > ./arch/x86/include/generated -I ./include -I ./arc> > 12712 files match > /usr/local/bin/spatch -D report --no-show-diff --very-quiet --cocci-file > ./scripts/coccinelle/api/alloc/pool_zalloc-simple.cocci --no-includes > --include-headers --dir . -I ./arch/x86/include -I > ./arch/x86/include/generated -I ./include > > 42 files match > /usr/local/bin/spatch -D report --no-show-diff --very-quiet --cocci-file > ./scripts/coccinelle/api/alloc/zalloc-simple.cocci --no-includes > --include-headers --dir . -I ./arch/x86/include -I > ./arch/x86/include/generated -I ./include -I ./> > 2003 files match > /usr/local/bin/spatch -D report --no-show-diff --very-quiet --cocci-file > ./scripts/coccinelle/api/atomic_as_refcounter.cocci --include-headers > --very-quiet --dir . -I ./arch/x86/include -I ./arch/x86/include/generated -I > ./include -I ./> > 502 files match > /usr/local/bin/spatch -D report --no-show-diff --very-quiet --cocci-file > ./scripts/coccinelle/api/check_bq27xxx_data.cocci --dir . -I > ./arch/x86/include -I ./arch/x86/include/generated -I ./include -I > ./arch/x86/include/uapi -I ./arch/x> > File "/tmp/ocaml_cocci_c0ec37.ml", line 1: > Error: The files > /usr/local/coccinelle/bin/../lib/coccinelle/ocaml/coccilib.cmi >and /usr/local/coccinelle/bin/../lib/coccinelle/ocaml/ast_c.cmi >make inconsistent assumptions over interface Ast_c > Fatal error: exception > Coccinelle_modules.Yes_prepare_ocamlcocci.CompileFailure("/tmp/ocaml_cocci_c0ec37.ml") > ~ Ah, that's not what I expected. It looks like your lib problem coming back again. julia ___ Cocci mailing list Cocci@systeme.lip6.fr https://systeme.lip6.fr/mailman/listinfo/cocci
Re: [Cocci] coccinelle issues
On Sun, 14 Jun 2020, Mike Galbraith wrote: > On Sun, 2020-06-14 at 09:57 +0200, Mike Galbraith wrote: > > On Sun, 2020-06-14 at 09:42 +0200, Julia Lawall wrote: > > > > > > On Sun, 14 Jun 2020, Mike Galbraith wrote: > > > > > > > > > > I didn't download, rather pulled/built. I didn't have the same issue > > > > you did, but make coccicheck was a bust here until I backed down to > > > > version 1.0.6. Neither HEAD, 1.0.8 or 1.0.7 ran, and following its > > > > MODE=blah suggestion helped not at all. > > > > > > Did you get a segmentation fault? > > > > Nope. Turned out to be a dinky install gotcha. Creating a symlink.. > > > > lrwxrwxrwx 1 root root 27 Jun 14 09:40 /usr/local/coccinelle/lib -> > > /usr/local/coccinelle/lib64 > > > > ..seems to have fixed 1.0.8 all up. The very first time I installed, I > > had to create one directory (forget which) by hand as well. > > Oh well, not all fixed up, but it does run. > > ./fs/xfs/xfs_rmap_item.c:56:5-24: atomic_dec_and_test variation before object > free at line 57. > ./kernel/nsproxy.c:253:11-30: atomic_dec_and_test variation before object > free at line 254. > ./net/unix/scm.c:80:6-30: atomic_dec_and_test variation before object free at > line 81. > coccicheck failed > make: *** [Makefile:1822: coccicheck] Error 2 Yeah, that's the segfault There is one rule that doesn't work well with make coccicheck. A patch has been proposed, but I don't know whether it is upstream. julia ___ Cocci mailing list Cocci@systeme.lip6.fr https://systeme.lip6.fr/mailman/listinfo/cocci
Re: [Cocci] coccinelle issues
On Sun, 2020-06-14 at 10:43 +0200, Julia Lawall wrote: > > What is your Linux distribution? openSUSE Leap-15.1 ___ Cocci mailing list Cocci@systeme.lip6.fr https://systeme.lip6.fr/mailman/listinfo/cocci
Re: [Cocci] coccinelle issues
On Sun, 14 Jun 2020, Mike Galbraith wrote: > On Sun, 2020-06-14 at 09:42 +0200, Julia Lawall wrote: > > > > On Sun, 14 Jun 2020, Mike Galbraith wrote: > > > > > > > I didn't download, rather pulled/built. I didn't have the same issue > > > you did, but make coccicheck was a bust here until I backed down to > > > version 1.0.6. Neither HEAD, 1.0.8 or 1.0.7 ran, and following its > > > MODE=blah suggestion helped not at all. > > > > Did you get a segmentation fault? > > Nope. Turned out to be a dinky install gotcha. Creating a symlink.. > > lrwxrwxrwx 1 root root 27 Jun 14 09:40 /usr/local/coccinelle/lib -> > /usr/local/coccinelle/lib64 > > ..seems to have fixed 1.0.8 all up. The very first time I installed, I > had to create one directory (forget which) by hand as well. What is your Linux distribution? julia ___ Cocci mailing list Cocci@systeme.lip6.fr https://systeme.lip6.fr/mailman/listinfo/cocci
Re: [Cocci] coccinelle issues
On Sun, 2020-06-14 at 10:00 +0200, Mike Galbraith wrote: > On Sun, 2020-06-14 at 09:57 +0200, Mike Galbraith wrote: > > On Sun, 2020-06-14 at 09:42 +0200, Julia Lawall wrote: > > > > > > On Sun, 14 Jun 2020, Mike Galbraith wrote: > > > > > > > > > > I didn't download, rather pulled/built. I didn't have the same issue > > > > you did, but make coccicheck was a bust here until I backed down to > > > > version 1.0.6. Neither HEAD, 1.0.8 or 1.0.7 ran, and following its > > > > MODE=blah suggestion helped not at all. > > > > > > Did you get a segmentation fault? > > > > Nope. Turned out to be a dinky install gotcha. Creating a symlink.. > > > > lrwxrwxrwx 1 root root 27 Jun 14 09:40 /usr/local/coccinelle/lib -> > > /usr/local/coccinelle/lib64 > > > > ..seems to have fixed 1.0.8 all up. The very first time I installed, I > > had to create one directory (forget which) by hand as well. > > Oh well, not all fixed up, but it does run. > > ./fs/xfs/xfs_rmap_item.c:56:5-24: atomic_dec_and_test variation before object > free at line 57. > ./kernel/nsproxy.c:253:11-30: atomic_dec_and_test variation before object > free at line 254. > ./net/unix/scm.c:80:6-30: atomic_dec_and_test variation before object free at > line 81. > coccicheck failed > make: *** [Makefile:1822: coccicheck] Error 2 And doing the DEBUG_FILE="all.err" thing says... /usr/local/bin/spatch -D report --no-show-diff --very-quiet --cocci-file ./scripts/coccinelle/api/alloc/alloc_cast.cocci --no-includes --include-headers --dir . -I ./arch/x86/include -I ./arch/x86/include/generated -I ./include -I ./arc> 12712 files match /usr/local/bin/spatch -D report --no-show-diff --very-quiet --cocci-file ./scripts/coccinelle/api/alloc/pool_zalloc-simple.cocci --no-includes --include-headers --dir . -I ./arch/x86/include -I ./arch/x86/include/generated -I ./include > 42 files match /usr/local/bin/spatch -D report --no-show-diff --very-quiet --cocci-file ./scripts/coccinelle/api/alloc/zalloc-simple.cocci --no-includes --include-headers --dir . -I ./arch/x86/include -I ./arch/x86/include/generated -I ./include -I ./> 2003 files match /usr/local/bin/spatch -D report --no-show-diff --very-quiet --cocci-file ./scripts/coccinelle/api/atomic_as_refcounter.cocci --include-headers --very-quiet --dir . -I ./arch/x86/include -I ./arch/x86/include/generated -I ./include -I ./> 502 files match /usr/local/bin/spatch -D report --no-show-diff --very-quiet --cocci-file ./scripts/coccinelle/api/check_bq27xxx_data.cocci --dir . -I ./arch/x86/include -I ./arch/x86/include/generated -I ./include -I ./arch/x86/include/uapi -I ./arch/x> File "/tmp/ocaml_cocci_c0ec37.ml", line 1: Error: The files /usr/local/coccinelle/bin/../lib/coccinelle/ocaml/coccilib.cmi and /usr/local/coccinelle/bin/../lib/coccinelle/ocaml/ast_c.cmi make inconsistent assumptions over interface Ast_c Fatal error: exception Coccinelle_modules.Yes_prepare_ocamlcocci.CompileFailure("/tmp/ocaml_cocci_c0ec37.ml") ~ ___ Cocci mailing list Cocci@systeme.lip6.fr https://systeme.lip6.fr/mailman/listinfo/cocci
Re: [Cocci] coccinelle issues
Aha, trying a fresh build/install of 1.0.7 reproduced Randy's problem.. /usr/local/bin/spatch -D report --no-show-diff --very-quiet --cocci-file ./scripts/coccinelle/api/alloc/alloc_cast.cocci --no-includes --include-headers --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 Python error: No module named coccilib.elems ..and creating /usr/local/coccinelle/lib -> /usr/local/coccinelle/lib64 fixed it up for me. Note: I configured --prefix=/usr/local/coccinelle to keep things contained, and added a couple symlinks in /usr/local/bin for the binaries. ___ Cocci mailing list Cocci@systeme.lip6.fr https://systeme.lip6.fr/mailman/listinfo/cocci
Re: [Cocci] coccinelle issues
On Sun, 2020-06-14 at 09:57 +0200, Mike Galbraith wrote: > On Sun, 2020-06-14 at 09:42 +0200, Julia Lawall wrote: > > > > On Sun, 14 Jun 2020, Mike Galbraith wrote: > > > > > > > I didn't download, rather pulled/built. I didn't have the same issue > > > you did, but make coccicheck was a bust here until I backed down to > > > version 1.0.6. Neither HEAD, 1.0.8 or 1.0.7 ran, and following its > > > MODE=blah suggestion helped not at all. > > > > Did you get a segmentation fault? > > Nope. Turned out to be a dinky install gotcha. Creating a symlink.. > > lrwxrwxrwx 1 root root 27 Jun 14 09:40 /usr/local/coccinelle/lib -> > /usr/local/coccinelle/lib64 > > ..seems to have fixed 1.0.8 all up. The very first time I installed, I > had to create one directory (forget which) by hand as well. Oh well, not all fixed up, but it does run. ./fs/xfs/xfs_rmap_item.c:56:5-24: atomic_dec_and_test variation before object free at line 57. ./kernel/nsproxy.c:253:11-30: atomic_dec_and_test variation before object free at line 254. ./net/unix/scm.c:80:6-30: atomic_dec_and_test variation before object free at line 81. coccicheck failed make: *** [Makefile:1822: coccicheck] Error 2 ___ Cocci mailing list Cocci@systeme.lip6.fr https://systeme.lip6.fr/mailman/listinfo/cocci
Re: [Cocci] coccinelle issues
On Sun, 2020-06-14 at 09:42 +0200, Julia Lawall wrote: > > On Sun, 14 Jun 2020, Mike Galbraith wrote: > > > > I didn't download, rather pulled/built. I didn't have the same issue > > you did, but make coccicheck was a bust here until I backed down to > > version 1.0.6. Neither HEAD, 1.0.8 or 1.0.7 ran, and following its > > MODE=blah suggestion helped not at all. > > Did you get a segmentation fault? Nope. Turned out to be a dinky install gotcha. Creating a symlink.. lrwxrwxrwx 1 root root 27 Jun 14 09:40 /usr/local/coccinelle/lib -> /usr/local/coccinelle/lib64 ..seems to have fixed 1.0.8 all up. The very first time I installed, I had to create one directory (forget which) by hand as well. -Mike ___ Cocci mailing list Cocci@systeme.lip6.fr https://systeme.lip6.fr/mailman/listinfo/cocci
Re: [Cocci] coccinelle issues
On Sun, 14 Jun 2020, Mike Galbraith wrote: > On Sat, 2020-06-13 at 21:07 -0700, Randy Dunlap wrote: > > Hi, > > > > OK, I've not used Coccinelle and now I am trying to use it. > > I've never used it either, or intend to really, but seeing that it > lives on github and more importantly, it's raining outside > > > It seems that I am having a few issues. > > The primary one is when I run spatch (via 'make coccicheck' in > > the kernel source tree), it tells me: > > > > Python error: No module named coccilib.elems > > > > I do see "elems.py" in /usr/local/lib64/coccinelle/python/coccilib. > > > > I am using coccinelle-master downloaded from github on > > Friday June 12, 2020. > > I didn't download, rather pulled/built. I didn't have the same issue > you did, but make coccicheck was a bust here until I backed down to > version 1.0.6. Neither HEAD, 1.0.8 or 1.0.7 ran, and following its > MODE=blah suggestion helped not at all. Did you get a segmentation fault? The MODE=blah seems to be more often than not leading to a seg fault now. It seems that the library that manages parallelism seg faults whenever the thread that it is running incurs an error at the ocaml level. julia > > No idea if 1.0.6 will work for you, but it did for me, and doesn't take > long at all to build once you get the ocaml goop it wants installed. > > Hohum, now to whack all that, and find something else to do ;-) > > -Mike > ___ > Cocci mailing list > Cocci@systeme.lip6.fr > https://systeme.lip6.fr/mailman/listinfo/cocci > ___ Cocci mailing list Cocci@systeme.lip6.fr https://systeme.lip6.fr/mailman/listinfo/cocci
Re: [Cocci] coccinelle issues
On Sat, 13 Jun 2020, Randy Dunlap wrote: > Hi, > > OK, I've not used Coccinelle and now I am trying to use it. > It seems that I am having a few issues. > The primary one is when I run spatch (via 'make coccicheck' in > the kernel source tree), it tells me: > > Python error: No module named coccilib.elems > > I do see "elems.py" in /usr/local/lib64/coccinelle/python/coccilib. > > I am using coccinelle-master downloaded from github on > Friday June 12, 2020. > > > I have also made the following notes while building/installing it. > > > Note1: The latest coccinelle tarball is not actually available > at the coccinelle home page although the kernel documentation says it is. Yes, I'm aware of this problem. We're not able to update the home page at the moment. This problem is being worked on. > > Note2: https://github.com/coccinelle/coccinelle/blob/master/install.txt > says that 'spatch' is a script, but it seems to be a binary executable > file. Actually, it is a script, and the fact that you say it is a binary may be the reason for your python problem. Normally there is a script (scripts/spatch) that make install puts in place that refers back to where your Coccinelle is installed. > Note3: https://github.com/coccinelle/coccinelle/blob/master/install.txt > probably should say to use 'sudo make install' instead of just > 'make install', just like 'coccinelle.rst' file in the kernel tree says. OK. A lot of documentation for a lot of projects seems to omit the sudo, but I have indeed never understood why. Maybe try again with make distclean, ./autogen, ./configure, sudo make install? julia > > thanks for any help that you can provide. > > -- > ~Randy > > ___ > Cocci mailing list > Cocci@systeme.lip6.fr > https://systeme.lip6.fr/mailman/listinfo/cocci > ___ Cocci mailing list Cocci@systeme.lip6.fr https://systeme.lip6.fr/mailman/listinfo/cocci
[Cocci] coccinelle issues
Hi, OK, I've not used Coccinelle and now I am trying to use it. It seems that I am having a few issues. The primary one is when I run spatch (via 'make coccicheck' in the kernel source tree), it tells me: Python error: No module named coccilib.elems I do see "elems.py" in /usr/local/lib64/coccinelle/python/coccilib. I am using coccinelle-master downloaded from github on Friday June 12, 2020. I have also made the following notes while building/installing it. Note1: The latest coccinelle tarball is not actually available at the coccinelle home page although the kernel documentation says it is. Note2: https://github.com/coccinelle/coccinelle/blob/master/install.txt says that 'spatch' is a script, but it seems to be a binary executable file. Note3: https://github.com/coccinelle/coccinelle/blob/master/install.txt probably should say to use 'sudo make install' instead of just 'make install', just like 'coccinelle.rst' file in the kernel tree says. thanks for any help that you can provide. -- ~Randy ___ Cocci mailing list Cocci@systeme.lip6.fr https://systeme.lip6.fr/mailman/listinfo/cocci
Re: [Cocci] coccinelle issues
On Sat, 2020-06-13 at 21:07 -0700, Randy Dunlap wrote: > Hi, > > OK, I've not used Coccinelle and now I am trying to use it. I've never used it either, or intend to really, but seeing that it lives on github and more importantly, it's raining outside > It seems that I am having a few issues. > The primary one is when I run spatch (via 'make coccicheck' in > the kernel source tree), it tells me: > > Python error: No module named coccilib.elems > > I do see "elems.py" in /usr/local/lib64/coccinelle/python/coccilib. > > I am using coccinelle-master downloaded from github on > Friday June 12, 2020. I didn't download, rather pulled/built. I didn't have the same issue you did, but make coccicheck was a bust here until I backed down to version 1.0.6. Neither HEAD, 1.0.8 or 1.0.7 ran, and following its MODE=blah suggestion helped not at all. No idea if 1.0.6 will work for you, but it did for me, and doesn't take long at all to build once you get the ocaml goop it wants installed. Hohum, now to whack all that, and find something else to do ;-) -Mike ___ Cocci mailing list Cocci@systeme.lip6.fr https://systeme.lip6.fr/mailman/listinfo/cocci
Re: [Cocci] Coccinelle issues with Linux kernel 4.8-rc1
ize 1 > 13 files match > Fatal error: exception Failure("Directory boolreturn used for temporary files > already exists and should be removed.") > > -bash-4.2$ /usr/local/bin/spatch -D report --no-show-diff --very-quiet > --cocci-file ./scripts/coccinelle/misc/bugon.cocci --no-includes > --include-headers --patch . --dir drivers/infiniband/hw/hfi1/ -I > ./arch/x86/include -I ./arch/x86/include/generated/uapi -I > ./arch/x86/include/generated -I ./include -I ./arch/x86/include/uapi -I > ./include/uapi -I ./include/generated/uapi --include > ./include/linux/kconfig.h --jobs 16 --chunksize 1 > 0 files match > Fatal error: exception Sys_error("bugon: No such file or directory") > > -bash-4.2$ /usr/local/bin/spatch -D report --no-show-diff --very-quiet > --cocci-file ./scripts/coccinelle/misc/cstptr.cocci --no-includes > --include-headers --patch . --dir drivers/infiniband/hw/hfi1/ -I > ./arch/x86/include -I ./arch/x86/include/generated/uapi -I > ./arch/x86/include/generated -I ./include -I ./arch/x86/include/uapi -I > ./include/uapi -I ./include/generated/uapi --include > ./include/linux/kconfig.h --jobs 16 --chunksize 1 > 3 files match > Fatal error: exception Failure("Directory cstptr used for temporary files > already exists and should be removed.") > -bash-4.2$ > > -bash-4.2$ /usr/local/bin/spatch -D report --no-show-diff --very-quiet > --cocci-file ./scripts/coccinelle/misc/doubleinit.cocci --no-includes > --include-headers --patch . --dir drivers/infiniband/hw/hfi1/ -I > ./arch/x86/include -I ./arch/x86/include/generated/uapi -I > ./arch/x86/include/generated -I ./include -I ./arch/x86/include/uapi -I > ./include/uapi -I ./include/generated/uapi --include > ./include/linux/kconfig.h --jobs 16 --chunksize 1 > Fatal error: exception Failure("Directory doubleinit used for temporary files > already exists and should be removed.") > > -bash-4.2$ /usr/local/bin/spatch -D report --no-show-diff --very-quiet > --cocci-file ./scripts/coccinelle/misc/of_table.cocci --include-headers > --patch . --dir drivers/infiniband/hw/hfi1/ -I ./arch/x86/include -I > ./arch/x86/include/generated/uapi -I ./arch/x86/include/generated -I > ./include -I ./arch/x86/include/uapi -I ./include/uapi -I > ./include/generated/uapi --include ./include/linux/kconfig.h --jobs 16 > --chunksize 1 > 0 files match > Fatal error: exception Sys_error("of_table: No such file or directory") > > > > > > -Original Message- > From: Julia Lawall [mailto:julia.law...@lip6.fr] > Sent: Wednesday, August 17, 2016 7:32 PM > To: Chegondi, Harish > Cc: 'cocci@systeme.lip6.fr' ; Dalessandro, Dennis > > Subject: Re: [Cocci] Coccinelle issues with Linux kernel 4.8-rc1 > > > > On Thu, 18 Aug 2016, Chegondi, Harish wrote: > > > > > Hello, > > > > > > > > With the 4.8-rc1 kernel, when I run Coccinelle check using the command > > “make coccicheck MODE=report M=”, I get “coccicheck > > failed” > > message. I get the same failure message even with “MODE=patch” in the > > command. I didn’t see this error message with 4.7 kernel. > > > > > > > > However, with the 4.8-rc1 kernel, if I turn off parallelization with > > J=1 option, I don’t see the error message. The check seem to be > > running successfully, even though it takes longer to run. I tried J=2, > > J=4,… and I got error messages. So there seem to be a problem with J not > > equal to 1. > > OK, I think it is related to the treatment of standard output and standard > error. I think that standard error is simply discarded with J=1. Could you > try giving the argument --very-quiet to Coccinelle with J > 1? > > thanks, > julia > > > > > > > > > > Below I have mentioned the spatch version and ocaml version. > > > > > > > > -bash-4.2$ spatch --version > > > > spatch version 1.0.4 with Python support and with PCRE support > > > > > > > > -bash-4.2$ ocaml > > > > OCaml version 4.02.3 > > > > > > > > > > > > > > > > Can you please let me know how can I resolve the “coccicheck failed” > > message? > > > > > > > > Thank You > > > > Harish. > > > > > > >___ Cocci mailing list Cocci@systeme.lip6.fr https://systeme.lip6.fr/mailman/listinfo/cocci
Re: [Cocci] Coccinelle issues with Linux kernel 4.8-rc1
rary files already exists and should be removed.") -bash-4.2$ -bash-4.2$ /usr/local/bin/spatch -D report --no-show-diff --very-quiet --cocci-file ./scripts/coccinelle/misc/doubleinit.cocci --no-includes --include-headers --patch . --dir drivers/infiniband/hw/hfi1/ -I ./arch/x86/include -I ./arch/x86/include/generated/uapi -I ./arch/x86/include/generated -I ./include -I ./arch/x86/include/uapi -I ./include/uapi -I ./include/generated/uapi --include ./include/linux/kconfig.h --jobs 16 --chunksize 1 Fatal error: exception Failure("Directory doubleinit used for temporary files already exists and should be removed.") -bash-4.2$ /usr/local/bin/spatch -D report --no-show-diff --very-quiet --cocci-file ./scripts/coccinelle/misc/of_table.cocci --include-headers --patch . --dir drivers/infiniband/hw/hfi1/ -I ./arch/x86/include -I ./arch/x86/include/generated/uapi -I ./arch/x86/include/generated -I ./include -I ./arch/x86/include/uapi -I ./include/uapi -I ./include/generated/uapi --include ./include/linux/kconfig.h --jobs 16 --chunksize 1 0 files match Fatal error: exception Sys_error("of_table: No such file or directory") -Original Message- From: Julia Lawall [mailto:julia.law...@lip6.fr] Sent: Wednesday, August 17, 2016 7:32 PM To: Chegondi, Harish Cc: 'cocci@systeme.lip6.fr' ; Dalessandro, Dennis Subject: Re: [Cocci] Coccinelle issues with Linux kernel 4.8-rc1 On Thu, 18 Aug 2016, Chegondi, Harish wrote: > > Hello, > > > > With the 4.8-rc1 kernel, when I run Coccinelle check using the command > “make coccicheck MODE=report M=”, I get “coccicheck failed” > message. I get the same failure message even with “MODE=patch” in the > command. I didn’t see this error message with 4.7 kernel. > > > > However, with the 4.8-rc1 kernel, if I turn off parallelization with > J=1 option, I don’t see the error message. The check seem to be > running successfully, even though it takes longer to run. I tried J=2, > J=4,… and I got error messages. So there seem to be a problem with J not > equal to 1. OK, I think it is related to the treatment of standard output and standard error. I think that standard error is simply discarded with J=1. Could you try giving the argument --very-quiet to Coccinelle with J > 1? thanks, julia > > > > Below I have mentioned the spatch version and ocaml version. > > > > -bash-4.2$ spatch --version > > spatch version 1.0.4 with Python support and with PCRE support > > > > -bash-4.2$ ocaml > > OCaml version 4.02.3 > > > > > > > > Can you please let me know how can I resolve the “coccicheck failed” > message? > > > > Thank You > > Harish. > > > ___ Cocci mailing list Cocci@systeme.lip6.fr https://systeme.lip6.fr/mailman/listinfo/cocci
Re: [Cocci] Coccinelle issues with Linux kernel 4.8-rc1
On Thu, 18 Aug 2016, Chegondi, Harish wrote: > > Hello, > > > > With the 4.8-rc1 kernel, when I run Coccinelle check using the command “make > coccicheck MODE=report M=”, I get “coccicheck failed” > message. I get the same failure message even with “MODE=patch” in the > command. I didn’t see this error message with 4.7 kernel. > > > > However, with the 4.8-rc1 kernel, if I turn off parallelization with J=1 > option, I don’t see the error message. The check seem to be running > successfully, even though it takes longer to run. I tried J=2, J=4,… and I > got error messages. So there seem to be a problem with J not equal to 1. Concretely, this seems to be how to give extra arguments to Coccinelle: # You can use SPFLAGS to append extra arguments to coccicheck or override any # heuristics done in this file as Coccinelle accepts the last options when # options conflict. julia > > > > Below I have mentioned the spatch version and ocaml version. > > > > -bash-4.2$ spatch --version > > spatch version 1.0.4 with Python support and with PCRE support > > > > -bash-4.2$ ocaml > > OCaml version 4.02.3 > > > > > > > > Can you please let me know how can I resolve the “coccicheck failed” > message? > > > > Thank You > > Harish. > > >___ Cocci mailing list Cocci@systeme.lip6.fr https://systeme.lip6.fr/mailman/listinfo/cocci
Re: [Cocci] Coccinelle issues with Linux kernel 4.8-rc1
On Thu, 18 Aug 2016, Chegondi, Harish wrote: > > Hello, > > > > With the 4.8-rc1 kernel, when I run Coccinelle check using the command “make > coccicheck MODE=report M=”, I get “coccicheck failed” > message. I get the same failure message even with “MODE=patch” in the > command. I didn’t see this error message with 4.7 kernel. > > > > However, with the 4.8-rc1 kernel, if I turn off parallelization with J=1 > option, I don’t see the error message. The check seem to be running > successfully, even though it takes longer to run. I tried J=2, J=4,… and I > got error messages. So there seem to be a problem with J not equal to 1. OK, I think it is related to the treatment of standard output and standard error. I think that standard error is simply discarded with J=1. Could you try giving the argument --very-quiet to Coccinelle with J > 1? thanks, julia > > > > Below I have mentioned the spatch version and ocaml version. > > > > -bash-4.2$ spatch --version > > spatch version 1.0.4 with Python support and with PCRE support > > > > -bash-4.2$ ocaml > > OCaml version 4.02.3 > > > > > > > > Can you please let me know how can I resolve the “coccicheck failed” > message? > > > > Thank You > > Harish. > > >___ Cocci mailing list Cocci@systeme.lip6.fr https://systeme.lip6.fr/mailman/listinfo/cocci
[Cocci] Coccinelle issues with Linux kernel 4.8-rc1
Hello, With the 4.8-rc1 kernel, when I run Coccinelle check using the command "make coccicheck MODE=report M=", I get "coccicheck failed" message. I get the same failure message even with "MODE=patch" in the command. I didn't see this error message with 4.7 kernel. However, with the 4.8-rc1 kernel, if I turn off parallelization with J=1 option, I don't see the error message. The check seem to be running successfully, even though it takes longer to run. I tried J=2, J=4,... and I got error messages. So there seem to be a problem with J not equal to 1. Below I have mentioned the spatch version and ocaml version. -bash-4.2$ spatch --version spatch version 1.0.4 with Python support and with PCRE support -bash-4.2$ ocaml OCaml version 4.02.3 Can you please let me know how can I resolve the "coccicheck failed" message? Thank You Harish. ___ Cocci mailing list Cocci@systeme.lip6.fr https://systeme.lip6.fr/mailman/listinfo/cocci