Skip to content

Running a binary built by cargo fails due to missing libraries; but cargo running it works #47931

Closed
@staktrace

Description

@staktrace

STR (using latest stable rust 1.23.0 on Ubuntu 16.04):

  1. Clone the cbindgen repo (current master is 270491f)
  2. Build it using cargo build --release
  3. Run it by running target/release/cbindgen
  4. Run it by running cargo run --release

Expected:
step 3 and step 4 both run the binary without errors

Actual:
Step 4 runs the binary. But step 3 produces this error:

target/release/cbindgen: error while loading shared libraries: libproc_macro-6572f0cb64bf7b5a.so: cannot open shared object file: No such file or directory

That .so file doesn't appear in the target directory.

/cc @eqrion who was seeing this also.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-linkageArea: linking into static, shared libraries and binariesC-bugCategory: This is a bug.T-cargoRelevant to the cargo team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions