dtolnay/cargo-expand

Compile failure on `stable-x86_64-pc-windows-gnu`, but not `stable-x86_64-pc-windows-msvc`

magneticflux- opened this issue · 2 comments

These are the verbose logs from the GNU install: gnu.log

The problems seem to start with a bunch of messages like this:

  = note: Warning: .drectve `-exclude-symbols:"_ZN102_$LT$$RF$mut$u20$alloc..vec..Vec$LT$T$C$A$GT$$u20$as$u20$core..iter..traits..collect..IntoIterator$GT$9into_iter17h35491cba3c9d4500E" ' unrecognized
          Warning: .drectve `-exclude-symbols:"_ZN102_$LT$$RF$mut$u20$alloc..vec..Vec$LT$T$C$A$GT$$u20$as$u20$core..iter..traits..collect..IntoIterator$GT$9into_iter17h54ac53f06449f0a0E" ' unrecognized
          Warning: .drectve `-exclude-symbols:"_ZN102_$LT$$RF$mut$u20$alloc..vec..Vec$LT$T$C$A$GT$$u20$as$u20$core..iter..traits..collect..IntoIterator$GT$9into_iter17h794e946d2719d03aE" ' unrecognized
          Warning: .drectve `-exclude-symbols:"_ZN102_$LT$$RF$mut$u20$alloc..vec..Vec$LT$T$C$A$GT$$u20$as$u20$core..iter..traits..collect..IntoIterator$GT$9into_iter17h8fe922797456177aE" ' unrecognized
          Warning: .drectve `-exclude-symbols:"_ZN102_$LT$$RF$mut$u20$alloc..vec..Vec$LT$T$C$A$GT$$u20$as$u20$core..iter..traits..collect..IntoIterator$GT$9into_iter17he4b8c2830e54c7e7E" ' unrecognized
          Warning: .drectve `-exclude-symbols:"_ZN102_$LT$core..iter..adapters..map..Map$LT$I$C$F$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17h28b5dae84cb2821eE.llvm.13672139330935199280" ' unrecognized
          Warning: .drectve `-exclude-symbols:"_ZN4core3ptr100drop_in_place$LT$alloc..raw_vec..RawVec$LT$alloc..vec..Vec$LT$std..ffi..os_str..OsString$GT$$GT$$GT$17h3c975b7fff70c34cE.llvm.13672139330935199280" ' unrecognized
          Warning: .drectve `-exclude-symbols:"_ZN4core3ptr100drop_in_place$LT$core..option..Option$LT$alloc..boxed..Box$LT$syn..path..GenericArgument$GT$$GT$$GT$17h6d23e48af68dd3d2E.llvm.13672139330935199280" ' unrecognized
          Warning: .drectve `-exclude-symbols:"_ZN4core3ptr100drop_in_place$LT$syn..punctuated..Punctuated$LT$syn..path..PathSegment$C$syn..token..PathSep$GT$$GT$17h9eebbad705df038cE.llvm.13672139330935199280" ' unrecognized
          Warning: .drectve `-exclude-symbols:"_ZN4core3ptr101drop_in_place$LT$alloc..raw_vec..RawVec$LT$$LP$syn..lifetime..Lifetime$C$syn..token..Plus$RP$$GT$$GT$17h320b0b638a758d71E.llvm.13672139330935199280" ' unrecognized
          Warning: .drectve `-exclude-symbols:"_ZN4core3ptr101drop_in_place$LT$core..option..Option$LT$alloc..boxed..Box$LT$syn..generics..GenericParam$GT$$GT$$GT$17h5845ee051a9509ceE.llvm.13672139330935199280" ' unrecognized
          Warning: .drectve `-exclude-symbols:"_ZN4core3ptr102drop_in_place$LT$syn..punctuated..Punctuated$LT$syn..path..GenericArgument$C$syn..token..Comma$GT$$GT$17hfc3b1fe65968f513E.llvm.13672139330935199280" ' unrecognized

and end with a linker error:

          Warning: .drectve `-exclude-symbols:"_ZN42_$LT$$RF$T$u20$as$u20$core..fmt..Debug$GT$3fmt17h06e571718ddd9766E" ' unrecognized
          Warning: .drectve `-exclude-symbols:"_ZN42_$LT$$RF$T$u20$as$u20$core..fmt..Debug$GT$3fmt17h27045592cd3e1737E" ' unrecognized
          Warning: corrupt .drectve at end of def file
          Warning: corrupt .drectve at end of def file
          Warning: corrupt .drectve at end of def file
          collect2.exe: error: ld returned 5 exit status

For comparison, the MSVC compilation without errors: msvc.log

Can you make sure you have the latest version of binutils installed? I think it needs at least version 2.40. Can you include all the version information of your gcc and ld toolchains?

I am skeptical that this is a problem caused by cargo-expand.