Broken build with rust bindings (without --enable-tests)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

Bartosz pointed me to a build breakage with Rust bindings, which I am
not able to fix and looking for help from other Rust experts here.

The failure:

$ ./autogen.sh --enable-bindings-rust && make

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


Reasoning:

There are three crates available in bindings/rust
- libgpiod-sys
- gpiosim-sys (depends on gpiosim C lib, which builds only with "./autogen.sh --enable-tests")
- libgpiod (uses gpiosim-sys as a dev-dependency, but required only for "cargo test")

I earlier thought that if I am doing "cargo build" without "--tests"
or "--examples", then dev-dependencies are not built. I was wrong.

The dev-dependencies are not passed on to the user crates, like
vhost-device, but are always built if you do a local "cargo build",
but since the C gpiosim library was never built, we fail to find it
here.

Question:

How do I build a {dev-}dependency (gpiosim-sys) only if tests are
being built as well ?

-- 
viresh



[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux