Skip to content

Add libmlir_apfloat_wrappers to Catalyst wheels#2478

Merged
maliasadi merged 5 commits into
mainfrom
fix_apflout
Feb 11, 2026
Merged

Add libmlir_apfloat_wrappers to Catalyst wheels#2478
maliasadi merged 5 commits into
mainfrom
fix_apflout

Conversation

@maliasadi

@maliasadi maliasadi commented Feb 11, 2026

Copy link
Copy Markdown
Member

Context:
✔️ : checked the suite.

After upgrading to a newer version of LLVM #2415, Catalyst make all wheels and Linux wheels fail due to a missing so library:

self = <CDLL '/tmp/circuit_qpe62labp8b/circuit_qpe.so', handle 0 at 0x7fbac5827690>
name = '/tmp/circuit_qpe62labp8b/circuit_qpe.so', mode = 0, handle = None
use_errno = False, use_last_error = False, winmode = None

    def __init__(self, name, mode=DEFAULT_MODE, handle=None,
                 use_errno=False,
                 use_last_error=False,
                 winmode=None):
        self._name = name
        flags = self._func_flags_
        if use_errno:
            flags |= _FUNCFLAG_USE_ERRNO
        if use_last_error:
            flags |= _FUNCFLAG_USE_LASTERROR
        if _sys.platform.startswith("aix"):
            """When the name contains ".a(" and ends with ")",
               e.g., "libFOO.a(libFOO.so)" - this is taken to be an
               archive(member) syntax for dlopen(), and the mode is adjusted.
               Otherwise, name is presented to dlopen() as a file argument.
            """
            if name and name.endswith(")") and ".a(" in name:
                mode |= ( _os.RTLD_MEMBER | _os.RTLD_NOW )
        if _os.name == "nt":
            if winmode is not None:
                mode = winmode
            else:
                import nt
                mode = nt._LOAD_LIBRARY_SEARCH_DEFAULT_DIRS
                if '/' in name or '\\' in name:
                    self._name = nt._getfullpathname(self._name)
                    mode |= nt._LOAD_LIBRARY_SEARCH_DLL_LOAD_DIR
    
        class _FuncPtr(_CFuncPtr):
            _flags_ = flags
            _restype_ = self._func_restype_
        self._FuncPtr = _FuncPtr
    
        if handle is None:
>           self._handle = _dlopen(self._name, mode)
                           ^^^^^^^^^^^^^^^^^^^^^^^^^
E           OSError: libmlir_apfloat_wrappers.so.22.0git: cannot open shared object file: No such file or directory

Description of the Change:

Benefits:

  • Fixes Catalyst 0.45-dev wheels

Possible Drawbacks:

Related GitHub Issues:
[sc-111530]

@maliasadi maliasadi added the author:build-wheels Run the wheel building workflows on this Pull Request label Feb 11, 2026
@maliasadi maliasadi marked this pull request as ready for review February 11, 2026 15:50

@mehrdad2m mehrdad2m left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great find @maliasadi! Thank you

Comment thread Makefile
@maliasadi maliasadi removed the author:build-wheels Run the wheel building workflows on this Pull Request label Feb 11, 2026

@LuisAlfredoNu LuisAlfredoNu left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @maliasadi
I hope that the CIs being green

@maliasadi maliasadi merged commit 382e4e1 into main Feb 11, 2026
47 of 51 checks passed
@maliasadi maliasadi deleted the fix_apflout branch February 11, 2026 21:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants