Skip to content

lv_timer crashes when libc.so.6 is not present #377

@basvd

Description

@basvd

When libc.so.6 is not present on the system, lv_timer triggers an OSError exception or even a hard crash (segfault). This dependency is unnecessarily specific, because alternative implementations of libc (such as uClibc-ng) are also compatible.

micropython-lib/unix-ffi provides a nice way to load the library, but I am not sure if this module is always available to the bindings. In any case, the code (in driver\linux\lv_timer.py) would look like this:

import ffilib

# FFI libraries

libc = ffilib.libc()
try:
    librt = ffilib.open("librt")
except OSError as e:
    librt = libc

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