Skip to content

Build fails if zlib is not installed in default location, despite being available through pkg-config #169

@Tyg13

Description

@Tyg13

As reported in rust-lang#69552, building this crate fails if zlib.h is not available on search path for the invoked compiler. This can obviously be worked around by setting DEP_Z_INCLUDE to the path containing said file, but (as the opener of that issue mentioned), the required include path would be available via pkg-config.

A few things:

  1. It might be useful to check pkg-config in the case that DEP_Z_INCLUDE is unset, to avoid this issue in the future.
  2. Better error reporting might be helpful, for when this crate is compiled as a dependency. I'm not overly familiar with how build.rs scripts work, but perhaps a test compile with an error message saying "Hey set DEP_Z_INCLUDE so libssh2-sys can find zlib.h" would be helpful.

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