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

unable to build on windows when "optimize = false" #65352

Closed
guanqun opened this issue Oct 13, 2019 · 4 comments
Closed

unable to build on windows when "optimize = false" #65352

guanqun opened this issue Oct 13, 2019 · 4 comments

Comments

@guanqun
Copy link
Contributor

guanqun commented Oct 13, 2019

When "optimize" in config.toml is set to false, windows build msvc is unable to build properly. It's due to the limitation of 65535 objects in the linker object.

see following error:

316abf8bcc4ba1.rlib" "C:\\Users\\guanq\\AppData\\Local\\Temp\\rustcbLuaNn\\libsyntax_pos-3323d50e59cc4919.rlib" "C:\\Users\\guanq\\AppData\\Local\\Temp\\rustcbLuaNn\\libunicode_width-ea3995e2b993f18f.rlib" "C:\\Users\\guanq\\AppData\\Local\\Temp\\rustcbLuaNn\\libarena-0856762eb3ab7470.rlib" "C:\\Users\\guanq\\AppData\\Local\\Temp\\rustcbLuaNn\\libtermcolor-305fcab1bb94694a.rlib" "C:\\Users\\guanq\\AppData\\Local\\Temp\\rustcbLuaNn\\libwincolor-c53103a7413d45df.rlib" "C:\\Users\\guanq\\AppData\\Local\\Temp\\rustcbLuaNn\\libwinapi_util-ba655d3145e45c60.rlib" "C:\\Users\\guanq\\AppData\\Local\\Temp\\rustcbLuaNn\\libwinapi-cb187667885d3dcd.rlib" "C:\\Users\\guanq\\AppData\\Local\\Temp\\rustcbLuaNn\\libproc_macro-5b99b05d8286979a.rlib" "C:\\Users\\guanq\\AppData\\Local\\Temp\\rustcbLuaNn\\librustc_data_structures-9b99a9d7e5b4d64d.rlib" "C:\\Users\\guanq\\AppData\\Local\\Temp\\rustcbLuaNn\\libena-65783ffeceddb97a.rlib" "C:\\Users\\guanq\\AppData\\Local\\Temp\\rustcbLuaNn\\libstable_deref_trait-9f0680be8049c560.rlib" "C:\\Users\\guanq\\AppData\\Local\\Temp\\rustcbLuaNn\\libgraphviz-5f96e05b03b23a47.rlib" "C:\\Users\\guanq\\AppData\\Local\\Temp\\rustcbLuaNn\\libjobserver-7fe26e37fe609fbd.rlib" "C:\\Users\\guanq\\AppData\\Local\\Temp\\rustcbLuaNn\\librand-c96c373d3a4b1712.rlib" "C:\\Users\\guanq\\AppData\\Local\\Temp\\rustcbLuaNn\\librand_chacha-f3d603719567b823.rlib" "C:\\Users\\guanq\\AppData\\Local\\Temp\\rustcbLuaNn\\libc2_chacha-e3068cf98d51b8d9.rlib" "C:\\Users\\guanq\\AppData\\Local\\Temp\\rustcbLuaNn\\libppv_lite86-96820330fb53ff37.rlib" "C:\\Users\\guanq\\AppData\\Local\\Temp\\rustcbLuaNn\\librand_core-97efbd5b1de33148.rlib" "C:\\Users\\guanq\\AppData\\Local\\Temp\\rustcbLuaNn\\libgetrandom-f8af94bf9c8bd8c9.rlib" "C:\\Users\\guanq\\AppData\\Local\\Temp\\rustcbLuaNn\\librustc_index-ed98dd1bac6278cf.rlib" "C:\\Users\\guanq\\AppData\\Local\\Temp\\rustcbLuaNn\\librustc_hash-1513f5c7374273ba.rlib" "C:\\Users\\guanq\\AppData\\Local\\Temp\\rustcbLuaNn\\libbyteorder-2823a91aa1974d65.rlib" "C:\\Users\\guanq\\AppData\\Local\\Temp\\rustcbLuaNn\\libserialize-95783872e2e6f63e.rlib" "C:\\Users\\guanq\\AppData\\Local\\Temp\\rustcbLuaNn\\libindexmap-4f22ec3b9f20b715.rlib" "C:\\Users\\guanq\\AppData\\Local\\Temp\\rustcbLuaNn\\libsmallvec-8a38783ef866b0e9.rlib" "C:\\Users\\guanq\\AppData\\Local\\Temp\\rustcbLuaNn\\libscoped_tls-76dfc084f156c673.rlib" "C:\\Users\\guanq\\AppData\\Local\\Temp\\rustcbLuaNn\\libbitflags-f64f1a758bca26a6.rlib" "C:\\Users\\guanq\\AppData\\Local\\Temp\\rustcbLuaNn\\liblazy_static-9c764dcfbbf49033.rlib" "C:\\Users\\guanq\\AppData\\Local\\Temp\\rustcbLuaNn\\liblog-fe97f57eddd4b8c5.rlib" "C:\\Users\\guanq\\AppData\\Local\\Temp\\rustcbLuaNn\\libcfg_if-614298c0521abf76.rlib" "/LIBPATH:S:\\repos\\rust\\build\\x86_64-pc-windows-msvc\\stage0-sysroot\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib" "std-b7c107de0b802697.dll.lib" "C:\\Users\\guanq\\AppData\\Local\\Temp\\rustcbLuaNn\\libcompiler_builtins-c1a53dc60828acad.rlib" "advapi32.lib" "ole32.lib" "oleaut32.lib" "psapi.lib" "kernel32.lib" "kernel32.lib" "advapi32.lib" "gdi32.lib" "kernel32.lib" "msimg32.lib" "opengl32.lib" "setupapi.lib" "user32.lib" "winspool.lib" "advapi32.lib" "advapi32.lib" "ws2_32.lib" "userenv.lib" "libcmt.lib" "/DLL" "/IMPLIB:S:\\repos\\rust\\build\\x86_64-pc-windows-msvc\\stage0-rustc\\x86_64-pc-windows-msvc\\debug\\deps\\rustc_driver-bf07b3bdf8ece79e.dll.lib"                                                                                                                                                  
 LINK : fatal error LNK1189: library limit of 65535 objects exceeded
@Mark-Simulacrum
Copy link
Member

Unfortunately I suspect we both can't really and shouldn't do anything here. A non optimized build is going to be too slow for any meaningful work. I believe there are similar pre-existing issues for the general case of this bug, though I don't recall if they have any resolution.

@guanqun
Copy link
Contributor Author

guanqun commented Oct 13, 2019

Then should we just get rid of this option in config.toml? if it's exposed, it's supposed to be working...

@Mark-Simulacrum
Copy link
Member

You're probably not wrong, it's mostly that no one has gotten around to doing so.

@guanqun
Copy link
Contributor Author

guanqun commented Oct 13, 2019

I'll check if it's easy to create a patch to remove this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants