File path issue when compiling wxWidgets
philmb3487 opened this issue · 9 comments
So I have gotten compilation working under cmake (see #120 for details), and then when compiling wxWidgets
I hit various file path issues, always with a variation on the same:
LINK : fatal error LNK1104: cannot open file 'z:\opt\msvc\kits\10\lib\10.0.22621.0\ucrt\x64\ucrtd.lib'
It seems that this happens on all my test environments so far, Gentoo and Ubuntu. I want to try on a case insensitive filesystem, to see if there's a difference between Z:\ and z:, or something like this.
So does this path exist, with forward slashes, without the z:
, and possibly resolved case insensitively?
here is a failing link command. there's many of these.
/opt/msvc/bin/x64/link /nologo @CMakeFiles/wxcore.dir/objects1.rsp /out:../../lib/vc_x64_dll/wxmsw330ud_core_vc_x64_custom.dll /implib:../../lib/vc_x64_dll/wxmsw33ud_core.lib /pdb:/data/modix/modixslicer/deps/wxWidgets/build-msvc-wine/lib/vc_x64_dll/wxmsw330ud_core_vc_x64_custom.pdb /dll /version:0.0 /MANIFEST:NO /debug /INCREMENTAL kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib shlwapi.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib version.lib ws2_32.lib wininet.lib oleacc.lib uxtheme.lib ../../lib/vc_x64_dll/wxbase33ud.lib ../../lib/vc_x64_dll/wxjpegd.lib ../../lib/vc_x64_dll/wxpngd.lib ../../lib/vc_x64_dll/wxtiffd.lib winmm.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib shlwapi.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib version.lib ws2_32.lib wininet.lib oleacc.lib uxtheme.lib ../../lib/vc_x64_dll/wxjpegd.lib ../../lib/vc_x64_dll/wxzlibd.lib kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib
LINK: command "/opt/msvc/bin/x64/link.exe /nologo @CMakeFiles/wxcore.dir/objects1.rsp /out:../../lib/vc_x64_dll/wxmsw330ud_core_vc_x64_custom.dll /implib:../../lib/vc_x64_dll/wxmsw33ud_core.lib /pdb:/data/modix/modixslicer/deps/wxWidgets/build-msvc-wine/lib/vc_x64_dll/wxmsw330ud_core_vc_x64_custom.pdb /dll /version:0.0 /MANIFEST:NO /debug /INCREMENTAL kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib shlwapi.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib version.lib ws2_32.lib wininet.lib oleacc.lib uxtheme.lib ../../lib/vc_x64_dll/wxbase33ud.lib ../../lib/vc_x64_dll/wxjpegd.lib ../../lib/vc_x64_dll/wxpngd.lib ../../lib/vc_x64_dll/wxtiffd.lib winmm.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib shlwapi.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib version.lib ws2_32.lib wininet.lib oleacc.lib uxtheme.lib ../../lib/vc_x64_dll/wxjpegd.lib ../../lib/vc_x64_dll/wxzlibd.lib kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib" failed (exit code 147) with the following output:
LINK : fatal error LNK1171: unable to load ole32.dll (error code: 4)
To narrow things down a bit... ucrtd.lib
looks like you're building in Debug mode. Does it succeed building in Release mode?
Can you share the full cmake configuration and source setup instructions, so that someone else would be able to try to reproduce this issue?
Does this happen if you try to build a smaller/simpler project than wxWidgets, or is it specific to something in wxWidgets? We've got a set of tests we run in CI, can you run test/test.sh /opt/msvc
in your msvc-wine
clone, and see if that runs successfully in your case? (OTOH, as you already had to work around issues both with mspdbsrv.exe
and mt.exe
, it probably won't work. But the issues you mentioned in #120, they were only present on Gentoo but not on Ubuntu, right?)
It seems to fail on random files, they do exist when I check the path manually.
[ 83%] Linking CXX shared library ../../lib/vc_x64_dll/wxmsw330u_core_vc_x64_custom.dll
LINK: command "/opt/msvc/bin/x64/link.exe /nologo @CMakeFiles/wxcore.dir/objects1.rsp /out:../../lib/vc_x64_dll/wxmsw330u_core_vc_x64_custom.dll /implib:../../lib/vc_x64_dll/wxmsw33u_core.lib /pdb:/data/modix/modixslicer/deps/wxWidgets/build-msvc-wine/lib/vc_x64_dll/wxmsw330u_core_vc_x64_custom.pdb /dll /version:0.0 /MANIFEST:NO /INCREMENTAL:NO /DEBUG kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib shlwapi.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib version.lib ws2_32.lib wininet.lib oleacc.lib uxtheme.lib ../../lib/vc_x64_dll/wxbase33u.lib ../../lib/vc_x64_dll/wxjpeg.lib ../../lib/vc_x64_dll/wxpng.lib ../../lib/vc_x64_dll/wxtiff.lib winmm.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib shlwapi.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib version.lib ws2_32.lib wininet.lib oleacc.lib uxtheme.lib ../../lib/vc_x64_dll/wxjpeg.lib ../../lib/vc_x64_dll/wxzlib.lib kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib" failed (exit code 80) with the following output:
LINK : fatal error LNK1104: cannot open file 'z:\opt\msvc\vc\tools\msvc\14.39.33519\lib\x64\OLDNAMES.lib'
make[2]: *** [libs/core/CMakeFiles/wxcore.dir/build.make:6397: lib/vc_x64_dll/wxmsw330u_core_vc_x64_custom.dll] Error 255
make[1]: *** [CMakeFiles/Makefile2:658: libs/core/CMakeFiles/wxcore.dir/all] Error 2
make: *** [Makefile:124: all] Error 2
I'm able to compile and install other projects like ZLIB, lib jpeg, EXPAT, Boost . It's just wxWidgets that is giving me trouble, even on ubuntu. Just get the upstream git wxWidgets and use
set(CMAKE_SYSTEM_NAME Windows)
set(CMAKE_SYSTEM_PROCESSOR AMD64)
# which compilers to use for C and C++
set(CMAKE_C_COMPILER /opt/msvc/bin/x64/cl.exe)
set(CMAKE_CXX_COMPILER /opt/msvc/bin/x64/cl.exe)
set(CMAKE_RC_COMPILER /opt/msvc/bin/x64/rc.exe)
set(CMAKE_LINKER /opt/msvc/bin/x64/link.exe)
set(CMAKE_HOST_WIN32 true)
set(CMAKE_MSVC_DEBUG_INFORMATION_FORMAT Embedded)
set(CMAKE_EXE_LINKER_FLAGS /MANIFEST:NO)
set(CMAKE_SHARED_LINKER_FLAGS /MANIFEST:NO)
I'm going to try a case insensitive ext4 soon.
I reinstalled /opt/msvc
and that fixed it.
Negative, this still happens randomly. Weird.
No, it's okay, compilation finished.