Skip to content

Appending '-L' flags to the rustc command is not possible, preventing sysroot-like library resolution #745

@codyps

Description

@codyps

I'm running into this with yocto/openembedded:

  • oe supplies a sysroot containing a bunch of native libs and normally adjusts LDFLAGS to point gcc at it.
  • We can adjust the linker via .cargo/config to include the specified LDFLAGS, however
  • rustc also appears to do it's own library resolution prior to linking, and doesn't know about any of the extra paths passed via the linker argument, and bails out with something like:

error: could not find native static libraryz, perhaps an -L flag is missing?

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-linkageArea: linker issues, dylib, cdylib, shared libraries, so

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions