Bug 2139716 - coccinelle fails to run on Fedora 37
Summary: coccinelle fails to run on Fedora 37
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: coccinelle
Version: 37
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Richard W.M. Jones
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-11-03 10:06 UTC by Maxime Ripard
Modified: 2022-11-03 12:27 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-11-03 12:27:19 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Maxime Ripard 2022-11-03 10:06:41 UTC
The spatch executable, version 1.1.1, fails to run on Fedora 37

$ spatch --recursive-includes -sp_file /tmp/tmpw4wrzv0v.cocci drivers/clk/clk-apple-nco.c
init_defs_builtins: /usr/local/bin/../lib/coccinelle/standard.h
Py.find_library: unable to find the Python library [/lib64/libpython3.11.so.1.0 returned Cannot resolve _Py_fopen.
]

It seems to be related to https://bugzilla.redhat.com/show_bug.cgi?id=1912931 but affects Python 3.11

Comment 1 Richard W.M. Jones 2022-11-03 10:44:41 UTC
I don't think I'm able to reproduce this in a simple test:

$ spatch --recursive-includes -sp_file /dev/null /var/tmp/test.c 
init_defs_builtins: /usr/lib64/coccinelle/standard.h
unexpected code before the first rule: [0; (69, ("", [0], [0]))]

What version of python3 & python3-libs is installed?

Comment 2 Richard W.M. Jones 2022-11-03 11:11:49 UTC
I changed the RPM to use the forge macros so there's a new build
for Rawhide and F37.  Please try those out:

https://koji.fedoraproject.org/koji/taskinfo?taskID=93739751
https://koji.fedoraproject.org/koji/taskinfo?taskID=93739766

Comment 3 Maxime Ripard 2022-11-03 12:27:19 UTC
I didn't notice but I had an earlier build installed in /usr/local/ which was the buggy one. Removing it and actually using the one from the package works just fine.

Sorry for the noise.


Note You need to log in before you can comment on or make changes to this bug.