Skip to content

Simple cargo project with signal-hook v0.3.17 does not build on AIX #176

@amy-kwan

Description

@amy-kwan

A simple cargo project simply including signal-hook does not build on AIX. The build failures can be reproduced in the following way:

$ cargo new my_test_project
    Creating binary (application) `my_test_project` package
note: see more `Cargo.toml` keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

$ cd my_test_project/
$ cargo add signal-hook
    Updating crates.io index
      Adding signal-hook v0.3.17 to dependencies
             Features:
             + channel
             + iterator
             - cc
             - extended-siginfo
             - extended-siginfo-raw
    Updating crates.io index
     Locking 3 packages to latest compatible versions

$ cargo build
  Downloaded signal-hook-registry v1.4.5
  Downloaded signal-hook v0.3.17
  Downloaded libc v0.2.172
  Downloaded 3 crates (860.9 KB) in 0.92s
   Compiling libc v0.2.172
   Compiling signal-hook v0.3.17
   Compiling signal-hook-registry v1.4.5
error[E0609]: no field `sa_union` on type `sigaction`
   --> /home/amyk/cargo/registry/src/index.crates.io-d11c229612889eed/signal-hook-0.3.17/src/low_level/signal_details.rs:116:20
    |
116 |             action.sa_union.__su_sigaction = mem::transmute::<
    |                    ^^^^^^^^ unknown field
    |
    = note: available fields are: `sa_sigaction`, `sa_mask`, `sa_flags`

For more information about this error, try `rustc --explain E0609`.
error: could not compile `signal-hook` (lib) due to 1 previous error
warning: build failed, waiting for other jobs to finish...

This error can be resolved with the fixes in #169, which have since been merged into signal-hook-registry v1.4.3 (and also available v1.4.4, v.1.4.5).

However, for projects that depend on the top level signal-hook crate, the latest signal-hook version is v0.3.17, which is almost two years old, and do not contain the necessary fixes that are needed on AIX. This seems like it would warrant a new version of signal-hook to include the signal-hook-registry changes.

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