Failure to compile on Windows debug
Categories
(Firefox Build System :: General, defect)
Tracking
(Not tracked)
People
(Reporter: jya, Unassigned)
References
(Regression)
Details
(Keywords: regression)
Attachments
(2 files)
Didn't pull from central in 2 weeks following PTO.
It no longer build for me.
0:29.17 = note: lld-link: error: undefined symbol: __declspec(dllimport) _CrtDbgReport
0:29.17 >>> referenced by C:\Users\jyavenard\Work\Mozilla\gecko\third_party\rust\glslopt\glsl-optimizer\src\compiler\glsl\lower_precision.cpp:716
0:29.17 >>> libglslopt-5e51d66771817707.rlib(lower_precision.o):(bool __cdecl lower_precision(struct exec_list *))
0:29.17 >>> referenced by C:\Users\jyavenard\Work\Mozilla\gecko\third_party\rust\glslopt\glsl-optimizer\src\compiler\glsl\lower_precision.cpp:716
0:29.17 >>> libglslopt-5e51d66771817707.rlib(lower_precision.o):(bool __cdecl lower_precision(struct exec_list *))
0:29.17 >>> referenced by C:\Users\jyavenard\Work\Mozilla\gecko\third_party\rust\glslopt\glsl-optimizer\src\compiler\glsl\lower_precision.cpp:187
0:29.17 >>> libglslopt-5e51d66771817707.rlib(lower_precision.o):(public: static void __cdecl `anonymous namespace'::find_lowerable_rvalues_visitor::stack_enter(class ir_instruction *, void *))
0:29.17 >>> referenced 15 more times
0:29.17 lld-link: error: undefined symbol: __declspec(dllimport) _invalid_parameter
0:29.17 >>> referenced by C:\Users\jyavenard\Work\Mozilla\gecko\third_party\rust\glslopt\glsl-optimizer\src\compiler\glsl\lower_precision.cpp:716
0:29.17 >>> libglslopt-5e51d66771817707.rlib(lower_precision.o):(bool __cdecl lower_precision(struct exec_list *))
0:29.17 >>> referenced by C:\Users\jyavenard\Work\Mozilla\gecko\third_party\rust\glslopt\glsl-optimizer\src\compiler\glsl\lower_precision.cpp:716
0:29.17 >>> libglslopt-5e51d66771817707.rlib(lower_precision.o):(bool __cdecl lower_precision(struct exec_list *))
0:29.17 >>> referenced by C:\Users\jyavenard\Work\Mozilla\gecko\third_party\rust\glslopt\glsl-optimizer\src\compiler\glsl\lower_precision.cpp:187
0:29.17 >>> libglslopt-5e51d66771817707.rlib(lower_precision.o):(public: static void __cdecl `anonymous namespace'::find_lowerable_rvalues_visitor::stack_enter(class ir_instruction *, void *))
0:29.17 >>> referenced 15 more times
Reverting bug 1661045 and bug 1659066, allows to compile
Comment 1•5 years ago
|
||
I would guess this is from bug 1659066 rather than 1661045. Mike, is there an additional thing we need to #define in glslopt's build.rs to prevent it try to link to these symbols, or an additional library we need to add to find them?
Comment 2•5 years ago
|
||
I don't reproduce. What's your mozconfig?
Reporter | ||
Comment 3•5 years ago
|
||
(In reply to Jamie Nicol [:jnicol] from comment #1)
I would guess this is from bug 1659066 rather than 1661045. Mike, is there an additional thing we need to #define in glslopt's build.rs to prevent it try to link to these symbols, or an additional library we need to add to find them?
No, I was getting the linkage error with just 1661045 reverted.
Reporter | ||
Comment 4•5 years ago
|
||
(In reply to Mike Hommey [:glandium] from comment #2)
I don't reproduce. What's your mozconfig?
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/../obj-ff-dbg
ac_add_options --target=x86_64-pc-mingw32
ac_add_options --host=x86_64-pc-mingw32
ac_add_options --enable-debug
ac_add_options --enable-debug-symbols
ac_add_options --enable-eme=widevine
ac_add_options --enable-rust-debug
#disable jemalloc for debugging memory overwrite
ac_add_options --disable-jemalloc
ac_add_options --disable-launcher-process
ac_add_options --disable-sandbox
#remove if too slow
ac_add_options --disable-optimize
mk_add_options 'export CARGO_INCREMENTAL=1'
ac_add_options --with-ccache=c:/Users/jyavenard/.mozbuild/sccache/sccache.exe
Comment 5•5 years ago
|
||
I still can't reproduce. Try with SCCACHE_RECACHE=1, or disabling sccache.
Reporter | ||
Comment 6•5 years ago
|
||
I use VS 2017 if that's something that matters.
Reporter | ||
Comment 7•5 years ago
|
||
(In reply to Mike Hommey [:glandium] from comment #5)
I still can't reproduce. Try with SCCACHE_RECACHE=1, or disabling sccache.
Nope.
Still the same linkage error :(
VS2017, ./mach bootstrap made as of this morning.
tried both with SCCACHE_RECACHE=1 and removing sccache config from mozbuild
I see that the bug with VS2019 has now been fixed, I may just revert to that instead.
Reporter | ||
Comment 8•5 years ago
|
||
Installed VS2019, tried again. and same error :(
Reporter | ||
Comment 9•5 years ago
|
||
Full log after clearing sccache , uninstalling VS2017, installing VS2019, deleted ~/.rustup ~/.mozbuild ~/.cargo
line 2608 is the linkage error.
Reporter | ||
Comment 10•5 years ago
|
||
Reporter | ||
Updated•5 years ago
|
Reporter | ||
Updated•5 years ago
|
Reporter | ||
Updated•5 years ago
|
![]() |
||
Comment 11•5 years ago
|
||
0:28.68 checking rustc version... 1.46.0
CI is currently using 1.43.0, can you try that?
Reporter | ||
Comment 12•5 years ago
|
||
Ok, I can confirm that the line causing the issue is:
ac_add_options --disable-optimize
Commenting this one and it compiles.
Reporter | ||
Comment 13•5 years ago
|
||
(In reply to :dmajor from comment #11)
0:28.68 checking rustc version... 1.46.0
CI is currently using 1.43.0, can you try that?
this didn't help.
0:59.99 js/src> checking for rustc... c:/Users/jyavenard/.cargo/bin/rustc.exe
0:60.00 js/src> checking for cargo... c:/Users/jyavenard/.cargo/bin/cargo.exe
1:00.07 js/src> Actually using 'C:\Users\jyavenard.rustup\toolchains\1.43.0-x86_64-pc-windows-msvc\bin\rustc.exe'
1:00.16 js/src> Actually using 'C:\Users\jyavenard.rustup\toolchains\1.43.0-x86_64-pc-windows-msvc\bin\cargo.exe'
1:00.18 js/src> checking rustc version... 1.43.0
1:00.20 js/src> checking cargo version... 1.43.0
I can only compile if the option ac_add_options --disable-optimize
isn't used.
Reporter | ||
Comment 14•5 years ago
|
||
looks like I also need to remove ac_add_options --disable-jemalloc
It's weird, because I got a compilation success with this one once. Or maybe I just didn't fully clobber between two builds.
Anyhow, after dozens of clobber/build
the issue is with ac_add_options --enable-rust-debug
I don't know if this is still necessary for debugging rust code from C++. for now I can remove that
Updated•5 years ago
|
Updated•5 years ago
|
Comment 15•3 years ago
|
||
We have no-opt builds now on automation, so I suppose this is not a problem anymore.
Description
•