Description of problem: Semantic patches using "@script:ocaml@" result in an execution error. Version-Release number of selected component (if applicable): coccinelle-1.0.4-4.fc24 How reproducible: Always reproducible Steps to Reproduce: 1. Get the 'badzero.cocci' semantic patch file (https://github.com/torvalds/linux/blob/master/scripts/coccinelle/null/badzero.cocci), or any other valid .cocci file that uses ocaml scripting (contains "@script:ocaml@"). 2. Create a 0-length file called 'empty.c' in the same directory 3. Run '/usr/bin/spatch -D report --no-show-diff --very-quiet --cocci-file badzero.cocci empty.c' Actual results: Exit code '2', prints "Fatal error: exception Failure("OCaml scripting is unsupported. Compile spatch with OCaml version >= 3.11")" Expected results: Exit code '0', no output Additional info: It looks like ocamlfind was missing on the build system, despite ocaml-findlib-devel being listed as a build requirement in the .spec file. https://kojipkgs.fedoraproject.org//packages/coccinelle/1.0.4/4.fc24/data/logs/x86_64/build.log says "configure: ocaml scripting is disabled because it depends on ocamlfind". The build log also shows ocaml 4.02.3 was used to build, which is >= 3.11. Looks like the i686 and ARM build had a similar problem. The coccinelle 1.0.1 fc23 and 1.0.5 fc25 builds do enable ocaml scripting.
ocaml-findlib was installed in the buildroot of the latest build: https://kojipkgs.fedoraproject.org//packages/coccinelle/1.0.5/1.fc25/data/logs/x86_64/root.log and scripting was enabled in that build too: https://kojipkgs.fedoraproject.org//packages/coccinelle/1.0.5/1.fc25/data/logs/x86_64/build.log For the latest F24 build, ocamlfind was also installed: https://kojipkgs.fedoraproject.org//packages/coccinelle/1.0.4/4.fc24/data/logs/x86_64/root.log but the build (wrongly) complained that scripting was disabled because ocamlfind isn't installed: https://kojipkgs.fedoraproject.org//packages/coccinelle/1.0.4/4.fc24/data/logs/x86_64/build.log
Anyway I have updated the F24 branch to the latest Coccinelle, and that seems to fix things: http://koji.fedoraproject.org/koji/taskinfo?taskID=15704775
coccinelle-1.0.5-1.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-feadc0e655
I tried the 1.0.5 rpm, and while it did resolve the scripting error message, now I get a different error: $ /usr/bin/spatch -D report --no-show-diff --very-quiet --cocci-file badzero.cocci empty.c Fatal error: exception Yes_prepare_ocamlcocci.CompileFailure("No coccilib.cmi in /usr/lib64/coccinelle/ocaml/coccilib.cmi or /usr/lib64/coccinelle/ocaml/coccilib/coccilib.cmi") If I do a local coccinelle 1.0.5 build and 'cp ocaml/*.cmi /usr/lib64/coccinelle/ocaml/', then I can successfully run spatch with badzero.cocci
Regarding the .cmi files, 'make install-common' does install them to /usr/lib64/coccinelle/ocaml/: https://github.com/coccinelle/coccinelle/blob/1.0.5/Makefile#L341
Please try this one if it finishes building: http://koji.fedoraproject.org/koji/taskinfo?taskID=15709195
coccinelle-1.0.5-2.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2016-298075b830
The 1.0.5-2.fc24 x86_64 build works for my test case.
coccinelle-1.0.5-2.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-f0a035e115
coccinelle-1.0.5-2.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-298075b830
coccinelle-1.0.5-2.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-f0a035e115
coccinelle-1.0.5-2.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.
coccinelle-1.0.5-2.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.