Error building tests on Windows 11
sullivanmj opened this issue · 2 comments
When running cargo test
on 8019e8a, on a Windows 11 machine, there is a build error that occurs before any tests can be executed.
I don't particularly feel the need to run the tests on my Windows machine, so please don't make this a high priority on my account. With that said, if someone makes a PR that they'd like me to test, I'm happy to help out with that.
Here's the build output, run after running cargo clean
:
$ cargo test
Compiling version_check v0.9.4
Compiling proc-macro2 v1.0.56
Compiling quote v1.0.26
Compiling unicode-ident v1.0.8
Compiling memchr v2.5.0
Compiling glob v0.3.1
Compiling winapi v0.3.9
Compiling libc v0.2.142
Compiling semver v1.0.17
Compiling nom v5.1.2
Compiling bindgen v0.56.0
Compiling clang-sys v1.6.1
Compiling regex-syntax v0.7.0
Compiling autocfg v1.1.0
Compiling lazycell v1.3.0
Compiling lock_api v0.4.9
Compiling serde_derive v1.0.160
Compiling lazy_static v1.4.0
Compiling bitflags v1.3.2
Compiling shlex v0.1.1
Compiling peeking_take_while v0.1.2
Compiling rustc-hash v1.1.0
Compiling syn v2.0.15
Compiling rustc_version v0.4.0
Compiling libloading v0.7.4
Compiling log v0.4.17
Compiling scopeguard v1.1.0
Compiling serde v1.0.160
Compiling cc v1.0.79
Compiling typenum v1.16.0
Compiling heapless v0.7.16
Compiling generic-array v0.14.7
Compiling regex v1.8.0
Compiling byteorder v1.4.3
Compiling delog v0.1.6
Compiling cexpr v0.4.0
Compiling cty v0.2.2
Compiling cfg-if v1.0.0
Compiling hash32 v0.2.1
Compiling spin v0.9.8
Compiling stable_deref_trait v1.2.0
Compiling encode_unicode v0.3.6
Compiling cstr_core v0.2.6
Compiling littlefs2-sys v0.1.7
Compiling ssmarshal v1.0.0
Compiling littlefs2 v0.4.0 (C:\code\github\littlefs2.git)
error: linking with `link.exe` failed: exit code: 1169
|
= note: "C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.35.32215\\bin\\HostX64\\x64\\link.exe" "/NOLOGO" "C:\\Users\\<redacted>\\AppData\\Local\\Temp\\rustcnaTJzS\\symbols.o" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\test_serde-5e75573ae34afc83.153j7ne2ud3heohx.rcgu.o" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\test_serde-5e75573ae34afc83.1b4xia2gahcyqrkg.rcgu.o" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\test_serde-5e75573ae34afc83.1ctnhxnckfsik083.rcgu.o" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\test_serde-5e75573ae34afc83.1cu3rsew8hvp122q.rcgu.o" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\test_serde-5e75573ae34afc83.1h842hypt1qv276j.rcgu.o" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\test_serde-5e75573ae34afc83.1jzht7gdtgu68rw4.rcgu.o" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\test_serde-5e75573ae34afc83.1krcr1b34bhoayzk.rcgu.o" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\test_serde-5e75573ae34afc83.1one8hq0kurgtnzg.rcgu.o" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\test_serde-5e75573ae34afc83.1r30hl5y8hwvhr5u.rcgu.o" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\test_serde-5e75573ae34afc83.1smcsd0kyk8g6jia.rcgu.o" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\test_serde-5e75573ae34afc83.1vtr7lduac7blkwy.rcgu.o" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\test_serde-5e75573ae34afc83.1y3qocola79yttlh.rcgu.o" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\test_serde-5e75573ae34afc83.1yq3dli61cktgb0w.rcgu.o" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\test_serde-5e75573ae34afc83.2121gi68twgnhrqn.rcgu.o" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\test_serde-5e75573ae34afc83.292o2fhs5e2as5hb.rcgu.o" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\test_serde-5e75573ae34afc83.2f6x6rz7tu8x9xy6.rcgu.o" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\test_serde-5e75573ae34afc83.2iatg5i432ykwk1y.rcgu.o" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\test_serde-5e75573ae34afc83.2jgpucr8dt71u7mm.rcgu.o" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\test_serde-5e75573ae34afc83.2kwgukhb06osg2ew.rcgu.o" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\test_serde-5e75573ae34afc83.2l10i3nmp4cucyhw.rcgu.o" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\test_serde-5e75573ae34afc83.2lclw4r2b0omi8as.rcgu.o" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\test_serde-5e75573ae34afc83.2mwehc02atdqlu0t.rcgu.o" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\test_serde-5e75573ae34afc83.2qku2h1dt0r9ve3f.rcgu.o" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\test_serde-5e75573ae34afc83.2ujmx8lbha87hwkt.rcgu.o" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\test_serde-5e75573ae34afc83.30qq90a3xxnz8evr.rcgu.o" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\test_serde-5e75573ae34afc83.3deum4yfleplee9o.rcgu.o" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\test_serde-5e75573ae34afc83.3ilfishk33tr0u2t.rcgu.o" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\test_serde-5e75573ae34afc83.3iuefqyz0xo7dz1g.rcgu.o" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\test_serde-5e75573ae34afc83.3ljn187mw9yhayqg.rcgu.o" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\test_serde-5e75573ae34afc83.3pduiciuh846udnm.rcgu.o" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\test_serde-5e75573ae34afc83.3qkzfghk5an83s6k.rcgu.o" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\test_serde-5e75573ae34afc83.3r88pm5u654esmb0.rcgu.o" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\test_serde-5e75573ae34afc83.3xmrbsspd342ub6c.rcgu.o" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\test_serde-5e75573ae34afc83.46gz6atow6n38su5.rcgu.o" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\test_serde-5e75573ae34afc83.46x7gpntgqssigor.rcgu.o" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\test_serde-5e75573ae34afc83.47y5zbwogyqab7py.rcgu.o" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\test_serde-5e75573ae34afc83.4jfvul4dd5gqp4db.rcgu.o" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\test_serde-5e75573ae34afc83.4mg445n1abcg67c6.rcgu.o" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\test_serde-5e75573ae34afc83.4mggqy1fedrz08kh.rcgu.o" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\test_serde-5e75573ae34afc83.4oom95jxsoxnh6fu.rcgu.o" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\test_serde-5e75573ae34afc83.4q6555wrqi4oqz1m.rcgu.o" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\test_serde-5e75573ae34afc83.4xu9ptjk2vkh23cu.rcgu.o" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\test_serde-5e75573ae34afc83.4z9mgbc6sj7n6ltr.rcgu.o" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\test_serde-5e75573ae34afc83.5cem3msglpr23w6e.rcgu.o" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\test_serde-5e75573ae34afc83.5ejmnb20jymkiai2.rcgu.o" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\test_serde-5e75573ae34afc83.5hf6psf6f2tpvyz.rcgu.o" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\test_serde-5e75573ae34afc83.6ei2onsxrsufppe.rcgu.o" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\test_serde-5e75573ae34afc83.92nmh0iftuyvqj.rcgu.o" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\test_serde-5e75573ae34afc83.ckmel7kult6ide9.rcgu.o" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\test_serde-5e75573ae34afc83.ishtf0a3q3vk5o3.rcgu.o" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\test_serde-5e75573ae34afc83.ls7ghl8i6tt3l14.rcgu.o" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\test_serde-5e75573ae34afc83.lz6cuv2gang730z.rcgu.o" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\test_serde-5e75573ae34afc83.smvkqwlvfk1p5rf.rcgu.o" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\test_serde-5e75573ae34afc83.sucpzt34aiprncb.rcgu.o" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\test_serde-5e75573ae34afc83.ym2ef9z6ym02cqe.rcgu.o" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\test_serde-5e75573ae34afc83.389jaialu5arlcdp.rcgu.o" "/LIBPATH:C:\\code\\github\\littlefs2.git\\target\\debug\\deps" "/LIBPATH:C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.35.32215\\atlmfc\\lib\\x64" "/LIBPATH:C:\\code\\github\\littlefs2.git\\target\\debug\\build\\littlefs2-sys-b03d81645f79a759\\out" "/LIBPATH:C:\\Users\\<redacted>\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib" "C:\\Users\\<redacted>\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libtest-a808ca0de048c04a.rlib" "C:\\Users\\<redacted>\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libgetopts-9f5a3391f58062ae.rlib" "C:\\Users\\<redacted>\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libunicode_width-c89390e8550e44a0.rlib" "C:\\Users\\<redacted>\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\librustc_std_workspace_std-2d5a818e821bb16d.rlib" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\libssmarshal-e3b4282215c05628.rlib" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\libencode_unicode-a76e85b5ca24941c.rlib" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\liblittlefs2-48d387a5ccec1c71.rlib" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\libheapless-703257bb6aca6750.rlib" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\libstable_deref_trait-bd1b9d459af2ece1.rlib" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\libspin-538bfd18cb52a906.rlib" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\liblock_api-68e429b182a181f5.rlib" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\libscopeguard-ac07cd769cedafdc.rlib" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\libhash32-3762c961bbdc2e9a.rlib" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\libbyteorder-cde9897acbc806d2.rlib" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\libcstr_core-d28fb629e9af68ca.rlib" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\libmemchr-1e5b56ab4c45ff80.rlib" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\libserde-24dd3b56dd848c70.rlib" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\libbitflags-d86e6ef7d577ecfa.rlib" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\libgeneric_array-cd97d70c77749d3f.rlib" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\libtypenum-6062f3bbe6d25929.rlib" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\liblittlefs2_sys-a4f29a5b7b8e7b78.rlib" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\libcty-ffee799a01e95dd6.rlib" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\libdelog-75d84854a15e77c4.rlib" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\liblog-7dcf95e610f56123.rlib" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\libcfg_if-507736ef1a6c32e4.rlib" "C:\\Users\\<redacted>\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libstd-43ecf4bdbb5e1e31.rlib" "C:\\Users\\<redacted>\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libpanic_unwind-03eee9fc7fe44114.rlib" "C:\\Users\\<redacted>\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\librustc_demangle-f350829ea004292f.rlib" "C:\\Users\\<redacted>\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libstd_detect-52475675c4d47720.rlib" "C:\\Users\\<redacted>\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libhashbrown-d28662d15d021313.rlib" "C:\\Users\\<redacted>\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libminiz_oxide-f5a9ba230b395602.rlib" "C:\\Users\\<redacted>\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libadler-adcc534ee710b11e.rlib" "C:\\Users\\<redacted>\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\librustc_std_workspace_alloc-75e91ab7163af4fe.rlib" "C:\\Users\\<redacted>\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libunwind-6c926cb6aa5ed58c.rlib" "C:\\Users\\<redacted>\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libcfg_if-b2a86741ec07ae31.rlib" "C:\\Users\\<redacted>\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\liblibc-ecdbc3c93c11f60c.rlib" "C:\\Users\\<redacted>\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\liballoc-39d88c9804b36d9f.rlib" "C:\\Users\\<redacted>\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\librustc_std_workspace_core-2e112df156ffddae.rlib" "C:\\Users\\<redacted>\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libcore-bd7106b7f2a04ee0.rlib" "C:\\Users\\<redacted>\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libcompiler_builtins-d62a26418f17519a.rlib" "kernel32.lib" "kernel32.lib" "advapi32.lib" "userenv.lib" "kernel32.lib" "ws2_32.lib" "bcrypt.lib" "msvcrt.lib" "legacy_stdio_definitions.lib" "/NXCOMPAT" "/LIBPATH:C:\\Users\\<redacted>\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib" "/OUT:C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\test_serde-5e75573ae34afc83.exe" "/OPT:REF,NOICF" "/DEBUG" "/NATVIS:C:\\Users\\<redacted>\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\etc\\intrinsic.natvis" "/NATVIS:C:\\Users\\<redacted>\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\etc\\liballoc.natvis" "/NATVIS:C:\\Users\\<redacted>\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\etc\\libcore.natvis" "/NATVIS:C:\\Users\\<redacted>\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\etc\\libstd.natvis"
= note: ucrt.lib(api-ms-win-crt-string-l1-1-0.dll) : error LNK2005: strcspn already defined in liblittlefs2_sys-a4f29a5b7b8e7b78.rlib(string.o)
ucrt.lib(api-ms-win-crt-string-l1-1-0.dll) : error LNK2005: strspn already defined in liblittlefs2_sys-a4f29a5b7b8e7b78.rlib(string.o)
Creating library C:\code\github\littlefs2.git\target\debug\deps\test_serde-5e75573ae34afc83.lib and object C:\code\github\littlefs2.git\target\debug\deps\test_serde-5e75573ae34afc83.exp
C:\code\github\littlefs2.git\target\debug\deps\test_serde-5e75573ae34afc83.exe : fatal error LNK1169: one or more multiply defined symbols found
error: could not compile `littlefs2` due to previous error
warning: build failed, waiting for other jobs to finish...
error: linking with `link.exe` failed: exit code: 1169
|
= note: "C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.35.32215\\bin\\HostX64\\x64\\link.exe" "/NOLOGO" "C:\\Users\\<redacted>\\AppData\\Local\\Temp\\rustcAV8pT6\\symbols.o" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\littlefs2-ab09ad61f6a5a2a0.12fcf42dtgzvsge3.rcgu.o" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\littlefs2-ab09ad61f6a5a2a0.12todzanh5fz4v1.rcgu.o" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\littlefs2-ab09ad61f6a5a2a0.130fn11qkcyrhtqn.rcgu.o" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\littlefs2-ab09ad61f6a5a2a0.1447wttg2yf0i4tg.rcgu.o" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\littlefs2-ab09ad61f6a5a2a0.19d6e8urtuj9bbt5.rcgu.o" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\littlefs2-ab09ad61f6a5a2a0.1apdanggq2uiqgo2.rcgu.o" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\littlefs2-ab09ad61f6a5a2a0.1e4lreg4ptd70rto.rcgu.o" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\littlefs2-ab09ad61f6a5a2a0.1fg8h7m07rpjzmg0.rcgu.o" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\littlefs2-ab09ad61f6a5a2a0.1hutvcfmwu6daoge.rcgu.o" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\littlefs2-ab09ad61f6a5a2a0.1jwfge5tiatq7mo4.rcgu.o" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\littlefs2-ab09ad61f6a5a2a0.1jxl8mwgozs3i2pe.rcgu.o" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\littlefs2-ab09ad61f6a5a2a0.1ndm13ftl9mctfy7.rcgu.o" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\littlefs2-ab09ad61f6a5a2a0.1obq72iovqqqj4aa.rcgu.o" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\littlefs2-ab09ad61f6a5a2a0.1pwccwbhnatqe75h.rcgu.o" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\littlefs2-ab09ad61f6a5a2a0.1qoiasmkaftp0nii.rcgu.o" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\littlefs2-ab09ad61f6a5a2a0.1sbztyqrge4b0g5j.rcgu.o" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\littlefs2-ab09ad61f6a5a2a0.1sqt6yc456mk1jei.rcgu.o" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\littlefs2-ab09ad61f6a5a2a0.1wxncbmmtqk6tuon.rcgu.o" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\littlefs2-ab09ad61f6a5a2a0.1yu7nh6nx237oq7s.rcgu.o" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\littlefs2-ab09ad61f6a5a2a0.21fk984lj8hna3wj.rcgu.o" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\littlefs2-ab09ad61f6a5a2a0.28xj3zmddervvliz.rcgu.o" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\littlefs2-ab09ad61f6a5a2a0.29lvhnvxr1y3mfo3.rcgu.o" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\littlefs2-ab09ad61f6a5a2a0.2io4i62rohkkmh61.rcgu.o" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\littlefs2-ab09ad61f6a5a2a0.2kcq99vcrwfrfpmc.rcgu.o" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\littlefs2-ab09ad61f6a5a2a0.2ocjkhb1lfec31wu.rcgu.o" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\littlefs2-ab09ad61f6a5a2a0.2ox8hn8dsc3rc1ql.rcgu.o" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\littlefs2-ab09ad61f6a5a2a0.2qiy8dq98ut19u8s.rcgu.o" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\littlefs2-ab09ad61f6a5a2a0.2rmx7revgpjd15eh.rcgu.o" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\littlefs2-ab09ad61f6a5a2a0.2sg9ffqq13asrjp5.rcgu.o" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\littlefs2-ab09ad61f6a5a2a0.2ssr9zhnze9ro1hz.rcgu.o" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\littlefs2-ab09ad61f6a5a2a0.2tkawyb8uyxbhekc.rcgu.o" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\littlefs2-ab09ad61f6a5a2a0.2u5zfb3jcdlev42m.rcgu.o" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\littlefs2-ab09ad61f6a5a2a0.2ueacddwqhx72r2u.rcgu.o" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\littlefs2-ab09ad61f6a5a2a0.30o4cl7o4qiu8b8c.rcgu.o" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\littlefs2-ab09ad61f6a5a2a0.31ig3o48dxmi3y1c.rcgu.o" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\littlefs2-ab09ad61f6a5a2a0.37tlyuu7wn357vya.rcgu.o" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\littlefs2-ab09ad61f6a5a2a0.393aeim9ichsvb5s.rcgu.o" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\littlefs2-ab09ad61f6a5a2a0.39565zs0um13837z.rcgu.o" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\littlefs2-ab09ad61f6a5a2a0.39ivfj920cow9ia3.rcgu.o" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\littlefs2-ab09ad61f6a5a2a0.3gv3b1ish2qb3jgi.rcgu.o" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\littlefs2-ab09ad61f6a5a2a0.3jvdqo75h1jh3wdl.rcgu.o" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\littlefs2-ab09ad61f6a5a2a0.3kj1xfm1mfxzgmir.rcgu.o" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\littlefs2-ab09ad61f6a5a2a0.3mcd1mzy3djb0uyh.rcgu.o" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\littlefs2-ab09ad61f6a5a2a0.3q0g368elvmzm2bt.rcgu.o" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\littlefs2-ab09ad61f6a5a2a0.41qd8ufn8cyuq325.rcgu.o" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\littlefs2-ab09ad61f6a5a2a0.42kkclu6thebcj7p.rcgu.o" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\littlefs2-ab09ad61f6a5a2a0.4801v8qaoiq0chlb.rcgu.o" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\littlefs2-ab09ad61f6a5a2a0.4ctqxsrd7lo5hunk.rcgu.o" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\littlefs2-ab09ad61f6a5a2a0.4cxea4qkb31c8cht.rcgu.o" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\littlefs2-ab09ad61f6a5a2a0.4ew8dl14oqouqw0w.rcgu.o" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\littlefs2-ab09ad61f6a5a2a0.4hckywxvb5d73tsx.rcgu.o" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\littlefs2-ab09ad61f6a5a2a0.4il4k68pmroihd5s.rcgu.o" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\littlefs2-ab09ad61f6a5a2a0.4k0ttxrt84pfeq8f.rcgu.o" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\littlefs2-ab09ad61f6a5a2a0.4kspj09g9mipqsle.rcgu.o" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\littlefs2-ab09ad61f6a5a2a0.4kx6inv07yb2en9x.rcgu.o" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\littlefs2-ab09ad61f6a5a2a0.508znfjx72sxj385.rcgu.o" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\littlefs2-ab09ad61f6a5a2a0.52qg1ub4pmbbyleb.rcgu.o" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\littlefs2-ab09ad61f6a5a2a0.53xmh4b72lxyq7ji.rcgu.o" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\littlefs2-ab09ad61f6a5a2a0.58332wrhw2hhpz8z.rcgu.o" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\littlefs2-ab09ad61f6a5a2a0.5asg57b9iaio58ny.rcgu.o" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\littlefs2-ab09ad61f6a5a2a0.5fcd8m9so4m6j0mo.rcgu.o" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\littlefs2-ab09ad61f6a5a2a0.5fp6nsyo5tw800cg.rcgu.o" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\littlefs2-ab09ad61f6a5a2a0.6mxxdoej8z73oru.rcgu.o" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\littlefs2-ab09ad61f6a5a2a0.78ouegbhph386im.rcgu.o" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\littlefs2-ab09ad61f6a5a2a0.85wc2ik3z2ppvvi.rcgu.o" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\littlefs2-ab09ad61f6a5a2a0.d60updicfg7fe2u.rcgu.o" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\littlefs2-ab09ad61f6a5a2a0.dw6gbw49plyanqk.rcgu.o" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\littlefs2-ab09ad61f6a5a2a0.hjsqiovfczclg5g.rcgu.o" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\littlefs2-ab09ad61f6a5a2a0.izblduhor63xo5a.rcgu.o" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\littlefs2-ab09ad61f6a5a2a0.qq3uxj3ix9eedr1.rcgu.o" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\littlefs2-ab09ad61f6a5a2a0.u1v3lb7hx3yvdln.rcgu.o" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\littlefs2-ab09ad61f6a5a2a0.xh7pykp4nbg6wmi.rcgu.o" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\littlefs2-ab09ad61f6a5a2a0.3djr0c91o6nno17u.rcgu.o" "/LIBPATH:C:\\code\\github\\littlefs2.git\\target\\debug\\deps" "/LIBPATH:C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.35.32215\\atlmfc\\lib\\x64" "/LIBPATH:C:\\code\\github\\littlefs2.git\\target\\debug\\build\\littlefs2-sys-b03d81645f79a759\\out" "/LIBPATH:C:\\Users\\<redacted>\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\libheapless-703257bb6aca6750.rlib" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\libstable_deref_trait-bd1b9d459af2ece1.rlib" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\libspin-538bfd18cb52a906.rlib" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\liblock_api-68e429b182a181f5.rlib" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\libscopeguard-ac07cd769cedafdc.rlib" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\libhash32-3762c961bbdc2e9a.rlib" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\libbyteorder-cde9897acbc806d2.rlib" "C:\\Users\\<redacted>\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libtest-a808ca0de048c04a.rlib" "C:\\Users\\<redacted>\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libgetopts-9f5a3391f58062ae.rlib" "C:\\Users\\<redacted>\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libunicode_width-c89390e8550e44a0.rlib" "C:\\Users\\<redacted>\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\librustc_std_workspace_std-2d5a818e821bb16d.rlib" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\libcstr_core-d28fb629e9af68ca.rlib" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\libmemchr-1e5b56ab4c45ff80.rlib" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\libserde-24dd3b56dd848c70.rlib" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\libbitflags-d86e6ef7d577ecfa.rlib" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\libgeneric_array-cd97d70c77749d3f.rlib" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\libtypenum-6062f3bbe6d25929.rlib" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\liblittlefs2_sys-a4f29a5b7b8e7b78.rlib" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\libcty-ffee799a01e95dd6.rlib" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\libdelog-75d84854a15e77c4.rlib" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\liblog-7dcf95e610f56123.rlib" "C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\libcfg_if-507736ef1a6c32e4.rlib" "C:\\Users\\<redacted>\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libstd-43ecf4bdbb5e1e31.rlib" "C:\\Users\\<redacted>\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libpanic_unwind-03eee9fc7fe44114.rlib" "C:\\Users\\<redacted>\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\librustc_demangle-f350829ea004292f.rlib" "C:\\Users\\<redacted>\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libstd_detect-52475675c4d47720.rlib" "C:\\Users\\<redacted>\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libhashbrown-d28662d15d021313.rlib" "C:\\Users\\<redacted>\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libminiz_oxide-f5a9ba230b395602.rlib" "C:\\Users\\<redacted>\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libadler-adcc534ee710b11e.rlib" "C:\\Users\\<redacted>\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\librustc_std_workspace_alloc-75e91ab7163af4fe.rlib" "C:\\Users\\<redacted>\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libunwind-6c926cb6aa5ed58c.rlib" "C:\\Users\\<redacted>\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libcfg_if-b2a86741ec07ae31.rlib" "C:\\Users\\<redacted>\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\liblibc-ecdbc3c93c11f60c.rlib" "C:\\Users\\<redacted>\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\liballoc-39d88c9804b36d9f.rlib" "C:\\Users\\<redacted>\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\librustc_std_workspace_core-2e112df156ffddae.rlib" "C:\\Users\\<redacted>\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libcore-bd7106b7f2a04ee0.rlib" "C:\\Users\\<redacted>\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libcompiler_builtins-d62a26418f17519a.rlib" "kernel32.lib" "kernel32.lib" "advapi32.lib" "userenv.lib" "kernel32.lib" "ws2_32.lib" "bcrypt.lib" "msvcrt.lib" "legacy_stdio_definitions.lib" "/NXCOMPAT" "/LIBPATH:C:\\Users\\<redacted>\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib" "/OUT:C:\\code\\github\\littlefs2.git\\target\\debug\\deps\\littlefs2-ab09ad61f6a5a2a0.exe" "/OPT:REF,NOICF" "/DEBUG" "/NATVIS:C:\\Users\\<redacted>\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\etc\\intrinsic.natvis" "/NATVIS:C:\\Users\\<redacted>\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\etc\\liballoc.natvis" "/NATVIS:C:\\Users\\<redacted>\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\etc\\libcore.natvis" "/NATVIS:C:\\Users\\<redacted>\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\etc\\libstd.natvis"
= note: ucrt.lib(api-ms-win-crt-string-l1-1-0.dll) : error LNK2005: strcspn already defined in liblittlefs2_sys-a4f29a5b7b8e7b78.rlib(string.o)
ucrt.lib(api-ms-win-crt-string-l1-1-0.dll) : error LNK2005: strspn already defined in liblittlefs2_sys-a4f29a5b7b8e7b78.rlib(string.o)
Creating library C:\code\github\littlefs2.git\target\debug\deps\littlefs2-ab09ad61f6a5a2a0.lib and object C:\code\github\littlefs2.git\target\debug\deps\littlefs2-ab09ad61f6a5a2a0.exp
C:\code\github\littlefs2.git\target\debug\deps\littlefs2-ab09ad61f6a5a2a0.exe : fatal error LNK1169: one or more multiply defined symbols found
error: could not compile `littlefs2` due to previous error
System information:
Edition Windows 11 Home
Version 22H2
OS build 22621.1555
Experience Windows Feature Experience Pack 1000.22640.1000.0
I am building from Git-bash (MINGW64) with the following uname -a
ouput:
MINGW64_NT-10.0-22621 _<REDACTED>_ 3.1.7-340.x86_64 2021-03-26 22:17 UTC x86_64 Msys
cargo version:
cargo 1.69.0 (6e9a83356 2023-04-12)
rustc version:
rustc 1.69.0 (84c898d65 2023-04-16)
Clang version info:
clang version 16.0.0
Target: x86_64-pc-windows-msvc
Thread model: posix
InstalledDir: C:\Program Files\LLVM\bin
MSVC version:
Microsoft (R) C/C++ Optimizing Compiler Version 19.35.32217.1 for x86
It turns out that I was unable to link any executable using littlefs2
, once I started adding references to its API, so I decided to do a little more investigation. I tried switching toolchains from stable-x86_64-pc-windows-msvc
to stable-x86_64-pc-windows-gnu
. Once I got that configured correctly, I got some different error output:
$ cargo test
Compiling version_check v0.9.4
Compiling proc-macro2 v1.0.56
Compiling quote v1.0.26
Compiling unicode-ident v1.0.8
Compiling winapi-x86_64-pc-windows-gnu v0.4.0
Compiling glob v0.3.1
Compiling memchr v2.5.0
Compiling winapi v0.3.9
Compiling libc v0.2.142
Compiling nom v5.1.2
Compiling clang-sys v1.6.1
Compiling semver v1.0.17
Compiling autocfg v1.1.0
Compiling bindgen v0.56.0
Compiling regex-syntax v0.7.0
Compiling lock_api v0.4.9
Compiling lazy_static v1.4.0
Compiling shlex v0.1.1
Compiling serde_derive v1.0.160
Compiling peeking_take_while v0.1.2
Compiling rustc-hash v1.1.0
Compiling libloading v0.7.4
Compiling bitflags v1.3.2
Compiling lazycell v1.3.0
Compiling rustc_version v0.4.0
Compiling syn v2.0.15
Compiling serde v1.0.160
Compiling typenum v1.16.0
Compiling scopeguard v1.1.0
Compiling log v0.4.17
Compiling cc v1.0.79
Compiling regex v1.8.0
Compiling cexpr v0.4.0
Compiling heapless v0.7.16
Compiling generic-array v0.14.7
Compiling delog v0.1.6
Compiling cty v0.2.2
Compiling byteorder v1.4.3
Compiling cfg-if v1.0.0
Compiling hash32 v0.2.1
Compiling spin v0.9.8
Compiling stable_deref_trait v1.2.0
Compiling encode_unicode v0.3.6
Compiling cstr_core v0.2.6
Compiling littlefs2-sys v0.1.7
error: failed to run custom build command for `littlefs2-sys v0.1.7`
Caused by:
process didn't exit successfully: `C:\code\github\littlefs2.git\target\debug\build\littlefs2-sys-f4b0023b1e3a6858\build-script-build` (exit code: 101)
--- stdout
TARGET = Some("x86_64-pc-windows-gnu")
OPT_LEVEL = Some("0")
HOST = Some("x86_64-pc-windows-gnu")
cargo:rerun-if-env-changed=CC_x86_64-pc-windows-gnu
CC_x86_64-pc-windows-gnu = None
cargo:rerun-if-env-changed=CC_x86_64_pc_windows_gnu
CC_x86_64_pc_windows_gnu = None
cargo:rerun-if-env-changed=HOST_CC
HOST_CC = None
cargo:rerun-if-env-changed=CC
CC = None
cargo:rerun-if-env-changed=CFLAGS_x86_64-pc-windows-gnu
CFLAGS_x86_64-pc-windows-gnu = None
cargo:rerun-if-env-changed=CFLAGS_x86_64_pc_windows_gnu
CFLAGS_x86_64_pc_windows_gnu = None
cargo:rerun-if-env-changed=HOST_CFLAGS
HOST_CFLAGS = None
cargo:rerun-if-env-changed=CFLAGS
CFLAGS = None
cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
CRATE_CC_NO_DEFAULTS = None
DEBUG = Some("true")
CARGO_CFG_TARGET_FEATURE = Some("fxsr,sse,sse2")
running: "gcc.exe" "-O0" "-ffunction-sections" "-fdata-sections" "-gdwarf-2" "-fno-omit-frame-pointer" "-m64" "-Wall" "-Wextra" "-std=c11" "-DLFS_NO_MALLOC" "-DLFS_NO_DEBUG" "-DLFS_NO_WARN" "-DLFS_NO_ERROR" "-DLFS_NO_ASSERT" "-o" "C:\\code\\github\\littlefs2.git\\target\\debug\\build\\littlefs2-sys-971271cbc7dcd53e\\out\\littlefs/lfs.o" "-c" "littlefs/lfs.c"
exit code: 0
running: "gcc.exe" "-O0" "-ffunction-sections" "-fdata-sections" "-gdwarf-2" "-fno-omit-frame-pointer" "-m64" "-Wall" "-Wextra" "-std=c11" "-DLFS_NO_MALLOC" "-DLFS_NO_DEBUG" "-DLFS_NO_WARN" "-DLFS_NO_ERROR" "-DLFS_NO_ASSERT" "-o" "C:\\code\\github\\littlefs2.git\\target\\debug\\build\\littlefs2-sys-971271cbc7dcd53e\\out\\littlefs/lfs_util.o" "-c" "littlefs/lfs_util.c"
exit code: 0
running: "gcc.exe" "-O0" "-ffunction-sections" "-fdata-sections" "-gdwarf-2" "-fno-omit-frame-pointer" "-m64" "-Wall" "-Wextra" "-std=c11" "-DLFS_NO_MALLOC" "-DLFS_NO_DEBUG" "-DLFS_NO_WARN" "-DLFS_NO_ERROR" "-DLFS_NO_ASSERT" "-o" "C:\\code\\github\\littlefs2.git\\target\\debug\\build\\littlefs2-sys-971271cbc7dcd53e\\out\\string.o" "-c" "string.c"
exit code: 0
cargo:rerun-if-env-changed=AR_x86_64-pc-windows-gnu
AR_x86_64-pc-windows-gnu = None
cargo:rerun-if-env-changed=AR_x86_64_pc_windows_gnu
AR_x86_64_pc_windows_gnu = None
cargo:rerun-if-env-changed=HOST_AR
HOST_AR = None
cargo:rerun-if-env-changed=AR
AR = None
cargo:rerun-if-env-changed=ARFLAGS_x86_64-pc-windows-gnu
ARFLAGS_x86_64-pc-windows-gnu = None
cargo:rerun-if-env-changed=ARFLAGS_x86_64_pc_windows_gnu
ARFLAGS_x86_64_pc_windows_gnu = None
cargo:rerun-if-env-changed=HOST_ARFLAGS
HOST_ARFLAGS = None
cargo:rerun-if-env-changed=ARFLAGS
ARFLAGS = None
running: "ar" "cq" "C:\\code\\github\\littlefs2.git\\target\\debug\\build\\littlefs2-sys-971271cbc7dcd53e\\out\\liblfs-sys.a" "C:\\code\\github\\littlefs2.git\\target\\debug\\build\\littlefs2-sys-971271cbc7dcd53e\\out\\littlefs/lfs.o" "C:\\code\\github\\littlefs2.git\\target\\debug\\build\\littlefs2-sys-971271cbc7dcd53e\\out\\littlefs/lfs_util.o" "C:\\code\\github\\littlefs2.git\\target\\debug\\build\\littlefs2-sys-971271cbc7dcd53e\\out\\string.o"
exit code: 0
running: "ar" "s" "C:\\code\\github\\littlefs2.git\\target\\debug\\build\\littlefs2-sys-971271cbc7dcd53e\\out\\liblfs-sys.a"
exit code: 0
cargo:rustc-link-lib=static=lfs-sys
cargo:rustc-link-search=native=C:\code\github\littlefs2.git\target\debug\build\littlefs2-sys-971271cbc7dcd53e\out
--- stderr
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: LexError { span: Span }', C:\Users\<redacted>\.cargo\registry\src\github.com-1ecc6299db9ec823\bindgen-0.56.0\src\codegen\mod.rs:4395:66
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
I was able to get this error to go away, and successfully run all tests by updating the version of littlefs2-sys
's build dependency of bindgen
to at least 0.62.0
. The latest released version, 0.65.1
also works. I think this means there are actually two issues here, both of which should probably be filed in the littlefs2-sys
project:
- The multiple definition of
strspn
andstrcspn
linker errors that occur when using thestable-x86_64-pc-windows-msvc
toolchain - The panic that occurs when using the
stable-x86_64-pc-windows-gnu
toolchain, which may be fixed by updating the version of thebindgen
build dependency to at least0.62.0
I am able to work around all of the above by simply using the stable-x86_64-unknown-linux-gnu
rust toolchain, version 1.69.0, via WSL.