Skip to content

Linker Error on nightly msvc 32bit, maybe related to FnBox #28799

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

Closed
kosta opened this issue Oct 1, 2015 · 3 comments
Closed

Linker Error on nightly msvc 32bit, maybe related to FnBox #28799

kosta opened this issue Oct 1, 2015 · 3 comments

Comments

@kosta
Copy link

kosta commented Oct 1, 2015

On rustc says rustc 1.5.0-nightly (f5a0158 2015-10-01)

Demo project: https://github.com/kosta/fnbox-test

When I do cd fnbox_main; cargo run on Mac OS (same nightly as be), it says:

     Running `target/debug/test-fnbox`
3 + 2 = Ok(5)

When I do the same on Windows 7 64bit using rust-nightly-i686-pc-windows-msvc.msi I get:

E:\test-fnbox\fnbox_main>cargo run --verbose
       Fresh libc v0.1.10
       Fresh log v0.3.2
       Fresh fnbox_lib v0.0.1 (file:///E:/test-fnbox/fnbox_main)
   Compiling test-fnbox v0.0.1 (file:///E:/test-fnbox/fnbox_main)
     Running `rustc src\main.rs --crate-name test_fnbox --crate-type bin -g --ou
t-dir E:\test-fnbox\fnbox_main\target\debug --emit=dep-info,link -L dependency=E
:\test-fnbox\fnbox_main\target\debug -L dependency=E:\test-fnbox\fnbox_main\targ
et\debug\deps --extern fnbox_lib=E:\test-fnbox\fnbox_main\target\debug\deps\libf
nbox_lib-dbcb88237aaacf1e.rlib --extern log=E:\test-fnbox\fnbox_main\target\debu
g\deps\liblog-6e27e2da5513596d.rlib`
error: linking with `link.exe` failed: exit code: 1120
note: "C:\\Program Files (x86)\\Microsoft Visual Studio 12.0\\VC/bin\\link.exe"
"/LIBPATH:C:\\Program Files (x86)\\Microsoft Visual Studio 12.0\\VC/lib\\" "/LIB
PATH:C:\\Program Files (x86)\\Windows Kits\\8.1\\Lib\\winv6.3\\um\\x86" "/NOLOGO
" "/NXCOMPAT" "/LIBPATH:C:\\Program Files (x86)\\Rust nightly 1.5\\bin\\rustlib\
\i686-pc-windows-msvc\\lib" "E:\\test-fnbox\\fnbox_main\\target\\debug\\test_fnb
ox.0.o" "/OUT:E:\\test-fnbox\\fnbox_main\\target\\debug\\test_fnbox.exe" "/OPT:R
EF,ICF" "/DEBUG" "\\\\vboxsrv\\VirtualBox_Shared\\test-fnbox\\fnbox_main\\target
\\debug\\deps\\libfnbox_lib-dbcb88237aaacf1e.rlib" "\\\\vboxsrv\\VirtualBox_Shar
ed\\test-fnbox\\fnbox_main\\target\\debug\\deps\\liblog-6e27e2da5513596d.rlib" "
\\\\vboxsrv\\VirtualBox_Shared\\test-fnbox\\fnbox_main\\target\\debug\\deps\\lib
libc-165b5479aec0459c.rlib" "C:\\Program Files (x86)\\Rust nightly 1.5\\bin\\rus
tlib\\i686-pc-windows-msvc\\lib\\libstd-10cbabc2.rlib" "C:\\Program Files (x86)\
\Rust nightly 1.5\\bin\\rustlib\\i686-pc-windows-msvc\\lib\\libcollections-10cba
bc2.rlib" "C:\\Program Files (x86)\\Rust nightly 1.5\\bin\\rustlib\\i686-pc-wind
ows-msvc\\lib\\librustc_unicode-10cbabc2.rlib" "C:\\Program Files (x86)\\Rust ni
ghtly 1.5\\bin\\rustlib\\i686-pc-windows-msvc\\lib\\librand-10cbabc2.rlib" "C:\\
Program Files (x86)\\Rust nightly 1.5\\bin\\rustlib\\i686-pc-windows-msvc\\lib\\
liballoc-10cbabc2.rlib" "C:\\Program Files (x86)\\Rust nightly 1.5\\bin\\rustlib
\\i686-pc-windows-msvc\\lib\\liballoc_system-10cbabc2.rlib" "C:\\Program Files (
x86)\\Rust nightly 1.5\\bin\\rustlib\\i686-pc-windows-msvc\\lib\\liblibc-10cbabc
2.rlib" "C:\\Program Files (x86)\\Rust nightly 1.5\\bin\\rustlib\\i686-pc-window
s-msvc\\lib\\libcore-10cbabc2.rlib" "/LIBPATH:E:\\test-fnbox\\fnbox_main\\target
\\debug" "/LIBPATH:E:\\test-fnbox\\fnbox_main\\target\\debug\\deps" "/LIBPATH:C:
\\Program Files (x86)\\Rust nightly 1.5\\bin\\rustlib\\i686-pc-windows-msvc\\lib
" "/LIBPATH:E:\\test-fnbox\\fnbox_main\\.rust\\bin\\i686-pc-windows-msvc" "/LIBP
ATH:E:\\test-fnbox\\fnbox_main\\bin\\i686-pc-windows-msvc" "kernel32.lib" "shell
32.lib" "msvcrt.lib" "ws2_32.lib" "userenv.lib" "advapi32.lib" "kernel32.lib" "s
hell32.lib" "msvcrt.lib" "compiler-rt.lib"
note: test_fnbox.0.o : warning LNK4217: locally defined symbol __ZN20MAX_LOG_LEV
EL_FILTER20h260f52825033eb8bEaaE imported in function __ZN5named12closure.3355E
test_fnbox.0.o : warning LNK4217: locally defined symbol __ZN4sync6atomic11atomi
c_load14_MSG_FILE_LINE20h649e8e0920f21525RbKE imported in function __ZN4sync6ato
mic11atomic_load21h15357964103575483697E
liblog-6e27e2da5513596d.rlib(log-6e27e2da5513596d.0.o) : warning LNK4049: locall
y defined symbol __ZN4sync6atomic11atomic_load14_MSG_FILE_LINE20h649e8e0920f2152
5RbKE imported
test_fnbox.0.o : warning LNK4217: locally defined symbol __ZN4sync6atomic11atomi
c_load14_MSG_FILE_LINE20h649e8e0920f21525ccKE imported in function __ZN4sync6ato
mic11atomic_load21h15357964103575483697E
liblog-6e27e2da5513596d.rlib(log-6e27e2da5513596d.0.o) : warning LNK4049: locall
y defined symbol __ZN4sync6atomic11atomic_load14_MSG_FILE_LINE20h649e8e0920f2152
5ccKE imported
liblog-6e27e2da5513596d.rlib(log-6e27e2da5513596d.0.o) : warning LNK4217: locall
y defined symbol __ZN5ascii19ASCII_LOWERCASE_MAP20h891504ddc52018ber8aE imported
 in function __ZN5ascii11u8.AsciiExt18to_ascii_lowercase20h6b854fda98ac1200A2aE
liblog-6e27e2da5513596d.rlib(log-6e27e2da5513596d.0.o) : warning LNK4217: locall
y defined symbol __ZN6option15Option$LT$T$GT$6unwrap14_MSG_FILE_LINE20h649e8e092
0f21525buNE imported in function __ZN6option15Option$LT$T$GT$6unwrap20h189088203
9800293355E
libstd-10cbabc2.rlib(std-10cbabc2.0.o) : warning LNK4049: locally defined symbol
 __ZN6option15Option$LT$T$GT$6unwrap14_MSG_FILE_LINE20h649e8e0920f21525buNE impo
rted
liblog-6e27e2da5513596d.rlib(log-6e27e2da5513596d.0.o) : warning LNK4217: locall
y defined symbol __ZN4sync6atomic12atomic_store14_MSG_FILE_LINE20h649e8e0920f215
25LaKE imported in function __ZN4sync6atomic12atomic_store21h1401020282882518775
0E
liblog-6e27e2da5513596d.rlib(log-6e27e2da5513596d.0.o) : warning LNK4217: locall
y defined symbol __ZN4sync6atomic12atomic_store14_MSG_FILE_LINE20h649e8e0920f215
256aKE imported in function __ZN4sync6atomic12atomic_store21h1401020282882518775
0E
libstd-10cbabc2.rlib(std-10cbabc2.0.o) : warning LNK4217: locally defined symbol
 __ZN7raw_vec11alloc_guard14_MSG_FILE_LINE20h5233ee83c6958b93TsbE imported in fu
nction __ZN5error101Box$LT$Error$u2b$$u20$Send$u20$$u2b$$u20$Sync$u20$$u2b$$u20$
$u27$a$GT$.From$LT$$RF$$u27$b$u20$str$GT$4from20hee95f0407a8b5abd8daE
libcollections-10cbabc2.rlib(collections-10cbabc2.0.o) : warning LNK4049: locall
y defined symbol __ZN7raw_vec11alloc_guard14_MSG_FILE_LINE20h5233ee83c6958b93Tsb
E imported
libstd-10cbabc2.rlib(std-10cbabc2.0.o) : warning LNK4217: locally defined symbol
 __ZN6option15Option$LT$T$GT$6expect15__STATIC_FMTSTR20hc832075917061a0ewtNE imp
orted in function __ZN3vec12Vec$LT$T$GT$7reserve19h756097315311652105E
libcollections-10cbabc2.rlib(collections-10cbabc2.0.o) : warning LNK4049: locall
y defined symbol __ZN6option15Option$LT$T$GT$6expect15__STATIC_FMTSTR20hc8320759
17061a0ewtNE imported
libstd-10cbabc2.rlib(std-10cbabc2.0.o) : warning LNK4217: locally defined symbol
 __ZN6option15Option$LT$T$GT$6expect10_FILE_LINE20h8741aaade7bbdf1cgtNE imported
 in function __ZN3vec12Vec$LT$T$GT$7reserve19h756097315311652105E
libcollections-10cbabc2.rlib(collections-10cbabc2.0.o) : warning LNK4049: locall
y defined symbol __ZN6option15Option$LT$T$GT$6expect10_FILE_LINE20h8741aaade7bbd
f1cgtNE imported
libstd-10cbabc2.rlib(std-10cbabc2.0.o) : warning LNK4217: locally defined symbol
 __ZN6result24Result$LT$T$C$$u20$E$GT$6unwrap15__STATIC_FMTSTR20hc832075917061a0
eKbOE imported in function __ZN6thread4park20hdb88efbb1ac3ef70FAbE
libstd-10cbabc2.rlib(std-10cbabc2.0.o) : warning LNK4217: locally defined symbol
 __ZN6result24Result$LT$T$C$$u20$E$GT$6unwrap10_FILE_LINE20h8741aaade7bbdf1cubOE
 imported in function __ZN6thread4park20hdb88efbb1ac3ef70FAbE
libstd-10cbabc2.rlib(std-10cbabc2.0.o) : warning LNK4217: locally defined symbol
 __ZN4cell16RefCell$LT$T$GT$10borrow_mut14_MSG_FILE_LINE20h649e8e0920f215259tKE
imported in function __ZN4rand13ThreadRng.Rng8next_u6420hfacae7071f7f815amwxE
libstd-10cbabc2.rlib(std-10cbabc2.0.o) : warning LNK4217: locally defined symbol
 __ZN5slice54_$u5b$T$u5d$.ops..Index$LT$ops..Range$LT$usize$GT$$GT$5index14_MSG_
FILE_LINE20h649e8e0920f21525yOPE imported in function __ZN3sys2os12error_string2
0h86086a62b4ab7f42LHvE
libcollections-10cbabc2.rlib(collections-10cbabc2.0.o) : warning LNK4049: locall
y defined symbol __ZN5slice54_$u5b$T$u5d$.ops..Index$LT$ops..Range$LT$usize$GT$$
GT$5index14_MSG_FILE_LINE20h649e8e0920f21525yOPE imported
libstd-10cbabc2.rlib(std-10cbabc2.0.o) : warning LNK4217: locally defined symbol
 __ZN6string6String8truncate14_MSG_FILE_LINE20h089424dc74c14514dOfE imported in
function __ZN3sys2os12error_string20h86086a62b4ab7f42LHvE
libstd-10cbabc2.rlib(std-10cbabc2.0.o) : warning LNK4217: locally defined symbol
 __ZN5slice54_$u5b$T$u5d$.ops..Index$LT$ops..Range$LT$usize$GT$$GT$5index14_MSG_
FILE_LINE20h649e8e0920f215255NPE imported in function __ZN3sys2os12Env.Iterator4
next20h9897d642738158f97KvE
libcollections-10cbabc2.rlib(collections-10cbabc2.0.o) : warning LNK4049: locall
y defined symbol __ZN5slice54_$u5b$T$u5d$.ops..Index$LT$ops..Range$LT$usize$GT$$
GT$5index14_MSG_FILE_LINE20h649e8e0920f215255NPE imported
libstd-10cbabc2.rlib(std-10cbabc2.0.o) : warning LNK4217: locally defined symbol
 __ZN7raw_vec15RawVec$LT$T$GT$13shrink_to_fit14_MSG_FILE_LINE20h5233ee83c6958b93
BpbE imported in function __ZN3ffi5c_str7CString18from_vec_unchecked20h5adfa5eff
5855f28vDeE
libcollections-10cbabc2.rlib(collections-10cbabc2.0.o) : warning LNK4049: locall
y defined symbol __ZN7raw_vec15RawVec$LT$T$GT$13shrink_to_fit14_MSG_FILE_LINE20h
5233ee83c6958b93BpbE imported
libstd-10cbabc2.rlib(std-10cbabc2.0.o) : warning LNK4217: locally defined symbol
 __ZN5slice57_$u5b$T$u5d$.ops..IndexMut$LT$ops..Range$LT$usize$GT$$GT$9index_mut
14_MSG_FILE_LINE20h649e8e0920f21525YQPE imported in function __ZN2io4Read14read_
to_string20h6802931272054495440E
libstd-10cbabc2.rlib(std-10cbabc2.0.o) : warning LNK4217: locally defined symbol
 __ZN3vec12Vec$LT$T$GT$5drain14_MSG_FILE_LINE20h089424dc74c14514FzgE imported in
 function __ZN2io8buffered18BufWriter$LT$W$GT$9flush_buf21h18326229385129381480E

libstd-10cbabc2.rlib(std-10cbabc2.0.o) : warning LNK4217: locally defined symbol
 __ZN5slice39_$u5b$T$u5d$.ops..IndexMut$LT$usize$GT$9index_mut14_MSG_FILE_LINE20
h649e8e0920f21525aNPE imported in function __ZN3net6parser20Parser$LT$$u27$a$GT$
19read_ipv6_addr_impl11read_groups20h3432b5cc5b5e92375vjE
librand-10cbabc2.rlib(rand-10cbabc2.0.o) : warning LNK4049: locally defined symb
ol __ZN5slice39_$u5b$T$u5d$.ops..IndexMut$LT$usize$GT$9index_mut14_MSG_FILE_LINE
20h649e8e0920f21525aNPE imported
libstd-10cbabc2.rlib(std-10cbabc2.0.o) : warning LNK4217: locally defined symbol
 __ZN4cell16RefCell$LT$T$GT$6borrow14_MSG_FILE_LINE20h649e8e0920f21525ptKE impor
ted in function __ZN10sys_common11thread_info3set20h2f7bc31798cacf9e92rE
libstd-10cbabc2.rlib(std-10cbabc2.0.o) : warning LNK4217: locally defined symbol
 __ZN5slice36_$u5b$T$u5d$.ops..Index$LT$usize$GT$5index14_MSG_FILE_LINE20h649e8e
0920f21525lMPE imported in function __ZN4hash3sip16SipHasher.Hasher5write20hf76c
90f409814f864GTE
libcollections-10cbabc2.rlib(collections-10cbabc2.0.o) : warning LNK4049: locall
y defined symbol __ZN5slice36_$u5b$T$u5d$.ops..Index$LT$usize$GT$5index14_MSG_FI
LE_LINE20h649e8e0920f21525lMPE imported
librand-10cbabc2.rlib(rand-10cbabc2.0.o) : warning LNK4049: locally defined symb
ol __ZN5slice36_$u5b$T$u5d$.ops..Index$LT$usize$GT$5index14_MSG_FILE_LINE20h649e
8e0920f21525lMPE imported
libstd-10cbabc2.rlib(std-10cbabc2.0.o) : warning LNK4217: locally defined symbol
 __ZN5isaac5EMPTY20hd2819167b16a6d39FhbE imported in function __ZN4rand6StdRng3n
ew20h1b6a51360bdc78a2UqxE
libcollections-10cbabc2.rlib(collections-10cbabc2.0.o) : warning LNK4217: locall
y defined symbol __ZN5u_str15UTF8_CHAR_WIDTH20h64eb18501991a9e979gE imported in
function __ZN6string6String15from_utf8_lossy20h083d40e2249662cfWAfE
librustc_unicode-10cbabc2.rlib(rustc_unicode-10cbabc2.0.o) : warning LNK4217: lo
cally defined symbol __ZN4char12char.CharExt8to_digit14_MSG_FILE_LINE20h649e8e09
20f21525CJKE imported in function __ZN4char4char8is_digit20h4aa08611ee5bc40dMthE

test_fnbox.0.o : error LNK2019: unresolved external symbol __imp___ZN5named15__S
TATIC_FMTSTR20hdba419b76b5b14574baE referenced in function __ZN5named12closure.3
355E
test_fnbox.0.o : error LNK2019: unresolved external symbol __imp___ZN5named4_LOC
20h49b461bc6448562c4aaE referenced in function __ZN5named12closure.3355E
test_fnbox.0.o : error LNK2019: unresolved external symbol __imp___ZN5named15__S
TATIC_FMTSTR20hdba419b76b5b1457HdaE referenced in function __ZN5named12closure.3
355E
test_fnbox.0.o : error LNK2019: unresolved external symbol __imp___ZN5named4_LOC
20h49b461bc6448562cHcaE referenced in function __ZN5named12closure.3355E
test_fnbox.0.o : error LNK2019: unresolved external symbol __imp___ZN5named15__S
TATIC_FMTSTR20hdba419b76b5b1457afaE referenced in function __ZN5named12closure.3
355E
test_fnbox.0.o : error LNK2019: unresolved external symbol __imp___ZN5named4_LOC
20h49b461bc6448562caeaE referenced in function __ZN5named12closure.3355E
E:\test-fnbox\fnbox_main\target\debug\test_fnbox.exe : fatal error LNK1120: 6 un
resolved externals

error: aborting due to previous error
Could not compile `test-fnbox`.

Caused by:
  Process didn't exit successfully: `rustc src\main.rs --crate-name test_fnbox -
-crate-type bin -g --out-dir E:\test-fnbox\fnbox_main\target\debug --emit=dep-in
fo,link -L dependency=E:\test-fnbox\fnbox_main\target\debug -L dependency=E:\tes
t-fnbox\fnbox_main\target\debug\deps --extern fnbox_lib=E:\test-fnbox\fnbox_main
\target\debug\deps\libfnbox_lib-dbcb88237aaacf1e.rlib --extern log=E:\test-fnbox
\fnbox_main\target\debug\deps\liblog-6e27e2da5513596d.rlib` (exit code: 11128881
48)
@kosta kosta changed the title Linker Error on nightly msvc 32bit Linker Error on nightly msvc 32bit, maybe related to FnBox Oct 1, 2015
@retep998
Copy link
Member

retep998 commented Oct 1, 2015

Duplicate of #27438

@alexcrichton
Copy link
Member

Thanks for the report! This was fixed for 64-bit a few days ago and 32-bit this morning, so the next nightlies should have the fix!

@kosta
Copy link
Author

kosta commented Oct 2, 2015

Thanks for fixing! I'll test this soon

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

3 participants