Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cross fails targets x86_64-sun-solaris, x86_64-pc-solaris; *cannot find value O_DIRECT* #354

Open
jtmoon79 opened this issue Dec 1, 2024 · 0 comments
Labels
bug Something isn't working dependencies Pull requests that update a dependency file good first issue Good for newcomers P2 less important

Comments

@jtmoon79
Copy link
Owner

jtmoon79 commented Dec 1, 2024

Problem

cross fails to build targets x86_64-sun-solaris and x86_64-pc-solaris.

Failure

$ cross check --locked --lib --bins --target x86_64-pc-solaris
...
   Compiling kinded_macros v0.3.0
error[E0425]: cannot find value `O_DIRECT` in crate `libc`
   --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/nix-0.29.0/src/fcntl.rs:113:9
    |
113 |         O_DIRECT;
    |         ^^^^^^^^ not found in `libc`

error[E0425]: cannot find value `SIGINFO` in crate `libc`
    --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/nix-0.29.0/src/sys/signal.rs:119:9
     |
119  |         SIGINFO,
     |         ^^^^^^^
     |
    ::: /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libc-0.2.164/src/unix/solarish/mod.rs:1285:1
     |
1285 | pub const SIGINT: ::c_int = 2;
     | ------------------------- similarly named constant `SIGINT` defined here
     |
help: a constant with a similar name exists
     |
119  |         SIGINT,
     |         ~~~~~~
help: consider importing this unit variant
     |
6    + use crate::sys::signal::Signal::SIGINFO;
     |

error[E0531]: cannot find unit struct, unit variant or constant `SIGINFO` in crate `libc`
    --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/nix-0.29.0/src/sys/signal.rs:119:9
     |
119  |         SIGINFO,
     |         ^^^^^^^
     |
    ::: /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libc-0.2.164/src/unix/solarish/mod.rs:1285:1
     |
1285 | pub const SIGINT: ::c_int = 2;
     | ------------------------- similarly named constant `SIGINT` defined here
     |
help: a constant with a similar name exists
     |
119  |         SIGINT,
     |         ~~~~~~
help: consider importing this unit variant
     |
6    + use crate::sys::signal::Signal::SIGINFO;
     |

    Checking hashbrown v0.14.2
error[E0081]: discriminant value `8` assigned more than once
   --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/nix-0.29.0/src/macros.rs:131:9
    |
131 | /         $v enum $BitFlags {
132 | |             $($entries)*
133 | |         }
    | |_________^
...
255 |                   $entry = libc::$entry,
    |                            ------------
    |                            |
    |                            `8` assigned here
    |                            `8` assigned here
    |
   ::: /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/nix-0.29.0/src/sys/signal.rs:28:1
    |
28  | / libc_enum! {
29  | |     /// Types of operating system signals
30  | |     // Currently there is only one definition of c_int in libc, as well as only one
31  | |     // type for signal constants.
...   |
121 | |     impl TryFrom<i32>
122 | | }
    | |_- in this macro invocation
    |
    = note: this error originates in the macro `libc_enum` (in Nightly build)

To Reproduce

$ rustup target add x86_64-pc-solaris
$ cross check --locked --lib --bins --target x86_64-pc-solaris

or use target x86_64-sun-solaris.

Environment:

  • Ubuntu 22.04
  • rust 1.73.0

Solution

These cross builds are commented out. See 7eed267 and 786b154 .

Waiting on an updated nix that includes nix-rust/nix#2544 .

Relates to

@jtmoon79 jtmoon79 added the bug Something isn't working label Dec 1, 2024
@jtmoon79 jtmoon79 changed the title cross fails targets x86_64-sun-solaris, x86_64-pc-solaris; cannot find value O_DIRECT cross fails targets x86_64-sun-solaris, x86_64-pc-solaris; _cannot find value O_DIRECT_ Dec 1, 2024
@jtmoon79 jtmoon79 changed the title cross fails targets x86_64-sun-solaris, x86_64-pc-solaris; _cannot find value O_DIRECT_ cross fails targets x86_64-sun-solaris, x86_64-pc-solaris; *cannot find value O_DIRECT* Dec 1, 2024
@jtmoon79 jtmoon79 added good first issue Good for newcomers P2 less important dependencies Pull requests that update a dependency file labels Dec 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working dependencies Pull requests that update a dependency file good first issue Good for newcomers P2 less important
Projects
None yet
Development

No branches or pull requests

1 participant