Skip to content

Unix port: ffilib.py: libc.so.6 is no longer the latest version #962

Open
@hiway

Description

@hiway

While using os.popen() from unix-ffi libraries on FreeBSD 14.1-RELEASE-p5 amd64, I encountered this error:

...
  File "os/__init__.py", line 32, in <module>
  File "ffilib.py", line 43, in libc
  File "ffilib.py", line 39, in open
  File "ffilib.py", line 33, in open
OSError: [Errno 2] ENOENT

On further investigation, I found that libc major version has been upgraded to 7, and ffilib.py is only looking for versions up to 6.

$ ls /lib/libc.so*
/lib/libc.so.7

return open("libc", 6)

Changing the 6 to 7 fixed the issue.

Only making a note here since the readme for unix-ffi says: "This directory is unmaintained." and I would like to have a reference come up in searches when someone encounters the error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions