Skip to content

Cannot load library: Cannot load library PCBUSB: dlopen(PCBUSB, 0x0005) #25

@Pepe424

Description

@Pepe424

When using the PeakCAN plugin from QtSerialBus on macOS, the plugin fails to load the required PCBUSB dynamic library.

By default, the PCBUSB driver installs to:

/usr/local/lib

However, Qt 6.8 attempts to load the library from several locations, including:

... '/usr/lib/PCBUSB' (no such file, not in dyld cache)

Since PCBUSB is not installed under /usr/lib, the PeakCAN plugin fails to load unless manual workarounds are applied.

To make the plugin work, I have to manually add a symlink to the bundled library:

  • either inside the app bundle, e.g.:

MyApp.app/Contents/Frameworks/libPCBUSB.dylib

  • or next to the application binary during local development.

At the moment it is unclear what the correct long-term solution should be:
• Should the PCBUSB driver installer be updated to place the dylib somewhere Qt can find it?
• Should QtSerialBus / PeakCAN be patched to include /usr/local/lib or another search path?

Summary

The PeakCAN plugin currently does not locate libPCBUSB.dylib in its default installation directory on macOS, which forces manual symlink creation during development and deployment.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions