`cargo test` from workspace root no longer runs on MacOS
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 55/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- rust
- Domain
- build-system
Research direction
Start by reproducing the reported cargo test failure from the workspace root and the targeted cargo t -p opteadm and cargo t -p opte-ioctl commands. Inspect how these packages pull in libnet and platform-specific libraries; done means workspace-root tests no longer attempt to link unavailable illumos libraries on macOS.
Written by the indexing model from the issue text.
Description
More of an inconvenience than anything else, since cargo test invocations from lib/oxide-vpc and lib/opte function well enough. The problem packages appear to be opteadm and opte-ioctl:
kyle@Mac opte % cargo t -p opteadm
Compiling bitflags v2.11.0
Compiling serde v1.0.228
Compiling ingot-macros v0.1.1
Compiling opte v0.1.0 (/Users/kyle/gits/opte/lib/opte)
Compiling memchr v2.8.0
Compiling illumos-sys-hdrs v0.1.0 (/Users/kyle/gits/opte/crates/illumos-sys-hdrs)
Compiling rustix v1.1.4
Compiling cstr-argument v0.1.2
Compiling nvpair v0.5.0 (https://github.com/jmesmon/rust-libzfs?branch=master#ecd5a922)
Compiling postcard v1.1.3
Compiling libnet v0.1.0 (https://github.com/oxidecomputer/netadm-sys?branch=main#e9bf1e51)
Compiling terminal_size v0.4.4
Compiling clap_builder v4.6.0
Compiling ingot-types v0.1.2
Compiling clap v4.6.0
Compiling ingot v0.1.1
Compiling opte-api v0.1.0 (/Users/kyle/gits/opte/crates/opte-api)
Compiling oxide-vpc v0.1.0 (/Users/kyle/gits/opte/lib/oxide-vpc)
Compiling opte-ioctl v0.1.0 (/Users/kyle/gits/opte/lib/opte-ioctl)
Compiling opteadm v0.2.0 (/Users/kyle/gits/opte/bin/opteadm)
error: linking with `cc` failed: exit status: 1
|
= note: "cc" "/Users/kyle/gits/opte/target/debug/deps/rustcuLHeB0/symbols.o" "<4 object files omitted>" "<sysroot>/lib/rustlib/aarch64-apple-darwin/lib/{libtest-*,libgetopts-*,librustc_std_workspace_std-*}.rlib" "/Users/kyle/gits/opte/target/debug/deps/{libopteadm-365b1ba283663929,libopte_ioctl-ec73f2082b07ba92,liblibnet-1c2c77ac3d2ddb1f,libnvpair-6dc86fe845b11132,libnvpair_sys-9bd7932e5eb9f6e9,libforeign_types-3dce6089390e9620,libforeign_types_shared-77fb9b9db2cee26d,libcstr_argument-a53831ec6e13f798,libmemchr-33619545b020ef55,libdlpi-9f98e74998236a22,liblibdlpi_sys-0c8aab08c61b8bdc,librand-dbbb335a35a3fab5,libgetrandom-bd213879c05479aa,libchacha20-5649b0530d981c08,librand_core-c2ccdfcb98ff3e68,libcfg_if-6b8837d359ee828b,libwinnow-75d267d3def663a0,libsocket2-c977aadc61e7cdbb,librusty_doors-77a1a51f611d80c9,libtracing-7750d39837035b20,libpin_project_lite-3db1bee4b603df0d,libtracing_core-ca73bca8a0361545,libonce_cell-82e50bbb82b898c8,liboxnet-c359e5e1ae02009d,libnum_enum-d2b02f0c87d2cb81,libcolored-14fc39fecb288324,liboxide_vpc-ce90b18cc876a083,libuuid-895778b822d7224f,libopte-8fbafeb436cabf0b,libtabwriter-4e2e13b066b22ade,libunicode_width-5a93898b1f030899,libopte_api-edb2afa854871069,libipnetwork-c041f60fb38a281d,libpostcard-e54da477eeb68185,libcobs-31050e357a1f6c92,libthiserror-d8a2dfe6a9f0a7f4,libsmoltcp-4feb72d0fb960e40,libbitflags-40479940b6962cab,libheapless-e7bf3788707cc4b2,libhash32-b7036d40526e0211,libbyteorder-f3001c905a03ce09,libmanaged-3c5477148deded2b,libillumos_sys_hdrs-d9fd9ef250253295,libingot-b5936e350108346b,libserde-5bc39fee4fccf79c,libingot_types-90da199d45026094,libmacaddr-1bbf20022f12c91f,libzerocopy-f8047dd1e27ac2a5,libclap-b31326f050f8224c,libclap_builder-0eec8e91071de01f,libterminal_size-32742994f6403d18,librustix-882bf71fde09ecc2,libbitflags-bd56ca75dd0cc5f3,libserde_core-43790efcdeaab862,liberrno-d7eb5950cb5f3d1b,liblibc-a37d9fb37ed3dfa3,libstrsim-715d6bf37b650a64,libanstream-98c082f1caedd3b7,libanstyle_query-637a921aa6a1b79c,libis_terminal_polyfill-0c3e705e41d44585,libcolorchoice-1bb300b26935b0ed,libanstyle_parse-03cd85ddaf3adf20,libutf8parse-036f4648c4aa2008,libclap_lex-51244e83ec956518,libanstyle-13a3dfac71985607,libanyhow-94b2a8e67ceee692}.rlib" "<sysroot>/lib/rustlib/aarch64-apple-darwin/lib/{libstd-*,libpanic_unwind-*,libobject-*,libmemchr-*,libaddr2line-*,libgimli-*,libcfg_if-*,librustc_demangle-*,libstd_detect-*,libhashbrown-*,librustc_std_workspace_alloc-*,libminiz_oxide-*,libadler2-*,libunwind-*,liblibc-*,librustc_std_workspace_core-*,liballoc-*,libcore-*,libcompiler_builtins-*}.rlib" "-lkstat" "-lnvpair" "-lzfs" "-ldlpi" "-liconv" "-lSystem" "-lc" "-lm" "-arch" "arm64" "-mmacosx-version-min=11.0.0" "-L" "/usr/local/zfs/lib" "-o" "/Users/kyle/gits/opte/target/debug/deps/opteadm-5b67c1f821efffe9" "-Wl,-dead_strip" "-nodefaultlibs"
= note: some arguments are omitted. use `--verbose` to show all linker arguments
= note: ld: warning: search path '/usr/local/zfs/lib' not found
ld: library 'kstat' not found
clang: error: linker command failed with exit code 1 (use -v to see invocation)
error: could not compile `opteadm` (bin "opteadm" test) due to 1 previous error
kyle@Mac opte % cargo t -p opte-ioctl
Compiling opte v0.1.0 (/Users/kyle/gits/opte/lib/opte)
Compiling ingot v0.1.1
Compiling opte-api v0.1.0 (/Users/kyle/gits/opte/crates/opte-api)
Compiling oxide-vpc v0.1.0 (/Users/kyle/gits/opte/lib/oxide-vpc)
Compiling opte-ioctl v0.1.0 (/Users/kyle/gits/opte/lib/opte-ioctl)
error: linking with `cc` failed: exit status: 1
|
= note: "cc" "/Users/kyle/gits/opte/target/debug/deps/rustc3LJzqY/symbols.o" "<4 object files omitted>" "<sysroot>/lib/rustlib/aarch64-apple-darwin/lib/{libtest-*,libgetopts-*,librustc_std_workspace_std-*}.rlib" "/Users/kyle/gits/opte/target/debug/deps/{liblibnet-1c2c77ac3d2ddb1f,libnvpair-6dc86fe845b11132,libnvpair_sys-9bd7932e5eb9f6e9,libforeign_types-3dce6089390e9620,libforeign_types_shared-77fb9b9db2cee26d,libcstr_argument-a53831ec6e13f798,libmemchr-33619545b020ef55,libdlpi-9f98e74998236a22,liblibdlpi_sys-0c8aab08c61b8bdc,librand-dbbb335a35a3fab5,libgetrandom-bd213879c05479aa,libchacha20-5649b0530d981c08,librand_core-c2ccdfcb98ff3e68,libcfg_if-6b8837d359ee828b,libwinnow-75d267d3def663a0,libsocket2-c977aadc61e7cdbb,librusty_doors-77a1a51f611d80c9,liblibc-a37d9fb37ed3dfa3,libtracing-7750d39837035b20,libpin_project_lite-3db1bee4b603df0d,libtracing_core-ca73bca8a0361545,libonce_cell-82e50bbb82b898c8,liboxnet-c359e5e1ae02009d,libnum_enum-d2b02f0c87d2cb81,libcolored-14fc39fecb288324,liboxide_vpc-31c3ebfe7483f6a1,libuuid-895778b822d7224f,libopte-df56da2da0dbc3bf,libopte_api-8f635a500bcb24ac,libpostcard-e54da477eeb68185,libcobs-31050e357a1f6c92,libthiserror-d8a2dfe6a9f0a7f4,libsmoltcp-4feb72d0fb960e40,libbitflags-40479940b6962cab,libheapless-e7bf3788707cc4b2,libhash32-b7036d40526e0211,libbyteorder-f3001c905a03ce09,libmanaged-3c5477148deded2b,libillumos_sys_hdrs-856c3c42578e557d,libingot-cea9f51d539a38bf,libserde-5bc39fee4fccf79c,libbitflags-80d7f1945a040152,libserde_core-43790efcdeaab862,libingot_types-90da199d45026094,libmacaddr-1bbf20022f12c91f,libzerocopy-f8047dd1e27ac2a5}.rlib" "<sysroot>/lib/rustlib/aarch64-apple-darwin/lib/{libstd-*,libpanic_unwind-*,libobject-*,libmemchr-*,libaddr2line-*,libgimli-*,libcfg_if-*,librustc_demangle-*,libstd_detect-*,libhashbrown-*,librustc_std_workspace_alloc-*,libminiz_oxide-*,libadler2-*,libunwind-*,liblibc-*,librustc_std_workspace_core-*,liballoc-*,libcore-*,libcompiler_builtins-*}.rlib" "-lkstat" "-lnvpair" "-lzfs" "-ldlpi" "-liconv" "-lSystem" "-lc" "-lm" "-arch" "arm64" "-mmacosx-version-min=11.0.0" "-L" "/usr/local/zfs/lib" "-o" "/Users/kyle/gits/opte/target/debug/deps/opte_ioctl-294210b331bcbae6" "-Wl,-dead_strip" "-nodefaultlibs"
= note: some arguments are omitted. use `--verbose` to show all linker arguments
= note: ld: warning: search path '/usr/local/zfs/lib' not found
ld: library 'kstat' not found
clang: error: linker command failed with exit code 1 (use -v to see invocation)
error: could not compile `opte-ioctl` (lib test) due to 1 previous error
warning: build failed, waiting for other jobs to finish...
I suspect this has probably broken due to a cargo update on libnet (and we obviously don't have MacOS in CI). This is probably a matter of making sure that the dependency is excluded on non-illumos environments?
- Dominant language
- Rust
- Stars
- 77
- Forks
- 11
- Avg merge
- 9d 20h
- Merged PRs (30d)
- 8
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from oxidecomputer/opte
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
oxidecomputer/opte#1052 ·
-
good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
oxidecomputer/opte#341 ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
oxidecomputer/opte#1035 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
oxidecomputer/opte#996 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
oxidecomputer/opte#979 · 1 comment ·
All issues in oxidecomputer/opte
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Eynzof/Hermes-CN-Desktop#610 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
gitbutlerapp/gitbutler#15998 · 1 comment ·
-
bug triage:deciding
Difficulty 1/5 Under an hour Newbie friendliness 88/100
open-telemetry/otel-arrow#4132 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100