Stream: general

Topic: Weird Windows likning failures


RalfJ (Nov 08 2019 at 11:47, on Zulip):

When bumping the Rust version we test Miri against, I am seeing weird Windows linking failures on AppVeyor:

      libcompiler_builtins-0406f6527c70a3b2.rlib(compiler_builtins-0406f6527c70a3b2.compiler_builtins.7xzcwl4z-cgu.5.rcgu.o) : error LNK2019: unresolved external symbol __sync_val_compare_and_swap_16 referenced in function __llvm_memcpy_element_unordered_atomic_16
          libcompiler_builtins-0406f6527c70a3b2.rlib(compiler_builtins-0406f6527c70a3b2.compiler_builtins.7xzcwl4z-cgu.5.rcgu.o) : error LNK2019: unresolved external symbol __sync_lock_test_and_set_16 referenced in function __llvm_memcpy_element_unordered_atomic_16
          C:\Users\appveyor\AppData\Local\Temp\1\xargo.Z8yElWQ4nM3b\target\x86_64-pc-windows-msvc\release\deps\std.dll : fatal error LNK1120: 2 unresolved externals

Does anyone have any idea what that could be about, and why this started happening now?

simulacrum (Nov 08 2019 at 12:14, on Zulip):

hm, cc @gnzlbg and @Alex Crichton I guess

gnzlbg (Nov 08 2019 at 13:42, on Zulip):

Weird, __sync_val_compare_and_swap_16 appears to not be available there

gnzlbg (Nov 08 2019 at 13:43, on Zulip):

@RalfJ appears you might be hitting: https://github.com/rust-lang/compiler-builtins/issues/316#issuecomment-537128271

gnzlbg (Nov 08 2019 at 13:47, on Zulip):

What is cargo miri setup doing ? Is it calling xargo ? ^^^ cc @mati865

RalfJ (Nov 08 2019 at 14:36, on Zulip):

What is cargo miri setup doing ? Is it calling xargo ? ^^^ cc mati865

yes it is

RalfJ (Nov 08 2019 at 14:37, on Zulip):

turns out a new compiler_builtins was released yesterday

RalfJ (Nov 08 2019 at 14:37, on Zulip):

so my current best guess is that that's the culprit

RalfJ (Nov 08 2019 at 14:37, on Zulip):

the released version of xargo doesnt use the lockfile, hence we cannot even reproduce prior builds

RalfJ (Nov 09 2019 at 07:44, on Zulip):

https://github.com/rust-lang/compiler-builtins/issues/322

Last update: Nov 21 2019 at 23:50UTC