Bug 2167481 - python-cradox: relies on implicit function declarations due to python3-setuptools usage
Summary: python-cradox: relies on implicit function declarations due to python3-setupt...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: python-cradox
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Javier Peña
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On: 2153037
Blocks: PortingToModernCHelpNeeded
TreeView+ depends on / blocked
 
Reported: 2023-02-06 18:16 UTC by Florian Weimer
Modified: 2023-04-21 09:58 UTC (History)
1 user (show)

Fixed In Version: python-setuptools-67.6.1-1.fc39
Clone Of:
Environment:
Last Closed: 2023-04-21 09:58:38 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

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.


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