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

feat: add aarch64-unknown-freebsd image #1271

Merged
merged 4 commits into from
Sep 14, 2023
Merged

feat: add aarch64-unknown-freebsd image #1271

merged 4 commits into from
Sep 14, 2023

Conversation

YOU54F
Copy link
Contributor

@YOU54F YOU54F commented May 30, 2023

👋🏾

Thanks for Cross, we've been using it at the pact-foundation to build cross platform targets, and I've gone through the target list and attempted to build for everything I can. See PR here

I've managed to build for freebsd in a parallels vm on a mac m1 pro, but makes sense to try and apply that to a Docker image.

Relates to #975

Still requires testing but thought I would drop it here for others to have a look at / test / try out

@Emilgardis Emilgardis added container-images A-bsd Area: BSD-family targets labels May 30, 2023
@Emilgardis
Copy link
Member

looks good!

bors try --target aarch64-unknown-freebsd

bors bot added a commit that referenced this pull request May 30, 2023
@YOU54F
Copy link
Contributor Author

YOU54F commented May 30, 2023

Oh man that bot is SUPER COOL!

@Emilgardis
Copy link
Member

Emilgardis commented May 30, 2023

oh yeah, you need to fix the formatting error before it'll run the actual target tests.

edit: nevermind, seems I was wrong :), forgot how it works

Yes, it's been quite useful for the "not rocket science" rule, unfortunately we have to move away from it soon but we can still implement similar "try this specific thing" with whatever we do, since it's really just implemented with our xtask binary here

@YOU54F
Copy link
Contributor Author

YOU54F commented May 30, 2023

ta, have updated the clippy check now :)

ty for the links to the bot code, useful to know.

@bors
Copy link
Contributor

bors bot commented May 30, 2023

try

Build failed:

os = "ubuntu-latest"
cpp = true
dylib = true
std = true
Copy link
Member

@Emilgardis Emilgardis Jun 14, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the ci test failed with

     Checking foo v0.1.0 (/home/runner/work/cross/cross/target/tmp/tmp.pcmLAmfkzI)
     Running `rustc --crate-name foo --edition=2021 tmp.pcmLAmfkzI/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type lib --emit=dep-info,metadata -C embed-bitcode=no -C debuginfo=2 -C metadata=12b0d6c0320165c1 -C extra-filename=-12b0d6c0320165c1 --out-dir /target/aarch64-unknown-freebsd/debug/deps --target aarch64-unknown-freebsd -C linker=aarch64-unknown-freebsd12-gcc.sh -L dependency=/target/aarch64-unknown-freebsd/debug/deps -L dependency=/target/debug/deps`
error[E0463]: can't find crate for `core`
  |
  = note: the `aarch64-unknown-freebsd` target may not be installed
  = help: consider downloading the target with `rustup target add aarch64-unknown-freebsd`

error[E0463]: can't find crate for `compiler_builtins`

For more information about this error, try `rustc --explain E0463`.
error: could not compile `foo` due to 2 previous errors

Caused by:
  process didn't exit successfully: `rustc --crate-name foo --edition=2021 tmp.pcmLAmfkzI/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type lib --emit=dep-info,metadata -C embed-bitcode=no -C debuginfo=2 -C metadata=12b0d6c0320165c1 -C extra-filename=-12b0d6c0320165c1 --out-dir /target/aarch64-unknown-freebsd/debug/deps --target aarch64-unknown-freebsd -C linker=aarch64-unknown-freebsd12-gcc.sh -L dependency=/target/aarch64-unknown-freebsd/debug/deps -L dependency=/target/debug/deps` (exit status: 1)
+ rustup component list --toolchain stable-x86_64-unknown-linux-gnu
[cross] warning: rust-std is not available for aarch64-unknown-freebsd
[cross] note: you may need to build components for the target via `-Z build-std=<components>` or in your cross configuration specify `target.aarch64-unknown-freebsd.build-std`
              the available components are core, std, alloc, and proc_macro
Error: Process completed with exit code 101.

I do not understand why though, this is the check for if the target needs to be installed or not, and for some reason rust-std-aarch-unknown-freebsd is not found here

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah, it's tier 3, thought it was t2, can you add build-std = true to the target

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$ rustup component add rust-std-aarch64-unknown-freebsd --toolchain stable-x86_64-unknown-linux-gnu
error: toolchain 'stable-x86_64-unknown-linux-gnu' does not contain component 'rust-std-aarch64-unknown-freebsd' for target 'x86_64-unknown-linux-gnu'
note: not all platforms have the standard library pre-compiled: https://doc.rust-lang.org/nightly/rustc/platform-support.html

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey thanks for digging in @Emilgardis

Sorry I've been away on leave for a couple of weeks, and been catching up with other stuff, have kicked that off with build-std = true now

@Emilgardis
Copy link
Member

bors try --target aarch64-unknown-freebsd

bors bot added a commit that referenced this pull request Jul 11, 2023
@bors
Copy link
Contributor

bors bot commented Jul 11, 2023

try

Build succeeded!

The publicly hosted instance of bors-ng is deprecated and will go away soon.

If you want to self-host your own instance, instructions are here.
For more help, visit the forum.

If you want to switch to GitHub's built-in merge queue, visit their help page.

@YOU54F
Copy link
Contributor Author

YOU54F commented Jul 11, 2023

oooh thanks @Emilgardis looking goood. Right just need to sort the changelog error out now 🙌🏾

@YOU54F YOU54F marked this pull request as ready for review September 13, 2023 12:52
@YOU54F YOU54F requested a review from a team as a code owner September 13, 2023 12:52
@YOU54F
Copy link
Contributor Author

YOU54F commented Sep 13, 2023

I'm not entirely sure what I need to do to pass this check https://github.com/cross-rs/cross/actions/runs/6172725113/job/16753549505?pr=1271

+ echo 'Must add or remove changes or add the '\''no changelog'\'' label'
+ exit 1
Must add or remove changes or add the 'no changelog' label

I assume the previous step should have picked up a diff from the main branch that I am targeting?

@Emilgardis
Copy link
Member

see https://github.com/cross-rs/cross/blob/main/.changes/README.md for how to add a changelog entry!

@YOU54F
Copy link
Contributor Author

YOU54F commented Sep 13, 2023

awesome, thanks for the pointer. that is neat as-well!

Copy link
Member

@Emilgardis Emilgardis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me!

Can you please remove the merge commits?

should be something like

$ git fetch upstream
...
$ git rebase -i upstream/main
# make sure that there's 4 commits in the list

@Emilgardis Emilgardis added the no-ci-targets PRs that do not affect any cross-compilation targets. label Sep 14, 2023
Copy link
Member

@Emilgardis Emilgardis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

bors r+

@bors
Copy link
Contributor

bors bot commented Sep 14, 2023

Build succeeded!

The publicly hosted instance of bors-ng is deprecated and will go away soon.

If you want to self-host your own instance, instructions are here.
For more help, visit the forum.

If you want to switch to GitHub's built-in merge queue, visit their help page.

@bors bors bot merged commit b3085a1 into cross-rs:main Sep 14, 2023
23 checks passed
@Emilgardis
Copy link
Member

@YOU54F
Copy link
Contributor Author

YOU54F commented Sep 15, 2023

Ok, so maybe this is just me being, stupid, but I've tried using this and it's failing - on a m1 macbook pro

installed latest cross cargo install cross --git https://github.com/cross-rs/cross trying to build one of our rust projects

https://github.com/pact-foundation/pact-reference/tree/master/rust/pact_ffi

this is suspect - amd64

🕙14:11:27 ❯ cross build --target aarch64-unknown-freebsd
warning: patch for `onig` uses the features mechanism. default-features and features will not take effect because the patch dependency does not support this mechanism
<jemalloc>: MADV_DONTNEED does not work (memset will be used instead)
<jemalloc>: (This is the expected behaviour if you are running under QEMU)
<jemalloc>: MADV_DONTNEED does not work (memset will be used instead)
<jemalloc>: (This is the expected behaviour if you are running under QEMU)
<jemalloc>: MADV_DONTNEED does not work (memset will be used instead)
<jemalloc>: (This is the expected behaviour if you are running under QEMU)
<jemalloc>: MADV_DONTNEED does not work (memset will be used instead)
<jemalloc>: (This is the expected behaviour if you are running under QEMU)
<jemalloc>: MADV_DONTNEED does not work (memset will be used instead)
<jemalloc>: (This is the expected behaviour if you are running under QEMU)
   Compiling libc v0.2.147
<jemalloc>: MADV_DONTNEED does not work (memset will be used instead)
<jemalloc>: (This is the expected behaviour if you are running under QEMU)
   Compiling cfg-if v1.0.0
<jemalloc>: MADV_DONTNEED does not work (memset will be used instead)
<jemalloc>: MADV_DONTNEED does not work (memset will be used instead)
<jemalloc>: (This is the expected behaviour if you are running under QEMU)
<jemalloc>: (This is the expected behaviour if you are running under QEMU)
error[E0463]: can't find crate for `core`
  |
  = note: the `aarch64-unknown-freebsd` target may not be installed
  = help: consider downloading the target with `rustup target add aarch64-unknown-freebsd`

error[E0463]: can't find crate for `compiler_builtins`

For more information about this error, try `rustc --explain E0463`.
error: could not compile `cfg-if` (lib) due to 2 previous errors
warning: build failed, waiting for other jobs to finish...
error[E0432]: unresolved import `ffi::c_void`
    --> /Users/yousaf.nabi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libc-0.2.147/src/unix/mod.rs:1604:17
     |
1604 |         pub use ::ffi::c_void;
     |                 ^^^^^^^^^^^^^

error: cannot find attribute `derive` in this scope
  --> /Users/yousaf.nabi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libc-0.2.147/src/unix/mod.rs:44:38
   |
44 | #[cfg_attr(feature = "extra_traits", derive(Debug))]
   |                                      ^^^^^^

error: cannot find attribute `derive` in this scope
   --> /Users/yousaf.nabi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libc-0.2.147/src/macros.rs:74:50
    |
74  |               #[cfg_attr(feature = "extra_traits", derive(Debug, Eq, Hash, PartialEq))]
    |                                                    ^^^^^^
    |
   ::: /Users/yousaf.nabi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libc-0.2.147/src/unix/mod.rs:54:1
    |
54  | / s! {
55  | |     pub struct group {
56  | |         pub gr_name: *mut ::c_char,
57  | |         pub gr_passwd: *mut ::c_char,
...   |
206 | |     }
207 | | }
    | |_- in this macro invocation
    |
    = note: this error originates in the macro `s` (in Nightly builds, run with -Z macro-backtrace for more info)

error: cannot find attribute `derive` in this scope
   --> /Users/yousaf.nabi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libc-0.2.147/src/unix/mod.rs:422:38
    |
422 | #[cfg_attr(feature = "extra_traits", derive(Debug))]
    |                                      ^^^^^^

error: cannot find attribute `derive` in this scope
   --> /Users/yousaf.nabi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libc-0.2.147/src/unix/mod.rs:430:38
    |
430 | #[cfg_attr(feature = "extra_traits", derive(Debug))]
    |                                      ^^^^^^

error: cannot find attribute `derive` in this scope
   --> /Users/yousaf.nabi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libc-0.2.147/src/macros.rs:74:50
    |
74  |               #[cfg_attr(feature = "extra_traits", derive(Debug, Eq, Hash, PartialEq))]
    |                                                    ^^^^^^
    |
   ::: /Users/yousaf.nabi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libc-0.2.147/src/unix/bsd/mod.rs:10:1
    |
10  | / s! {
11  | |     pub struct sockaddr {
12  | |         pub sa_len: u8,
13  | |         pub sa_family: sa_family_t,
...   |
124 | |     }
125 | | }
    | |_- in this macro invocation
    |
    = note: this error originates in the macro `s` (in Nightly builds, run with -Z macro-backtrace for more info)

error: cannot find attribute `derive` in this scope
  --> /Users/yousaf.nabi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libc-0.2.147/src/unix/bsd/freebsdlike/mod.rs:56:38
   |
56 | #[cfg_attr(feature = "extra_traits", derive(Debug))]
   |                                      ^^^^^^

error: cannot find attribute `derive` in this scope
   --> /Users/yousaf.nabi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libc-0.2.147/src/macros.rs:74:50
    |
74  |               #[cfg_attr(feature = "extra_traits", derive(Debug, Eq, Hash, PartialEq))]
    |                                                    ^^^^^^
    |
   ::: /Users/yousaf.nabi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libc-0.2.147/src/unix/bsd/freebsdlike/mod.rs:87:1
    |
87  | / s! {
88  | |     pub struct in_addr {
89  | |         pub s_addr: ::in_addr_t,
90  | |     }
...   |
382 | |     }
383 | | }
    | |_- in this macro invocation
    |
    = note: this error originates in the macro `s` (in Nightly builds, run with -Z macro-backtrace for more info)

error: cannot find attribute `derive` in this scope
  --> /Users/yousaf.nabi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libc-0.2.147/src/unix/bsd/freebsdlike/freebsd/mod.rs:51:38
   |
51 | #[cfg_attr(feature = "extra_traits", derive(Debug, Hash, PartialEq, Eq))]
   |                                      ^^^^^^

error: cannot find attribute `derive` in this scope
  --> /Users/yousaf.nabi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libc-0.2.147/src/unix/bsd/freebsdlike/freebsd/mod.rs:66:38
   |
66 | #[cfg_attr(feature = "extra_traits", derive(Debug, Hash, PartialEq, Eq))]
   |                                      ^^^^^^

error: cannot find attribute `derive` in this scope
  --> /Users/yousaf.nabi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libc-0.2.147/src/unix/bsd/freebsdlike/freebsd/mod.rs:82:38
   |
82 | #[cfg_attr(feature = "extra_traits", derive(Debug, Hash, PartialEq, Eq))]
   |                                      ^^^^^^

error: cannot find attribute `derive` in this scope
  --> /Users/yousaf.nabi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libc-0.2.147/src/unix/bsd/freebsdlike/freebsd/mod.rs:97:38
   |
97 | #[cfg_attr(feature = "extra_traits", derive(Debug, Hash, PartialEq, Eq))]
   |                                      ^^^^^^

error: cannot find attribute `derive` in this scope
   --> /Users/yousaf.nabi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libc-0.2.147/src/unix/bsd/freebsdlike/freebsd/mod.rs:112:38
    |
112 | #[cfg_attr(feature = "extra_traits", derive(Debug, Hash, PartialEq, Eq))]
    |                                      ^^^^^^

error: cannot find attribute `derive` in this scope
   --> /Users/yousaf.nabi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libc-0.2.147/src/unix/bsd/freebsdlike/freebsd/mod.rs:133:38
    |
133 | #[cfg_attr(feature = "extra_traits", derive(Debug, Hash, PartialEq, Eq))]
    |                                      ^^^^^^

error: cannot find attribute `derive` in this scope
   --> /Users/yousaf.nabi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libc-0.2.147/src/unix/bsd/freebsdlike/freebsd/mod.rs:165:38
    |
165 | #[cfg_attr(feature = "extra_traits", derive(Debug, Hash, PartialEq, Eq))]
    |                                      ^^^^^^

error: cannot find attribute `derive` in this scope
   --> /Users/yousaf.nabi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libc-0.2.147/src/unix/bsd/freebsdlike/freebsd/mod.rs:222:38
    |
222 | #[cfg_attr(feature = "extra_traits", derive(Debug, Hash, PartialEq, Eq))]
    |                                      ^^^^^^

error: cannot find attribute `derive` in this scope
    --> /Users/yousaf.nabi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libc-0.2.147/src/macros.rs:74:50
     |
74   |               #[cfg_attr(feature = "extra_traits", derive(Debug, Eq, Hash, PartialEq))]
     |                                                    ^^^^^^
     |
    ::: /Users/yousaf.nabi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libc-0.2.147/src/unix/bsd/freebsdlike/freebsd/mod.rs:237:1
     |
237  | / s! {
238  | |     pub struct aiocb {
239  | |         pub aio_fildes: ::c_int,
240  | |         pub aio_offset: ::off_t,
...    |
1321 | |     }
1322 | | }
     | |_- in this macro invocation
     |
     = note: this error originates in the macro `s` (in Nightly builds, run with -Z macro-backtrace for more info)

error: cannot find attribute `derive` in this scope
    --> /Users/yousaf.nabi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libc-0.2.147/src/unix/bsd/freebsdlike/freebsd/mod.rs:2573:38
     |
2573 | #[cfg_attr(feature = "extra_traits", derive(Debug))]
     |                                      ^^^^^^

error: cannot find attribute `derive` in this scope
   --> /Users/yousaf.nabi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libc-0.2.147/src/macros.rs:74:50
    |
74  |               #[cfg_attr(feature = "extra_traits", derive(Debug, Eq, Hash, PartialEq))]
    |                                                    ^^^^^^
    |
   ::: /Users/yousaf.nabi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libc-0.2.147/src/unix/bsd/freebsdlike/freebsd/freebsd11/mod.rs:10:1
    |
10  | / s! {
11  | |     pub struct kevent {
12  | |         pub ident: ::uintptr_t,
13  | |         pub filter: ::c_short,
...   |
211 | |     }
212 | | }
    | |_- in this macro invocation
    |
    = note: this error originates in the macro `s` (in Nightly builds, run with -Z macro-backtrace for more info)

error: cannot find attribute `derive` in this scope
 --> /Users/yousaf.nabi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libc-0.2.147/src/unix/bsd/freebsdlike/freebsd/freebsd11/b64.rs:2:38
  |
2 | #[cfg_attr(feature = "extra_traits", derive(Debug, Eq, Hash, PartialEq))]
  |                                      ^^^^^^

error: cannot find attribute `derive` in this scope
  --> /Users/yousaf.nabi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libc-0.2.147/src/macros.rs:74:50
   |
74 |               #[cfg_attr(feature = "extra_traits", derive(Debug, Eq, Hash, PartialEq))]
   |                                                    ^^^^^^
   |
  ::: /Users/yousaf.nabi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libc-0.2.147/src/unix/align.rs:1:1
   |
1  | / s! {
2  | |     #[repr(align(4))]
3  | |     pub struct in6_addr {
4  | |         pub s6_addr: [u8; 16],
5  | |     }
6  | | }
   | |_- in this macro invocation
   |
   = note: this error originates in the macro `s` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0405]: cannot find trait `PartialEq` in this scope
   --> /Users/yousaf.nabi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libc-0.2.147/src/unix/bsd/mod.rs:161:14
    |
161 |         impl PartialEq for sockaddr_un {
    |              ^^^^^^^^^ not found in this scope

error[E0405]: cannot find trait `Eq` in this scope
   --> /Users/yousaf.nabi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libc-0.2.147/src/unix/bsd/mod.rs:173:14
    |
173 |         impl Eq for sockaddr_un {}
    |              ^^ not found in this scope

error[E0405]: cannot find trait `PartialEq` in this scope
   --> /Users/yousaf.nabi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libc-0.2.147/src/unix/bsd/mod.rs:193:14
    |
193 |         impl PartialEq for utsname {
    |              ^^^^^^^^^ not found in this scope

error[E0405]: cannot find trait `Eq` in this scope
   --> /Users/yousaf.nabi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libc-0.2.147/src/unix/bsd/mod.rs:222:14
    |
222 |         impl Eq for utsname {}
    |              ^^ not found in this scope

error[E0405]: cannot find trait `PartialEq` in this scope
   --> /Users/yousaf.nabi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libc-0.2.147/src/unix/bsd/freebsdlike/mod.rs:397:14
    |
397 |         impl PartialEq for sockaddr_storage {
    |              ^^^^^^^^^ not found in this scope

error[E0405]: cannot find trait `Eq` in this scope
   --> /Users/yousaf.nabi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libc-0.2.147/src/unix/bsd/freebsdlike/mod.rs:410:14
    |
410 |         impl Eq for sockaddr_storage {}
    |              ^^ not found in this scope

error[E0405]: cannot find trait `PartialEq` in this scope
    --> /Users/yousaf.nabi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libc-0.2.147/src/unix/bsd/freebsdlike/freebsd/mod.rs:1618:14
     |
1618 |         impl PartialEq for utmpx {
     |              ^^^^^^^^^ not found in this scope

error[E0405]: cannot find trait `Eq` in this scope
    --> /Users/yousaf.nabi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libc-0.2.147/src/unix/bsd/freebsdlike/freebsd/mod.rs:1638:14
     |
1638 |         impl Eq for utmpx {}
     |              ^^ not found in this scope

error[E0405]: cannot find trait `PartialEq` in this scope
    --> /Users/yousaf.nabi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libc-0.2.147/src/unix/bsd/freebsdlike/freebsd/mod.rs:1667:14
     |
1667 |         impl PartialEq for __c_anonymous_cr_pid {
     |              ^^^^^^^^^ not found in this scope

error[E0405]: cannot find trait `Eq` in this scope
    --> /Users/yousaf.nabi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libc-0.2.147/src/unix/bsd/freebsdlike/freebsd/mod.rs:1673:14
     |
1673 |         impl Eq for __c_anonymous_cr_pid {}
     |              ^^ not found in this scope

error[E0405]: cannot find trait `PartialEq` in this scope
    --> /Users/yousaf.nabi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libc-0.2.147/src/unix/bsd/freebsdlike/freebsd/mod.rs:1689:14
     |
1689 |         impl PartialEq for xucred {
     |              ^^^^^^^^^ not found in this scope

error[E0405]: cannot find trait `Eq` in this scope
    --> /Users/yousaf.nabi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libc-0.2.147/src/unix/bsd/freebsdlike/freebsd/mod.rs:1704:14
     |
1704 |         impl Eq for xucred {}
     |              ^^ not found in this scope

error[E0405]: cannot find trait `PartialEq` in this scope
    --> /Users/yousaf.nabi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libc-0.2.147/src/unix/bsd/freebsdlike/freebsd/mod.rs:1733:14
     |
1733 |         impl PartialEq for sockaddr_dl {
     |              ^^^^^^^^^ not found in this scope

error[E0405]: cannot find trait `Eq` in this scope
    --> /Users/yousaf.nabi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libc-0.2.147/src/unix/bsd/freebsdlike/freebsd/mod.rs:1749:14
     |
1749 |         impl Eq for sockaddr_dl {}
     |              ^^ not found in this scope

error[E0405]: cannot find trait `PartialEq` in this scope
    --> /Users/yousaf.nabi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libc-0.2.147/src/unix/bsd/freebsdlike/freebsd/mod.rs:1777:14
     |
1777 |         impl PartialEq for mq_attr {
     |              ^^^^^^^^^ not found in this scope

error[E0405]: cannot find trait `Eq` in this scope
    --> /Users/yousaf.nabi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libc-0.2.147/src/unix/bsd/freebsdlike/freebsd/mod.rs:1785:14
     |
1785 |         impl Eq for mq_attr {}
     |              ^^ not found in this scope

error[E0405]: cannot find trait `PartialEq` in this scope
    --> /Users/yousaf.nabi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libc-0.2.147/src/unix/bsd/freebsdlike/freebsd/mod.rs:1805:14
     |
1805 |         impl PartialEq for sigevent {
     |              ^^^^^^^^^ not found in this scope

error[E0405]: cannot find trait `Eq` in this scope
    --> /Users/yousaf.nabi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libc-0.2.147/src/unix/bsd/freebsdlike/freebsd/mod.rs:1814:14
     |
1814 |         impl Eq for sigevent {}
     |              ^^ not found in this scope

error[E0405]: cannot find trait `PartialEq` in this scope
    --> /Users/yousaf.nabi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libc-0.2.147/src/unix/bsd/freebsdlike/freebsd/mod.rs:1835:14
     |
1835 |         impl PartialEq for ptsstat {
     |              ^^^^^^^^^ not found in this scope

error[E0405]: cannot find trait `Eq` in this scope
    --> /Users/yousaf.nabi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libc-0.2.147/src/unix/bsd/freebsdlike/freebsd/mod.rs:1843:14
     |
1843 |         impl Eq for ptsstat {}
     |              ^^ not found in this scope

error[E0405]: cannot find trait `PartialEq` in this scope
    --> /Users/yousaf.nabi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libc-0.2.147/src/unix/bsd/freebsdlike/freebsd/mod.rs:1864:14
     |
1864 |         impl PartialEq for __c_anonymous_elf32_auxv_union {
     |              ^^^^^^^^^ not found in this scope

error[E0405]: cannot find trait `Eq` in this scope
    --> /Users/yousaf.nabi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libc-0.2.147/src/unix/bsd/freebsdlike/freebsd/mod.rs:1870:14
     |
1870 |         impl Eq for __c_anonymous_elf32_auxv_union {}
     |              ^^ not found in this scope

error[E0405]: cannot find trait `PartialEq` in this scope
    --> /Users/yousaf.nabi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libc-0.2.147/src/unix/bsd/freebsdlike/freebsd/mod.rs:1886:14
     |
1886 |         impl PartialEq for Elf32_Auxinfo {
     |              ^^^^^^^^^ not found in this scope

error[E0405]: cannot find trait `Eq` in this scope
    --> /Users/yousaf.nabi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libc-0.2.147/src/unix/bsd/freebsdlike/freebsd/mod.rs:1892:14
     |
1892 |         impl Eq for Elf32_Auxinfo {}
     |              ^^ not found in this scope

error[E0405]: cannot find trait `PartialEq` in this scope
    --> /Users/yousaf.nabi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libc-0.2.147/src/unix/bsd/freebsdlike/freebsd/mod.rs:1912:14
     |
1912 |         impl PartialEq for __c_anonymous_ifr_ifru {
     |              ^^^^^^^^^ not found in this scope

error[E0405]: cannot find trait `Eq` in this scope
    --> /Users/yousaf.nabi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libc-0.2.147/src/unix/bsd/freebsdlike/freebsd/mod.rs:1934:14
     |
1934 |         impl Eq for __c_anonymous_ifr_ifru {}
     |              ^^ not found in this scope

error[E0405]: cannot find trait `PartialEq` in this scope
    --> /Users/yousaf.nabi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libc-0.2.147/src/unix/bsd/freebsdlike/freebsd/mod.rs:1978:14
     |
1978 |         impl PartialEq for ifreq {
     |              ^^^^^^^^^ not found in this scope

error[E0405]: cannot find trait `Eq` in this scope
    --> /Users/yousaf.nabi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libc-0.2.147/src/unix/bsd/freebsdlike/freebsd/mod.rs:1983:14
     |
1983 |         impl Eq for ifreq {}
     |              ^^ not found in this scope

error[E0405]: cannot find trait `Eq` in this scope
    --> /Users/yousaf.nabi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libc-0.2.147/src/unix/bsd/freebsdlike/freebsd/mod.rs:2000:14
     |
2000 |         impl Eq for __c_anonymous_ifc_ifcu {}
     |              ^^ not found in this scope

error[E0405]: cannot find trait `PartialEq` in this scope
    --> /Users/yousaf.nabi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libc-0.2.147/src/unix/bsd/freebsdlike/freebsd/mod.rs:2003:14
     |
2003 |         impl PartialEq for __c_anonymous_ifc_ifcu {
     |              ^^^^^^^^^ not found in this scope

error[E0405]: cannot find trait `PartialEq` in this scope
    --> /Users/yousaf.nabi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libc-0.2.147/src/unix/bsd/freebsdlike/freebsd/mod.rs:2030:14
     |
2030 |         impl PartialEq for ifstat {
     |              ^^^^^^^^^ not found in this scope

error[E0405]: cannot find trait `Eq` in this scope
    --> /Users/yousaf.nabi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libc-0.2.147/src/unix/bsd/freebsdlike/freebsd/mod.rs:2038:14
     |
2038 |         impl Eq for ifstat {}
     |              ^^ not found in this scope

error[E0405]: cannot find trait `PartialEq` in this scope
    --> /Users/yousaf.nabi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libc-0.2.147/src/unix/bsd/freebsdlike/freebsd/mod.rs:2056:14
     |
2056 |         impl PartialEq for ifrsskey {
     |              ^^^^^^^^^ not found in this scope

error[E0405]: cannot find trait `Eq` in this scope
    --> /Users/yousaf.nabi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libc-0.2.147/src/unix/bsd/freebsdlike/freebsd/mod.rs:2068:14
     |
2068 |         impl Eq for ifrsskey {}
     |              ^^ not found in this scope

error[E0405]: cannot find trait `PartialEq` in this scope
    --> /Users/yousaf.nabi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libc-0.2.147/src/unix/bsd/freebsdlike/freebsd/mod.rs:2092:14
     |
2092 |         impl PartialEq for ifdownreason {
     |              ^^^^^^^^^ not found in this scope

error[E0405]: cannot find trait `Eq` in this scope
    --> /Users/yousaf.nabi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libc-0.2.147/src/unix/bsd/freebsdlike/freebsd/mod.rs:2103:14
     |
2103 |         impl Eq for ifdownreason {}
     |              ^^ not found in this scope

error[E0405]: cannot find trait `PartialEq` in this scope
    --> /Users/yousaf.nabi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libc-0.2.147/src/unix/bsd/freebsdlike/freebsd/mod.rs:2126:14
     |
2126 |         impl PartialEq for __c_anonymous_ifi_epoch {
     |              ^^^^^^^^^ not found in this scope

error[E0405]: cannot find trait `Eq` in this scope
    --> /Users/yousaf.nabi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libc-0.2.147/src/unix/bsd/freebsdlike/freebsd/mod.rs:2135:14
     |
2135 |         impl Eq for __c_anonymous_ifi_epoch {}
     |              ^^ not found in this scope

error[E0405]: cannot find trait `PartialEq` in this scope
    --> /Users/yousaf.nabi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libc-0.2.147/src/unix/bsd/freebsdlike/freebsd/mod.rs:2156:14
     |
2156 |         impl PartialEq for __c_anonymous_ifi_lastchange {
     |              ^^^^^^^^^ not found in this scope

error[E0405]: cannot find trait `Eq` in this scope
    --> /Users/yousaf.nabi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libc-0.2.147/src/unix/bsd/freebsdlike/freebsd/mod.rs:2165:14
     |
2165 |         impl Eq for __c_anonymous_ifi_lastchange {}
     |              ^^ not found in this scope

error[E0405]: cannot find trait `PartialEq` in this scope
    --> /Users/yousaf.nabi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libc-0.2.147/src/unix/bsd/freebsdlike/freebsd/mod.rs:2185:14
     |
2185 |         impl PartialEq for if_data {
     |              ^^^^^^^^^ not found in this scope

error[E0405]: cannot find trait `Eq` in this scope
    --> /Users/yousaf.nabi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libc-0.2.147/src/unix/bsd/freebsdlike/freebsd/mod.rs:2214:14
     |
2214 |         impl Eq for if_data {}
     |              ^^ not found in this scope

error[E0405]: cannot find trait `PartialEq` in this scope
    --> /Users/yousaf.nabi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libc-0.2.147/src/unix/bsd/freebsdlike/freebsd/mod.rs:2276:14
     |
2276 |         impl PartialEq for sctphdr {
     |              ^^^^^^^^^ not found in this scope

error[E0405]: cannot find trait `Eq` in this scope
    --> /Users/yousaf.nabi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libc-0.2.147/src/unix/bsd/freebsdlike/freebsd/mod.rs:2284:14
     |
2284 |         impl Eq for sctphdr {}
     |              ^^ not found in this scope

error[E0405]: cannot find trait `PartialEq` in this scope
    --> /Users/yousaf.nabi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libc-0.2.147/src/unix/bsd/freebsdlike/freebsd/mod.rs:2304:14
     |
2304 |         impl PartialEq for sctp_chunkhdr {
     |              ^^^^^^^^^ not found in this scope

error[E0405]: cannot find trait `Eq` in this scope
    --> /Users/yousaf.nabi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libc-0.2.147/src/unix/bsd/freebsdlike/freebsd/mod.rs:2311:14
     |
2311 |         impl Eq for sctp_chunkhdr {}
     |              ^^ not found in this scope

error[E0405]: cannot find trait `PartialEq` in this scope
    --> /Users/yousaf.nabi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libc-0.2.147/src/unix/bsd/freebsdlike/freebsd/mod.rs:2329:14
     |
2329 |         impl PartialEq for sctp_paramhdr {
     |              ^^^^^^^^^ not found in this scope

error[E0405]: cannot find trait `Eq` in this scope
    --> /Users/yousaf.nabi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libc-0.2.147/src/unix/bsd/freebsdlike/freebsd/mod.rs:2335:14
     |
2335 |         impl Eq for sctp_paramhdr {}
     |              ^^ not found in this scope

error[E0405]: cannot find trait `PartialEq` in this scope
    --> /Users/yousaf.nabi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libc-0.2.147/src/unix/bsd/freebsdlike/freebsd/mod.rs:2351:14
     |
2351 |         impl PartialEq for sctp_gen_error_cause {
     |              ^^^^^^^^^ not found in this scope

error[E0405]: cannot find trait `Eq` in this scope
    --> /Users/yousaf.nabi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libc-0.2.147/src/unix/bsd/freebsdlike/freebsd/mod.rs:2358:14
     |
2358 |         impl Eq for sctp_gen_error_cause {}
     |              ^^ not found in this scope

error[E0405]: cannot find trait `PartialEq` in this scope
    --> /Users/yousaf.nabi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libc-0.2.147/src/unix/bsd/freebsdlike/freebsd/mod.rs:2376:14
     |
2376 |         impl PartialEq for sctp_error_cause {
     |              ^^^^^^^^^ not found in this scope

error[E0405]: cannot find trait `Eq` in this scope
    --> /Users/yousaf.nabi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libc-0.2.147/src/unix/bsd/freebsdlike/freebsd/mod.rs:2382:14
     |
2382 |         impl Eq for sctp_error_cause {}
     |              ^^ not found in this scope

error[E0405]: cannot find trait `PartialEq` in this scope
    --> /Users/yousaf.nabi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libc-0.2.147/src/unix/bsd/freebsdlike/freebsd/mod.rs:2398:14
     |
2398 |         impl PartialEq for sctp_error_invalid_stream {
     |              ^^^^^^^^^ not found in this scope

error[E0405]: cannot find trait `Eq` in this scope
    --> /Users/yousaf.nabi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libc-0.2.147/src/unix/bsd/freebsdlike/freebsd/mod.rs:2404:14
     |
2404 |         impl Eq for sctp_error_invalid_stream {}
     |              ^^ not found in this scope

error[E0405]: cannot find trait `PartialEq` in this scope
    --> /Users/yousaf.nabi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libc-0.2.147/src/unix/bsd/freebsdlike/freebsd/mod.rs:2420:14
     |
2420 |         impl PartialEq for sctp_error_missing_param {
     |              ^^^^^^^^^ not found in this scope

error[E0405]: cannot find trait `Eq` in this scope
    --> /Users/yousaf.nabi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libc-0.2.147/src/unix/bsd/freebsdlike/freebsd/mod.rs:2427:14
     |
2427 |         impl Eq for sctp_error_missing_param {}
     |              ^^ not found in this scope

error[E0405]: cannot find trait `PartialEq` in this scope
    --> /Users/yousaf.nabi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libc-0.2.147/src/unix/bsd/freebsdlike/freebsd/mod.rs:2445:14
     |
2445 |         impl PartialEq for sctp_error_stale_cookie {
     |              ^^^^^^^^^ not found in this scope

error[E0405]: cannot find trait `Eq` in this scope
    --> /Users/yousaf.nabi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libc-0.2.147/src/unix/bsd/freebsdlike/freebsd/mod.rs:2451:14
     |
2451 |         impl Eq for sctp_error_stale_cookie {}
     |              ^^ not found in this scope

error[E0405]: cannot find trait `PartialEq` in this scope
    --> /Users/yousaf.nabi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libc-0.2.147/src/unix/bsd/freebsdlike/freebsd/mod.rs:2467:14
     |
2467 |         impl PartialEq for sctp_error_out_of_resource {
     |              ^^^^^^^^^ not found in this scope

error[E0405]: cannot find trait `Eq` in this scope
    --> /Users/yousaf.nabi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libc-0.2.147/src/unix/bsd/freebsdlike/freebsd/mod.rs:2472:14
     |
2472 |         impl Eq for sctp_error_out_of_resource {}
     |              ^^ not found in this scope

error[E0405]: cannot find trait `PartialEq` in this scope
    --> /Users/yousaf.nabi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libc-0.2.147/src/unix/bsd/freebsdlike/freebsd/mod.rs:2486:14
     |
2486 |         impl PartialEq for sctp_error_unresolv_addr {
     |              ^^^^^^^^^ not found in this scope

error[E0405]: cannot find trait `Eq` in this scope
    --> /Users/yousaf.nabi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libc-0.2.147/src/unix/bsd/freebsdlike/freebsd/mod.rs:2491:14
     |
2491 |         impl Eq for sctp_error_unresolv_addr {}
     |              ^^ not found in this scope

error[E0405]: cannot find trait `PartialEq` in this scope
    --> /Users/yousaf.nabi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libc-0.2.147/src/unix/bsd/freebsdlike/freebsd/mod.rs:2505:14
     |
2505 |         impl PartialEq for sctp_error_unrecognized_chunk {
     |              ^^^^^^^^^ not found in this scope

error[E0405]: cannot find trait `Eq` in this scope
    --> /Users/yousaf.nabi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libc-0.2.147/src/unix/bsd/freebsdlike/freebsd/mod.rs:2511:14
     |
2511 |         impl Eq for sctp_error_unrecognized_chunk {}
     |              ^^ not found in this scope

error[E0405]: cannot find trait `PartialEq` in this scope
    --> /Users/yousaf.nabi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libc-0.2.147/src/unix/bsd/freebsdlike/freebsd/mod.rs:2527:14
     |
2527 |         impl PartialEq for sctp_error_no_user_data {
     |              ^^^^^^^^^ not found in this scope

error[E0405]: cannot find trait `Eq` in this scope
    --> /Users/yousaf.nabi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libc-0.2.147/src/unix/bsd/freebsdlike/freebsd/mod.rs:2533:14
     |
2533 |         impl Eq for sctp_error_no_user_data {}
     |              ^^ not found in this scope

error[E0405]: cannot find trait `PartialEq` in this scope
    --> /Users/yousaf.nabi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libc-0.2.147/src/unix/bsd/freebsdlike/freebsd/mod.rs:2549:14
     |
2549 |         impl PartialEq for sctp_error_auth_invalid_hmac {
     |              ^^^^^^^^^ not found in this scope

error[E0405]: cannot find trait `Eq` in this scope
    --> /Users/yousaf.nabi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libc-0.2.147/src/unix/bsd/freebsdlike/freebsd/mod.rs:2555:14
     |
2555 |         impl Eq for sctp_error_auth_invalid_hmac {}
     |              ^^ not found in this scope

error[E0405]: cannot find trait `PartialEq` in this scope
   --> /Users/yousaf.nabi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libc-0.2.147/src/unix/bsd/freebsdlike/freebsd/freebsd11/mod.rs:265:14
    |
265 |         impl PartialEq for statfs {
    |              ^^^^^^^^^ not found in this scope

error[E0405]: cannot find trait `Eq` in this scope
   --> /Users/yousaf.nabi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libc-0.2.147/src/unix/bsd/freebsdlike/freebsd/freebsd11/mod.rs:297:14
    |
297 |         impl Eq for statfs {}
    |              ^^ not found in this scope

error[E0405]: cannot find trait `PartialEq` in this scope
   --> /Users/yousaf.nabi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libc-0.2.147/src/unix/bsd/freebsdlike/freebsd/freebsd11/mod.rs:346:14
    |
346 |         impl PartialEq for dirent {
    |              ^^^^^^^^^ not found in this scope

error[E0405]: cannot find trait `Eq` in this scope
   --> /Users/yousaf.nabi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libc-0.2.147/src/unix/bsd/freebsdlike/freebsd/freebsd11/mod.rs:359:14
    |
359 |         impl Eq for dirent {}
    |              ^^ not found in this scope

error[E0405]: cannot find trait `PartialEq` in this scope
   --> /Users/yousaf.nabi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libc-0.2.147/src/unix/bsd/freebsdlike/freebsd/freebsd11/mod.rs:381:14
    |
381 |         impl PartialEq for vnstat {
    |              ^^^^^^^^^ not found in this scope

error[E0405]: cannot find trait `Eq` in this scope
   --> /Users/yousaf.nabi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libc-0.2.147/src/unix/bsd/freebsdlike/freebsd/freebsd11/mod.rs:396:14
    |
396 |         impl Eq for vnstat {}
    |              ^^ not found in this scope

error[E0405]: cannot find trait `PartialEq` in this scope
  --> /Users/yousaf.nabi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libc-0.2.147/src/unix/bsd/freebsdlike/freebsd/aarch64.rs:49:14
   |
49 |         impl PartialEq for gpregs {
   |              ^^^^^^^^^ not found in this scope

error[E0405]: cannot find trait `Eq` in this scope
  --> /Users/yousaf.nabi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libc-0.2.147/src/unix/bsd/freebsdlike/freebsd/aarch64.rs:59:14
   |
59 |         impl Eq for gpregs {}
   |              ^^ not found in this scope

error[E0405]: cannot find trait `PartialEq` in this scope
  --> /Users/yousaf.nabi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libc-0.2.147/src/unix/bsd/freebsdlike/freebsd/aarch64.rs:82:14
   |
82 |         impl PartialEq for fpregs {
   |              ^^^^^^^^^ not found in this scope

error[E0405]: cannot find trait `Eq` in this scope
  --> /Users/yousaf.nabi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libc-0.2.147/src/unix/bsd/freebsdlike/freebsd/aarch64.rs:91:14
   |
91 |         impl Eq for fpregs {}
   |              ^^ not found in this scope

error[E0405]: cannot find trait `PartialEq` in this scope
   --> /Users/yousaf.nabi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libc-0.2.147/src/unix/bsd/freebsdlike/freebsd/aarch64.rs:112:14
    |
112 |         impl PartialEq for mcontext_t {
    |              ^^^^^^^^^ not found in this scope

error[E0405]: cannot find trait `Eq` in this scope
   --> /Users/yousaf.nabi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libc-0.2.147/src/unix/bsd/freebsdlike/freebsd/aarch64.rs:121:14
    |
121 |         impl Eq for mcontext_t {}
    |              ^^ not found in this scope

Some errors have detailed explanations: E0405, E0432, E0463.
For more information about an error, try `rustc --explain E0405`.
error: could not compile `libc` (lib) due to 274 previous errors
[cross] warning: rust-std is not available for aarch64-unknown-freebsd
[cross] note: you may need to build components for the target via `-Z build-std=<components>` or in your cross configuration specify `target.aarch64-unknown-freebsd.build-std`
              the available components are core, std, alloc, and proc_macro

pact-reference/rust/pact_ffi on  master@origin:master is 📦 v0.4.9 via △ via 🦀 v1.71.0 on ☁️  (eu-west-2) took 14s
🕙14:11:46 [🔴 101] ❯

@Emilgardis
Copy link
Member

Emilgardis commented Sep 15, 2023

You need to specify that you want std, cross wont automatically build it for you, follow the suggestion

you may need to build components for the target via -Z build-std=<components> or in your cross configuration specify target.aarch64-unknown-freebsd.build-std
the available components are core, std, alloc, and proc_macro

@YOU54F
Copy link
Contributor Author

YOU54F commented Sep 15, 2023

Thanks I thought so, I tried that, however my initial issue was staring me in the face, I wasn't actually using the nightly channel

https://rust-lang.github.io/rustup/concepts/channels.html#working-with-nightly-rust

tl;dr: rustup default nightly

I assumed that the std component was already in the docker image, that we've created and pushed!

building now 🤞🏾 with cross build -Z build-std=std,core --target aarch64-unknown-freebsd = success 🚀

Screenshot 2023-09-15 at 17 30 34 Screenshot 2023-09-15 at 17 30 09

@Emilgardis
Copy link
Member

Emilgardis commented Sep 15, 2023

Thanks I thought so, I tried that, however my initial issue was staring me in the face, I wasn't actually using the nightly channel

Ah! Great

https://rust-lang.github.io/rustup/concepts/channels.html#working-with-nightly-rust

tl;dr: rustup default nightly

cross +nightly command

Would have also worked

I assumed that the std component was already in the docker image, that we've created and pushed!

Common misconception, we dont ship anything related to rust in the images, only tools needed to cross compile, you bring the rust toolchain, crosss images provides the cross-tools, docker/podman/the container engine brings it together using your local rust toolchain and the images. Use -v to see the docker and rustup invocations we do

@YOU54F
Copy link
Contributor Author

YOU54F commented Sep 15, 2023

Consider me taught now! I will spread the word far and wide - I'm due to write a few blog posts of virtualisation, and some fun with cross, cross-compiling, so will make sure these tips are in there!

Nice tip with the +nightly command and also using -v to checkout the invocations.

Just to follow up for others who might want to use the image.

I dedicated all 10 cpus from an m1 pro 16" to docker and 4gb memory.

Debug build took 5 mins, Release build took 19 mins.

Build sizes below

347M	pact_verifier_cli_aarch64_freebsd_debug
 24M	pact_verifier_cli_aarch64_freebsd_release

These posts are useful for setting up a freebsd vm with UTM

Thanks again for the support on this

@Emilgardis Emilgardis added this to the v0.3.0 milestone Nov 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-bsd Area: BSD-family targets container-images no-ci-targets PRs that do not affect any cross-compilation targets.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants