Bug 2167481

Summary: python-cradox: relies on implicit function declarations due to python3-setuptools usage
Product: [Fedora] Fedora Reporter: Florian Weimer <fweimer>
Component: python-cradoxAssignee: Javier Peña <jpena>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: jpena
Target Milestone: ---Keywords: FutureFeature
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: python-setuptools-67.6.1-1.fc39 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-04-21 09:58:38 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 2153037    
Bug Blocks: 2137512    

Description Florian Weimer 2023-02-06 18:16:44 UTC
This package runs into bug 2153037 during its build:

ceph_version_map = collections.OrderedDict(sorted({
    "hammer": "rados_pool_get_base_tier",
    "jewel": "rados_inconsistent_pg_list",
    "kraken": "rados_aio_exec",
    "luminous": "rados_read_op_omap_get_keys2",
}.items(), key=lambda t: t[0]))
[…]
def setup_hook(cmd_obj, version=None):
    if version == "latest":
        version = sorted(ceph_version_map.keys())[-1]
    elif version is None:
        comp = ccompiler.new_compiler(force=True, verbose=True)
        for potential_version, method in ceph_version_map.items():
            msg = "* checking for librados >= %s (with function %s)" % (
                potential_version, method)
            log(msg)
            found = comp.has_function(method, libraries=['rados'])
            if found:
                version = potential_version
                log("%s done: FOUND" % msg)
            else:
                log("%s done: NOT FOUND" % msg)
                break

        if not version:
            raise Exception("gcc, python-dev, librados2 or "
                            "librados-dev >= 0.80 are missing")
[…]

For these functions, upstream CCompiler.has_function only works in (strict) C99 mode if the function can be called without any parameters.

So far, upstream has been unwilling to fix this. A downstream-only fix in the Fedora package will necessarily be partial because many use cases consume the upstream version using pip. So maybe this package should move off has_function.

Comment 1 Florian Weimer 2023-02-06 18:18:01 UTC
Hah, and just as I write this, https://github.com/pypa/distutils/pull/195 is merged, so there is some movement after all.

Comment 2 Ben Cotton 2023-02-07 15:08:42 UTC
This bug appears to have been reported against 'rawhide' during the Fedora Linux 38 development cycle.
Changing version to 38.