Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regression: MSVC/VS2017 fails to link rustc in miniz.o #49869

Closed
abonander opened this issue Apr 11, 2018 · 14 comments
Closed

Regression: MSVC/VS2017 fails to link rustc in miniz.o #49869

abonander opened this issue Apr 11, 2018 · 14 comments
Labels
A-linkage Area: linking into static, shared libraries and binaries C-bug Category: This is a bug. O-windows Operating system: Windows T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@abonander
Copy link
Contributor

abonander commented Apr 11, 2018

I have MSVC installed through Visual Studio 2017. It used to work fine but very recently I have hit a regression in linking rustc with miniz.o:

Compiling rustc v0.0.0 (file:///C:/Users/cyber/Rust/rust/src/librustc)
error: linking with `C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.13.26128\bin\HostX64\x64\link.exe` failed: exit code: 1120
  |
  = note: "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.13.26128\\bin\\HostX64\\x64\\link.exe" "/NOLOGO" "/NXCOMPAT" "/LIBPATH:C:\\Users\\cyber\\Rust\\rust\\build\\x86_64-pc-windows-msvc\\stage0-sysroot\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib" "C:\\Users\\cyber\\Rust\\rust\\build\\x86_64-pc-windows-msvc\\stage0-rustc\\x86_64-pc-windows-msvc\\release\\deps\\rustc-7d90e5433b19a0af.rustc0-f229a91c0528eceb2c17c37abdfa1e60.rs.rcgu.o" "C:\\Users\\cyber\\Rust\\rust\\build\\x86_64-pc-windows-msvc\\stage0-rustc\\x86_64-pc-windows-msvc\\release\\deps\\rustc-7d90e5433b19a0af.rustc1-f229a91c0528eceb2c17c37abdfa1e60.rs.rcgu.o" "C:\\Users\\cyber\\Rust\\rust\\build\\x86_64-pc-windows-msvc\\stage0-rustc\\x86_64-pc-windows-msvc\\release\\deps\\rustc-7d90e5433b19a0af.rustc2-f229a91c0528eceb2c17c37abdfa1e60.rs.rcgu.o" "C:\\Users\\cyber\\Rust\\rust\\build\\x86_64-pc-windows-msvc\\stage0-rustc\\x86_64-pc-windows-msvc\\release\\deps\\rustc-7d90e5433b19a0af.rustc3-f229a91c0528eceb2c17c37abdfa1e60.rs.rcgu.o" "C:\\Users\\cyber\\Rust\\rust\\build\\x86_64-pc-windows-msvc\\stage0-rustc\\x86_64-pc-windows-msvc\\release\\deps\\rustc-7d90e5433b19a0af.rustc4-f229a91c0528eceb2c17c37abdfa1e60.rs.rcgu.o" "C:\\Users\\cyber\\Rust\\rust\\build\\x86_64-pc-windows-msvc\\stage0-rustc\\x86_64-pc-windows-msvc\\release\\deps\\rustc-7d90e5433b19a0af.rustc5-f229a91c0528eceb2c17c37abdfa1e60.rs.rcgu.o" "C:\\Users\\cyber\\Rust\\rust\\build\\x86_64-pc-windows-msvc\\stage0-rustc\\x86_64-pc-windows-msvc\\release\\deps\\rustc-7d90e5433b19a0af.rustc6-f229a91c0528eceb2c17c37abdfa1e60.rs.rcgu.o" "C:\\Users\\cyber\\Rust\\rust\\build\\x86_64-pc-windows-msvc\\stage0-rustc\\x86_64-pc-windows-msvc\\release\\deps\\rustc-7d90e5433b19a0af.rustc7-f229a91c0528eceb2c17c37abdfa1e60.rs.rcgu.o" "/OUT:C:\\Users\\cyber\\Rust\\rust\\build\\x86_64-pc-windows-msvc\\stage0-rustc\\x86_64-pc-windows-msvc\\release\\deps\\rustc-7d90e5433b19a0af.dll" "/DEF:C:\\Users\\cyber\\AppData\\Local\\Temp\\rustc.jaql3r8uVhnm\\lib.def" "C:\\Users\\cyber\\Rust\\rust\\build\\x86_64-pc-windows-msvc\\stage0-rustc\\x86_64-pc-windows-msvc\\release\\deps\\rustc-7d90e5433b19a0af.crate.metadata.rcgu.o" "C:\\Users\\cyber\\Rust\\rust\\build\\x86_64-pc-windows-msvc\\stage0-rustc\\x86_64-pc-windows-msvc\\release\\deps\\rustc-7d90e5433b19a0af.crate.allocator.rcgu.o" "/OPT:REF,ICF" "/DEBUG" "/LIBPATH:C:\\Users\\cyber\\Rust\\rust\\build\\x86_64-pc-windows-msvc\\stage0-rustc\\x86_64-pc-windows-msvc\\release\\deps" "/LIBPATH:C:\\Users\\cyber\\Rust\\rust\\build\\x86_64-pc-windows-msvc\\stage0-rustc\\release\\deps" "/LIBPATH:C:\\Users\\cyber\\Rust\\rust\\build\\x86_64-pc-windows-msvc\\stage0-rustc\\x86_64-pc-windows-msvc\\release\\build\\miniz-sys-386dfa5bb266d631\\out" "/LIBPATH:C:\\Users\\cyber\\Rust\\rust\\build\\x86_64-pc-windows-msvc\\stage0-sysroot\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib" "psapi.lib" "/LIBPATH:C:\\Users\\cyber\\Rust\\rust\\build\\x86_64-pc-windows-msvc\\stage0-sysroot\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib" "test-df926bd1ab5fd104.dll.lib" "/LIBPATH:C:\\Users\\cyber\\Rust\\rust\\build\\x86_64-pc-windows-msvc\\stage0-sysroot\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib" "term-3fe728aae5ce7da5.dll.lib" "C:\\Users\\cyber\\AppData\\Local\\Temp\\rustc.jaql3r8uVhnm\\libflate2-f910e11d6a06ae5e.rlib" "C:\\Users\\cyber\\AppData\\Local\\Temp\\rustc.jaql3r8uVhnm\\libminiz_sys-11b1e7ea6e848cba.rlib" "C:\\Users\\cyber\\AppData\\Local\\Temp\\rustc.jaql3r8uVhnm\\liblibc-eeed0d808ff34cba.rlib" "C:\\Users\\cyber\\AppData\\Local\\Temp\\rustc.jaql3r8uVhnm\\libbacktrace-6815acd00c774abd.rlib" "C:\\Users\\cyber\\AppData\\Local\\Temp\\rustc.jaql3r8uVhnm\\librustc_demangle-7e093ccf0057a92d.rlib" "C:\\Users\\cyber\\AppData\\Local\\Temp\\rustc.jaql3r8uVhnm\\libbyteorder-98cb0bccab47de74.rlib" "/LIBPATH:C:\\Users\\cyber\\Rust\\rust\\build\\x86_64-pc-windows-msvc\\stage0-rustc\\x86_64-pc-windows-msvc\\release\\deps" "proc_macro-85741acd40c8722e.dll.lib" "C:\\Users\\cyber\\AppData\\Local\\Temp\\rustc.jaql3r8uVhnm\\libjobserver-6f77f02e5c37ee01.rlib" "/LIBPATH:C:\\Users\\cyber\\Rust\\rust\\build\\x86_64-pc-windows-msvc\\stage0-rustc\\x86_64-pc-windows-msvc\\release\\deps" "rustc_const_math-542876ec2770c2cb.dll.lib" "/LIBPATH:C:\\Users\\cyber\\Rust\\rust\\build\\x86_64-pc-windows-msvc\\stage0-rustc\\x86_64-pc-windows-msvc\\release\\deps" "rustc_back-4211764832c56432.dll.lib" "/LIBPATH:C:\\Users\\cyber\\Rust\\rust\\build\\x86_64-pc-windows-msvc\\stage0-rustc\\x86_64-pc-windows-msvc\\release\\deps" "syntax-e45249716652a60c.dll.lib" "/LIBPATH:C:\\Users\\cyber\\Rust\\rust\\build\\x86_64-pc-windows-msvc\\stage0-rustc\\x86_64-pc-windows-msvc\\release\\deps" "rustc_errors-ad984646b9d61af6.dll.lib" "/LIBPATH:C:\\Users\\cyber\\Rust\\rust\\build\\x86_64-pc-windows-msvc\\stage0-rustc\\x86_64-pc-windows-msvc\\release\\deps" "syntax_pos-b98a1de894166ba0.dll.lib" "/LIBPATH:C:\\Users\\cyber\\Rust\\rust\\build\\x86_64-pc-windows-msvc\\stage0-rustc\\x86_64-pc-windows-msvc\\release\\deps" "rustc_data_structures-985119952f88acaa.dll.lib" "/LIBPATH:C:\\Users\\cyber\\Rust\\rust\\build\\x86_64-pc-windows-msvc\\stage0-rustc\\x86_64-pc-windows-msvc\\release\\deps" "serialize-8d2a38a7d63d5b3d.dll.lib" "/LIBPATH:C:\\Users\\cyber\\Rust\\rust\\build\\x86_64-pc-windows-msvc\\stage0-rustc\\x86_64-pc-windows-msvc\\release\\deps" "rustc_cratesio_shim-0f4f3b26149e3475.dll.lib" "C:\\Users\\cyber\\AppData\\Local\\Temp\\rustc.jaql3r8uVhnm\\liblazy_static-8d7b70e9dbdb4e00.rlib" "/LIBPATH:C:\\Users\\cyber\\Rust\\rust\\build\\x86_64-pc-windows-msvc\\stage0-rustc\\x86_64-pc-windows-msvc\\release\\deps" "graphviz-0e70195c5cd98069.dll.lib" "/LIBPATH:C:\\Users\\cyber\\Rust\\rust\\build\\x86_64-pc-windows-msvc\\stage0-rustc\\x86_64-pc-windows-msvc\\release\\deps" "fmt_macros-58082eb5b11691a5.dll.lib" "/LIBPATH:C:\\Users\\cyber\\Rust\\rust\\build\\x86_64-pc-windows-msvc\\stage0-rustc\\x86_64-pc-windows-msvc\\release\\deps" "arena-64bd765e7e31a4ab.dll.lib" "/LIBPATH:C:\\Users\\cyber\\Rust\\rust\\build\\x86_64-pc-windows-msvc\\stage0-sysroot\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib" "std-1c1752cc72c96a73.dll.lib" "C:\\Users\\cyber\\AppData\\Local\\Temp\\rustc.jaql3r8uVhnm\\libcompiler_builtins-e53948253266021b.rlib" "kernel32.lib" "setupapi.lib" "credui.lib" "opengl32.lib" "synchronization.lib" "msimg32.lib" "winspool.lib" "gdi32.lib" "kernel32.lib" "dbghelp.lib" "user32.lib" "secur32.lib" "advapi32.lib" "advapi32.lib" "ws2_32.lib" "userenv.lib" "shell32.lib" "libcmt.lib" "/DLL" "/IMPLIB:C:\\Users\\cyber\\Rust\\rust\\build\\x86_64-pc-windows-msvc\\stage0-rustc\\x86_64-pc-windows-msvc\\release\\deps\\rustc-7d90e5433b19a0af.dll.lib"
  = note:    Creating library C:\Users\cyber\Rust\rust\build\x86_64-pc-windows-msvc\stage0-rustc\x86_64-pc-windows-msvc\release\deps\rustc-7d90e5433b19a0af.dll.lib and object C:\Users\cyber\Rust\rust\build\x86_64-pc-windows-msvc\stage0-rustc\x86_64-pc-windows-msvc\release\deps\rustc-7d90e5433b19a0af.dll.exp
          libcmt.lib(initializers.obj) : warning LNK4098: defaultlib 'msvcrt.lib' conflicts with use of other libs; use /NODEFAULTLIB:library
          libminiz_sys-11b1e7ea6e848cba.rlib(miniz.o) : warning LNK4217: locally defined symbol free imported in function def_free_func
          libminiz_sys-11b1e7ea6e848cba.rlib(miniz.o) : warning LNK4217: locally defined symbol malloc imported in function def_alloc_func
          libminiz_sys-11b1e7ea6e848cba.rlib(miniz.o) : warning LNK4217: locally defined symbol fclose imported in function mz_zip_reader_end
          libminiz_sys-11b1e7ea6e848cba.rlib(miniz.o) : warning LNK4217: locally defined symbol fflush imported in function mz_zip_writer_finalize_archive
          libminiz_sys-11b1e7ea6e848cba.rlib(miniz.o) : error LNK2019: unresolved external symbol __imp_realloc referenced in function def_realloc_func
          libminiz_sys-11b1e7ea6e848cba.rlib(miniz.o) : error LNK2019: unresolved external symbol __imp__localtime64_s referenced in function localtime_s
          libminiz_sys-11b1e7ea6e848cba.rlib(miniz.o) : error LNK2019: unresolved external symbol __imp__mktime64 referenced in function mktime
          libminiz_sys-11b1e7ea6e848cba.rlib(miniz.o) : error LNK2019: unresolved external symbol __imp__time64 referenced in function mz_zip_writer_add_mem_ex
          libminiz_sys-11b1e7ea6e848cba.rlib(miniz.o) : error LNK2019: unresolved external symbol __imp__wassert referenced in function mz_zip_array_ensure_capacity
          libminiz_sys-11b1e7ea6e848cba.rlib(miniz.o) : error LNK2019: unresolved external symbol __imp_fopen_s referenced in function mz_fopen
          libminiz_sys-11b1e7ea6e848cba.rlib(miniz.o) : error LNK2019: unresolved external symbol __imp_freopen_s referenced in function mz_freopen
          libminiz_sys-11b1e7ea6e848cba.rlib(miniz.o) : error LNK2019: unresolved external symbol __imp_fread referenced in function mz_zip_file_read_func
          libminiz_sys-11b1e7ea6e848cba.rlib(miniz.o) : error LNK2019: unresolved external symbol __imp__fseeki64 referenced in function mz_zip_file_read_func
          libminiz_sys-11b1e7ea6e848cba.rlib(miniz.o) : error LNK2019: unresolved external symbol __imp__ftelli64 referenced in function mz_zip_file_read_func
          libminiz_sys-11b1e7ea6e848cba.rlib(miniz.o) : error LNK2019: unresolved external symbol __imp_fwrite referenced in function mz_zip_file_write_callback
          libminiz_sys-11b1e7ea6e848cba.rlib(miniz.o) : error LNK2019: unresolved external symbol __imp_remove referenced in function mz_zip_add_mem_to_archive_file_in_place
          libminiz_sys-11b1e7ea6e848cba.rlib(miniz.o) : error LNK2019: unresolved external symbol __imp__stat64i32 referenced in function mz_zip_add_mem_to_archive_file_in_place
          libminiz_sys-11b1e7ea6e848cba.rlib(miniz.o) : error LNK2019: unresolved external symbol __imp__utime64 referenced in function mz_zip_reader_extract_file_to_file
          C:\Users\cyber\Rust\rust\build\x86_64-pc-windows-msvc\stage0-rustc\x86_64-pc-windows-msvc\release\deps\rustc-7d90e5433b19a0af.dll : fatal error LNK1120: 14 unresolved externals


error: aborting due to previous error

error: Could not compile `rustc`.

The errors suggest the wrong CRT is being linked to. I'm running the latest nightly as of this post: rustc 1.27.0-nightly (0b72d48f8 2018-04-10). This also seems to be specific to Rustbuild as I cloned flate2-rs and ran cargo test and all tests passed.

@pietroalbini pietroalbini added A-linkage Area: linking into static, shared libraries and binaries O-windows Operating system: Windows T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. C-bug Category: This is a bug. labels Apr 11, 2018
@pietroalbini
Copy link
Member

cc @retep998

@retep998
Copy link
Member

retep998 commented Apr 12, 2018

Do you have a .cargo/config somewhere that is influencing things? It's the most common cause of Rust failing to build for me.

@abonander
Copy link
Contributor Author

No. I have a config.toml, here: https://gist.github.com/abonander/49e30bf7651002d79878ca7e3f6a1850

@abonander
Copy link
Contributor Author

abonander commented Apr 17, 2018

@retep998 This is a recent regression as I was able to build Rust not a week before I opened this issue with almost the same environment except an older (~2 weeks) Rust nightly that cannot build master now because of recently landed API stabilization removing feature flags in the source.

I guess the next thing I could try would be to bisect, though if you know a tool to automate it that would be helpful.

@abonander
Copy link
Contributor Author

I found git bisect run, that should be good enough. I've started working on it.

@abonander
Copy link
Contributor Author

Unfortunately I realize now that it's not the Rust source that I need to bisect but the version I myself am using to build it (because the link error occurs when building stage0 on a local-Rust setup). This means I have to manually download a bunch of nightlies to start bisecting, fun.

@pietroalbini
Copy link
Member

FYI, there is bisect-rust that automatically does that (and downloads the artifacts of individual PRs, not nightlies). Even if the default test script uses docker and is meant to be used on Linux, I'm sure it's way easier to adapt it than to download a bunch of nightlies.

@abonander
Copy link
Contributor Author

I recently upgraded to Win 10 Pro so I've been looking for an excuse to try Docker for Windows (this same error occurs in Win 10 Home so it's not that). We should have a debugging guide or something that lists tools like this.

@abonander
Copy link
Contributor Author

@pietroalbini Unfortunately I can't build bisect-rust either because xz2-rs doesn't support VS2017, but that's likely a pivotal part of this linking error since the Windows builders are running the VS2015 build tools and they aren't broken.

@abonander
Copy link
Contributor Author

abonander commented Apr 17, 2018

nightly-2018-04-06 reports different linking errors in std:

C:\Users\cyber\Rust\rust>rustup default nightly-2018-04-06
info: using existing install for 'nightly-2018-04-06-x86_64-pc-windows-msvc'
info: default toolchain set to 'nightly-2018-04-06-x86_64-pc-windows-msvc'

  nightly-2018-04-06-x86_64-pc-windows-msvc unchanged - rustc 1.27.0-nightly (48fa6f963 2018-04-05)


C:\Users\cyber\Rust\rust>x.py clean && x.py build
Updating only changed submodules
Submodules updated in 0.12 seconds
   Compiling unicode-xid v0.1.0
   Compiling winapi v0.3.4
   Compiling dtoa v0.4.2
   Compiling ordermap v0.3.5
   Compiling serde v1.0.37
   Compiling cfg-if v0.1.2
   Compiling cc v1.0.9
   Compiling libc v0.2.40
   Compiling fixedbitset v0.1.9
   Compiling num-traits v0.2.2
   Compiling itoa v0.4.1
   Compiling getopts v0.2.17
   Compiling build_helper v0.1.0 (file:///C:/Users/cyber/Rust/rust/src/build_helper)
   Compiling lazy_static v0.2.11
   Compiling filetime v0.1.15
   Compiling proc-macro2 v0.3.1
   Compiling num_cpus v1.8.0
   Compiling petgraph v0.4.12
   Compiling quote v0.5.1
   Compiling cmake v0.1.29
   Compiling syn v0.13.1
   Compiling time v0.1.39
   Compiling serde_derive_internals v0.23.0
   Compiling serde_json v1.0.13
   Compiling toml v0.4.5
   Compiling serde_derive v1.0.37
   Compiling bootstrap v0.0.0 (file:///C:/Users/cyber/Rust/rust/src/bootstrap)
    Finished dev [unoptimized] target(s) in 34.87 secs
Build completed successfully in 0:00:36
Updating only changed submodules
Submodules updated in 0.12 seconds
    Finished dev [unoptimized] target(s) in 0.0 secs
Building stage0 std artifacts (x86_64-pc-windows-msvc -> x86_64-pc-windows-msvc)
   Compiling cc v1.0.9
   Compiling core v0.0.0 (file:///C:/Users/cyber/Rust/rust/src/libcore)
   Compiling unwind v0.0.0 (file:///C:/Users/cyber/Rust/rust/src/libunwind)
   Compiling build_helper v0.1.0 (file:///C:/Users/cyber/Rust/rust/src/build_helper)
   Compiling std v0.0.0 (file:///C:/Users/cyber/Rust/rust/src/libstd)
   Compiling compiler_builtins v0.0.0 (file:///C:/Users/cyber/Rust/rust/src/rustc/compiler_builtins_shim)
   Compiling libc v0.0.0 (file:///C:/Users/cyber/Rust/rust/src/rustc/libc_shim)
   Compiling alloc v0.0.0 (file:///C:/Users/cyber/Rust/rust/src/liballoc)
   Compiling std_unicode v0.0.0 (file:///C:/Users/cyber/Rust/rust/src/libstd_unicode)
   Compiling panic_abort v0.0.0 (file:///C:/Users/cyber/Rust/rust/src/libpanic_abort)
   Compiling alloc_system v0.0.0 (file:///C:/Users/cyber/Rust/rust/src/liballoc_system)
   Compiling panic_unwind v0.0.0 (file:///C:/Users/cyber/Rust/rust/src/libpanic_unwind)
error: linking with `C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.13.26128\bin\HostX64\x64\link.exe` failed: exit code: 1120
  |
  = note: "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.13.26128\\bin\\HostX64\\x64\\link.exe" "/NOLOGO" "/NXCOMPAT" "/LIBPATH:C:\\Users\\cyber\\Rust\\rust\\build\\x86_64-pc-windows-msvc\\stage0-sysroot\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib" "C:\\Users\\cyber\\Rust\\rust\\build\\x86_64-pc-windows-msvc\\stage0-std\\x86_64-pc-windows-msvc\\release\\deps\\std-0dcc26fc3bac26c2.std0-6cc1ac623fafb9d4e8d09970e15b06a.rs.rcgu.o" "C:\\Users\\cyber\\Rust\\rust\\build\\x86_64-pc-windows-msvc\\stage0-std\\x86_64-pc-windows-msvc\\release\\deps\\std-0dcc26fc3bac26c2.std1-6cc1ac623fafb9d4e8d09970e15b06a.rs.rcgu.o" "C:\\Users\\cyber\\Rust\\rust\\build\\x86_64-pc-windows-msvc\\stage0-std\\x86_64-pc-windows-msvc\\release\\deps\\std-0dcc26fc3bac26c2.std10-6cc1ac623fafb9d4e8d09970e15b06a.rs.rcgu.o" "C:\\Users\\cyber\\Rust\\rust\\build\\x86_64-pc-windows-msvc\\stage0-std\\x86_64-pc-windows-msvc\\release\\deps\\std-0dcc26fc3bac26c2.std11-6cc1ac623fafb9d4e8d09970e15b06a.rs.rcgu.o" "C:\\Users\\cyber\\Rust\\rust\\build\\x86_64-pc-windows-msvc\\stage0-std\\x86_64-pc-windows-msvc\\release\\deps\\std-0dcc26fc3bac26c2.std12-6cc1ac623fafb9d4e8d09970e15b06a.rs.rcgu.o" "C:\\Users\\cyber\\Rust\\rust\\build\\x86_64-pc-windows-msvc\\stage0-std\\x86_64-pc-windows-msvc\\release\\deps\\std-0dcc26fc3bac26c2.std13-6cc1ac623fafb9d4e8d09970e15b06a.rs.rcgu.o" "C:\\Users\\cyber\\Rust\\rust\\build\\x86_64-pc-windows-msvc\\stage0-std\\x86_64-pc-windows-msvc\\release\\deps\\std-0dcc26fc3bac26c2.std14-6cc1ac623fafb9d4e8d09970e15b06a.rs.rcgu.o" "C:\\Users\\cyber\\Rust\\rust\\build\\x86_64-pc-windows-msvc\\stage0-std\\x86_64-pc-windows-msvc\\release\\deps\\std-0dcc26fc3bac26c2.std15-6cc1ac623fafb9d4e8d09970e15b06a.rs.rcgu.o" "C:\\Users\\cyber\\Rust\\rust\\build\\x86_64-pc-windows-msvc\\stage0-std\\x86_64-pc-windows-msvc\\release\\deps\\std-0dcc26fc3bac26c2.std2-6cc1ac623fafb9d4e8d09970e15b06a.rs.rcgu.o" "C:\\Users\\cyber\\Rust\\rust\\build\\x86_64-pc-windows-msvc\\stage0-std\\x86_64-pc-windows-msvc\\release\\deps\\std-0dcc26fc3bac26c2.std3-6cc1ac623fafb9d4e8d09970e15b06a.rs.rcgu.o" "C:\\Users\\cyber\\Rust\\rust\\build\\x86_64-pc-windows-msvc\\stage0-std\\x86_64-pc-windows-msvc\\release\\deps\\std-0dcc26fc3bac26c2.std4-6cc1ac623fafb9d4e8d09970e15b06a.rs.rcgu.o" "C:\\Users\\cyber\\Rust\\rust\\build\\x86_64-pc-windows-msvc\\stage0-std\\x86_64-pc-windows-msvc\\release\\deps\\std-0dcc26fc3bac26c2.std5-6cc1ac623fafb9d4e8d09970e15b06a.rs.rcgu.o" "C:\\Users\\cyber\\Rust\\rust\\build\\x86_64-pc-windows-msvc\\stage0-std\\x86_64-pc-windows-msvc\\release\\deps\\std-0dcc26fc3bac26c2.std6-6cc1ac623fafb9d4e8d09970e15b06a.rs.rcgu.o" "C:\\Users\\cyber\\Rust\\rust\\build\\x86_64-pc-windows-msvc\\stage0-std\\x86_64-pc-windows-msvc\\release\\deps\\std-0dcc26fc3bac26c2.std7-6cc1ac623fafb9d4e8d09970e15b06a.rs.rcgu.o" "C:\\Users\\cyber\\Rust\\rust\\build\\x86_64-pc-windows-msvc\\stage0-std\\x86_64-pc-windows-msvc\\release\\deps\\std-0dcc26fc3bac26c2.std8-6cc1ac623fafb9d4e8d09970e15b06a.rs.rcgu.o" "C:\\Users\\cyber\\Rust\\rust\\build\\x86_64-pc-windows-msvc\\stage0-std\\x86_64-pc-windows-msvc\\release\\deps\\std-0dcc26fc3bac26c2.std9-6cc1ac623fafb9d4e8d09970e15b06a.rs.rcgu.o" "/OUT:C:\\Users\\cyber\\Rust\\rust\\build\\x86_64-pc-windows-msvc\\stage0-std\\x86_64-pc-windows-msvc\\release\\deps\\std-0dcc26fc3bac26c2.dll" "/DEF:C:\\Users\\cyber\\AppData\\Local\\Temp\\rustc.CEA4nMZsBt0t\\lib.def" "C:\\Users\\cyber\\Rust\\rust\\build\\x86_64-pc-windows-msvc\\stage0-std\\x86_64-pc-windows-msvc\\release\\deps\\std-0dcc26fc3bac26c2.crate.metadata.rcgu.o" "C:\\Users\\cyber\\Rust\\rust\\build\\x86_64-pc-windows-msvc\\stage0-std\\x86_64-pc-windows-msvc\\release\\deps\\std-0dcc26fc3bac26c2.crate.allocator.rcgu.o" "/OPT:REF,ICF" "/DEBUG" "/LIBPATH:C:\\Users\\cyber\\Rust\\rust\\build\\x86_64-pc-windows-msvc\\stage0-std\\x86_64-pc-windows-msvc\\release\\deps" "/LIBPATH:C:\\Users\\cyber\\Rust\\rust\\build\\x86_64-pc-windows-msvc\\stage0-std\\release\\deps" "/LIBPATH:C:\\Users\\cyber\\Rust\\rust\\build\\x86_64-pc-windows-msvc\\stage0-std\\x86_64-pc-windows-msvc\\release\\build\\compiler_builtins-05da96f10ee08182\\out" "/LIBPATH:C:\\Users\\cyber\\Rust\\rust\\build\\x86_64-pc-windows-msvc\\stage0-sysroot\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib" "advapi32.lib" "ws2_32.lib" "userenv.lib" "shell32.lib" "C:\\Users\\cyber\\AppData\\Local\\Temp\\rustc.CEA4nMZsBt0t\\libpanic_unwind-6ab08a78974024cf.rlib" "C:\\Users\\cyber\\AppData\\Local\\Temp\\rustc.CEA4nMZsBt0t\\libunwind-2869f0f2f2f58965.rlib" "C:\\Users\\cyber\\AppData\\Local\\Temp\\rustc.CEA4nMZsBt0t\\liblibc-328e7af81e8060e6.rlib" "C:\\Users\\cyber\\AppData\\Local\\Temp\\rustc.CEA4nMZsBt0t\\liballoc_system-b7d1cae0ef4f9328.rlib" "C:\\Users\\cyber\\AppData\\Local\\Temp\\rustc.CEA4nMZsBt0t\\liballoc-d98741ac693feb4c.rlib" "C:\\Users\\cyber\\AppData\\Local\\Temp\\rustc.CEA4nMZsBt0t\\libcore-c1274e4da0faaccf.rlib" "libcmt.lib" "/DLL" "/IMPLIB:C:\\Users\\cyber\\Rust\\rust\\build\\x86_64-pc-windows-msvc\\stage0-std\\x86_64-pc-windows-msvc\\release\\deps\\std-0dcc26fc3bac26c2.dll.lib"
  = note:    Creating library C:\Users\cyber\Rust\rust\build\x86_64-pc-windows-msvc\stage0-std\x86_64-pc-windows-msvc\release\deps\std-0dcc26fc3bac26c2.dll.lib and object C:\Users\cyber\Rust\rust\build\x86_64-pc-windows-msvc\stage0-std\x86_64-pc-windows-msvc\release\deps\std-0dcc26fc3bac26c2.dll.exp
          std-0dcc26fc3bac26c2.crate.allocator.rcgu.o : error LNK2019: unresolved external symbol __rdl_usable_size referenced in function __rust_usable_size
          std-0dcc26fc3bac26c2.crate.allocator.rcgu.o : error LNK2019: unresolved external symbol __rdl_alloc_excess referenced in function __rust_alloc_excess
          std-0dcc26fc3bac26c2.crate.allocator.rcgu.o : error LNK2019: unresolved external symbol __rdl_realloc_excess referenced in function __rust_realloc_excess
          std-0dcc26fc3bac26c2.crate.allocator.rcgu.o : error LNK2019: unresolved external symbol __rdl_grow_in_place referenced in function __rust_grow_in_place
          std-0dcc26fc3bac26c2.crate.allocator.rcgu.o : error LNK2019: unresolved external symbol __rdl_shrink_in_place referenced in function __rust_shrink_in_place
          libcore-c1274e4da0faaccf.rlib(core-c1274e4da0faaccf.core2-b236f49e4e6ab3c48c3cbb1a4de38b83.rs.rcgu.o) : error LNK2019: unresolved external symbol __udivti3 referenced in function _ZN4core3num14from_str_radix17h8fe975e8dc86c691E
          libcore-c1274e4da0faaccf.rlib(core-c1274e4da0faaccf.core0-b236f49e4e6ab3c48c3cbb1a4de38b83.rs.rcgu.o) : error LNK2001: unresolved external symbol __udivti3
          libcore-c1274e4da0faaccf.rlib(core-c1274e4da0faaccf.core2-b236f49e4e6ab3c48c3cbb1a4de38b83.rs.rcgu.o) : error LNK2019: unresolved external symbol __muloti4 referenced in function _ZN4core3num14from_str_radix17ha8e33a846b1be59fE
          C:\Users\cyber\Rust\rust\build\x86_64-pc-windows-msvc\stage0-std\x86_64-pc-windows-msvc\release\deps\std-0dcc26fc3bac26c2.dll : fatal error LNK1120: 7 unresolved externals


error: aborting due to previous error

error: Could not compile `std`.

This nightly is relatively old but it's around the last time Rust built successfully for me. Nightly of the 5th fails to compile liballoc because of the attributes on type parameters. I'm working my way forward.

@abonander
Copy link
Contributor Author

I can build Rust fine with the latest beta, but not the latest nightly for its own revision 7360d6dd6.

@steveklabnik
Copy link
Member

@abonander have you seen this lately? It's been over a year.

@abonander
Copy link
Contributor Author

abonander commented May 22, 2019

I haven't attempted building rustc for about that long so I have no idea. I can try tonight after I get off work.

@ChrisDenton
Copy link
Member

This issue is very old now and there has not be any follow up nor anyone else reporting a problem so I'll close this now. I can reopen if anyone experiences this issue and has more information.

@ChrisDenton ChrisDenton closed this as not planned Won't fix, can't repro, duplicate, stale Oct 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-linkage Area: linking into static, shared libraries and binaries C-bug Category: This is a bug. O-windows Operating system: Windows T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

5 participants