Bug 2274913 - valgrind: Missing python3 build dependency?
Summary: valgrind: Missing python3 build dependency?
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: valgrind
Version: 40
Hardware: Unspecified
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Mark Wielaard
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2024-04-13 13:59 UTC by Florian Weimer
Modified: 2024-04-13 15:55 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2024-04-13 15:11:31 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Florian Weimer 2024-04-13 13:59:01 UTC
I see this in the build log for valgrind-3.22.0-7.fc40:

-- Running  tests in cachegrind/tests ----------------------------------
ann-diff1:       valgrind   --cachegrind-out-file=cachegrind.out ./../../tests/true 
sh: line 1: python3: command not found
post check failed: python3 ../cg_diff --mod-funcname="s/main/MAIN/" ann1.cgout ann1b.cgout > ann-diff1.cgout && python3 ../cg_annotate --mod-filename="s/a.c/A.c/" --mod-funcname s/MAIN/Main/ ann-diff1.cgout

https://kojipkgs.fedoraproject.org//packages/valgrind/3.22.0/7.fc40/data/logs/x86_64/build.log

Reproducible: Always

Comment 1 Mark Wielaard 2024-04-13 15:11:31 UTC
Thanks for spotting this. Dunno how we missed this before. Fixed in rawhide.

commit 1cabfb854f3ba203673a27e673dfc63b6291bbf6 (HEAD -> rawhide)
Author: Mark Wielaard <mjw>
Date:   Sat Apr 13 16:59:09 2024 +0200

    Add BuildRequires: python3-devel
    
    For running the testsuite.
    Some of the python scripts require python 3.9+
    
    https://bugzilla.redhat.com/show_bug.cgi?id=2274913

Comment 2 Florian Weimer 2024-04-13 15:22:47 UTC
I'm not entirely sure, but /usr/bin/python3 is usually obtained through python3, python3-devel is for building Python extension modules (which could still be relevant to valgrind, but perhaps not?).

Comment 3 Mark Wielaard 2024-04-13 15:43:59 UTC
(In reply to Florian Weimer from comment #2)
> I'm not entirely sure, but /usr/bin/python3 is usually obtained through
> python3, python3-devel is for building Python extension modules (which could
> still be relevant to valgrind, but perhaps not?).

According to https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_buildrequire_python3_devel every package that uses Python (at runtime and/or build time) must explicitly include BuildRequires: python3-devel in its .spec file. It explains that the *-devel package brings in relevant RPM macros.

Comment 4 Florian Weimer 2024-04-13 15:55:38 UTC
You are right, of course. In glibc.spec, we have:

# We use python for the microbenchmarks and locale data regeneration
# from unicode sources (carried out manually). We choose python3
# explicitly because it supports both use cases.  On some
# distributions, python3 does not actually install /usr/bin/python3,
# so we also depend on python3-devel.
BuildRequires: python3 python3-devel


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