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, 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
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, 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 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