rust-pcap / pcap

Rust language pcap library
Apache License 2.0
595 stars 138 forks source link

macos-latest builds failing #280

Closed Wojtek242 closed 1 year ago

Wojtek242 commented 1 year ago

With the following linker error:

  = note: ld: in /Users/runner/.rustup/toolchains/1.46.0-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libstd-3704639a9502890d.rlib(lib.rmeta), archive member 'lib.rmeta' with length 4900080 is not mach-o or llvm bitcode file '/Users/runner/.rustup/toolchains/1.46.0-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libstd-3704639a9502890d.rlib'
          clang: error: linker command failed with exit code 1 (use -v to see invocation)
Wojtek242 commented 1 year ago

Probably related to M1: https://github.com/fltk-rs/fltk-rs/issues/956

No idea what a meaningful fix would be.

Wojtek242 commented 1 year ago

Appears to be an issue that needs to be solved at the compiler level: https://github.com/rust-lang/rust/issues/103044

The issue was closed only recently which means the fix will only be available in newer rust versions. Will need to adjust CI to reflect that.

Wojtek242 commented 1 year ago

Appears to be an issue that needs to be solved at the compiler level: rust-lang/rust#103044

The issue was closed only recently which means the fix will only be available in newer rust versions. Will need to adjust CI to reflect that.

Actually, it's a bit simpler than that - rust < 1.54 does not work on macos >= 12: https://rust-lang.zulipchat.com/#narrow/stream/182449-t-compiler.2Fhelp/topic/.E2.9C.94.20How.20can.20I.20fix.20Rust.201.2E53.2E0.20or.20earlier.20to.20run.20on.20macOS.2012.2E6.3F/near/299263887

As a result the PR adjusts the CI workflow to test MSRV on macos-11 only.