Skip to content

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

Closed
@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.

Activity

changed the title [-]Simple cargo project with signal-hook does not build on AIX[/-] [+]Simple cargo project with signal-hook v0.3.17 does not build on AIX[/+] on May 9, 2025
amy-kwan

amy-kwan commented on May 9, 2025

@amy-kwan
Author
vorner

vorner commented on May 9, 2025

@vorner
Owner

Sorry, I've overlooked that part of the #169 went into the source code of the top-level crate, I've assumed all the changes were localized to the underlying signal-hook-registry.

Just released a 0.3.18.

amy-kwan

amy-kwan commented on May 9, 2025

@amy-kwan
Author

Thank you so much, @vorner!
I can confirm that signal-hook v0.3.18 is able to build on AIX. :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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

        Participants

        @vorner@amy-kwan

        Issue actions

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